Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to use with Intellij: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar #457

Open
MaT1g3R opened this issue Mar 31, 2020 · 8 comments

Comments

@MaT1g3R
Copy link

MaT1g3R commented Mar 31, 2020

When I try to import an sbt project with sbt-microsites plugin, I get the following error:

Error while importing sbt project:

List(;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers resolveSbtClassifiers" ;*/*:dumpStructureTo /tmp/sbt-structure.xml; session clear-all ; set ideaPort in Global := 42399
[warn] sbt version mismatch, current: 1.3.7, in build.properties: "1.3.8", use 'reboot' to use the new value.
[info] Loading settings for project global-plugins from plugins.sbt,credentials.sbt,idea.sbt ...
[info] Loading global plugins from /home/umi/.sbt/1.0/plugins
[info] Loading settings for project garner-common2-build from plugins.sbt,idea.sbt ...
[info] Loading project definition from /run/media/umi/HDD/Projects/Scala/garner-common2/project
[info] Loading settings for project root from build.sbt ...
[warn] Discarding 1 session setting.  Use 'session save' to persist session settings.
[info] Set current project to root (in build file:/run/media/umi/HDD/Projects/Scala/garner-common2/)
[info] Defining Global / sbtStructureOptions
[info] The new value will be used by Global / ssOptions
[info] Reapplying settings...
[info] Set current project to root (in build file:/run/media/umi/HDD/Projects/Scala/garner-common2/)
[error] stack trace is suppressed; run last updateSbtClassifiers for the full output
[error] (updateSbtClassifiers) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
[error] https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar: not found: https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar
[error] Total time: 1 s, completed Mar 30, 2020, 10:38:19 PM)
@fedefernandez
Copy link
Contributor

@MaT1g3R it seems the sources for those libraries are not available in Maven. I'm trying to identify which library uses those, but the sbt-dependency-graph fails trying to fetch the tree.

A workaround would be to disable the sbt sources in IntelliJ when updating the project. This is working for me.

Screenshot 2020-04-01 at 11 29 21

@MaT1g3R
Copy link
Author

MaT1g3R commented Apr 1, 2020

@fedefernandez The work around works, but do you think we can solve the missing sources problem?

@fedefernandez
Copy link
Contributor

@MaT1g3R we'd need to identify from where is coming that dependency. It seems to be from an sbt-plugin but can't find which

@juanpedromoreno
Copy link
Member

After #465 , I've been able to load it successfully with IntelliJ.

Could you please check it out now? Thanks!

@MaT1g3R
Copy link
Author

MaT1g3R commented Apr 9, 2020

thank you, I'll try it out later today

@MaT1g3R
Copy link
Author

MaT1g3R commented Apr 9, 2020

@juanpedromoreno

Hello, I just loaded up the master branch on my local IntelliJ, and it's still not working. I did some digging and found the culprit:

com.47deg:sbt-microsites:1.1.4+17-8742a2d3+20200409-1313-SNAPSHOT
+-com.typesafe.sbt:sbt-site:1.4.0
| +-org.foundweekends:pamflet-library_2.12:0.8.0 [S]
| | +-org.antlr:stringtemplate:3.2.1
| | | +-antlr:antlr:2.7.7

pamflate is depending on an old version of
stringtemplate, which pulls in the outdated antlr version that causes the problem. There is a new version of stringtemplate here that should fix the issue: https://github.com/antlr/stringtemplate4

But we'd need to get pamflet to use the new version , then get sbt-site to update to the newest pamflet version after that......

Full dependency tree if you are interested:

deps-tree.txt

Error log:

Error while importing sbt project:

List(;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers resolveSbtClassifiers" ;*/*:dumpStructureTo /tmp/sbt-structure.xml; session clear-all ; set ideaPort in Global := 33965
[info] Loading settings for project global-plugins from plugins.sbt,credentials.sbt,idea.sbt ...
[info] Loading global plugins from /home/umi/.sbt/1.0/plugins
[info] Loading settings for project sbt-microsites-build from plugins.sbt,idea.sbt ...
[info] Loading project definition from /run/media/umi/HDD/Projects/Scala/sbt-microsites/project
[info] Loading settings for project sbt-microsites from build.sbt ...
[warn] Discarding 1 session setting.  Use 'session save' to persist session settings.
[info] Set current project to sbt-microsites (in build file:/run/media/umi/HDD/Projects/Scala/sbt-microsites/)
[info] Defining Global / sbtStructureOptions
[info] The new value will be used by Global / ssOptions
[info] Reapplying settings...
[info] Set current project to sbt-microsites (in build file:/run/media/umi/HDD/Projects/Scala/sbt-microsites/)
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[error] stack trace is suppressed; run last updateSbtClassifiers for the full output
[error] (updateSbtClassifiers) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
[error] https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar: not found: https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar
[error] Total time: 25 s, completed Apr 9, 2020, 1:12:31 PM)

@juanpedromoreno
Copy link
Member

Thanks @MaT1g3R for the thorough investigation.

It seems like the latest version of pamflet is still on stringtemplate 3.2.1 😕

MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- stringtemplate3 depends on a super outdated version of antlr, and
is causing this issue: 47degrees/sbt-microsites#457

- the `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3.
See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918)
and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570),

stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- stringtemplate3 depends on a super outdated version of antlr, and
is causing this issue: 47degrees/sbt-microsites#457

- the `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3. See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918) and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570),

stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- stringtemplate3 depends on a super outdated version of antlr, and
is causing this issue: 47degrees/sbt-microsites#457

- the `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3. See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918) and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570),
stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- stringtemplate3 depends on a super outdated version of antlr, and
is causing this issue: 47degrees/sbt-microsites#457

- the `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3. See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918) and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570).
stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- stringtemplate3 is very outdated (last commit in 2015) and depends on a
outdated version of antlr. It's causing this issue: 47degrees/sbt-microsites#457

- the `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3. See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918) and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570).
stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- Stringtemplate3 is very outdated (last commit in 2015) and depends on a
outdated version of antlr. It's causing this issue: 47degrees/sbt-microsites#457

- The `setAttributes` method in stringtemplate3 was always broken,
as it goes down a different code path compared to `setAttribute` in
stringtemplate3. See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918) and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570).
stringtemplate4 removed the `setAttributes` method, so I had to write a
custom function to handle the '.' characters in the properties.
MaT1g3R added a commit to GarnerCorp/pamflet that referenced this issue Apr 10, 2020
- Stringtemplate3 is very outdated (last commit in 2015) and depends on a
  outdated version of antlr. It's causing this issue: 47degrees/sbt-microsites#457

- The `setAttributes` method in stringtemplate3 was always broken,
  as it goes down a different code path compared to `setAttribute` in
  stringtemplate3.

  See [setAttributes](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L918)
  and [setAttribute](https://github.com/antlr/stringtemplate3/blob/e60b23544539d64d2f57a87e87a5b383cc2b0ba9/src/org/antlr/stringtemplate/StringTemplate.java#L570)
  for details,

  Stringtemplate4 removed the `setAttributes` method, so I had to write a
  custom function to handle the '.' characters in the properties.
@MaT1g3R
Copy link
Author

MaT1g3R commented Apr 10, 2020

@juanpedromoreno I made a PR upstream to update stringtemplate version, hopefully it will get merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants