nguyennhutkhanh / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Maven dependency issue for 2.3 - Invalid JDK version in profile 'doclint-java8-disable' #596

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use gson 2.3 as maven dependency
2. include that project as a dependency in another project
3. use IntelliJ

Unable to get dependency information: Unable to read the metadata file for 
artifact 'com.google.code.gson:gson:jar': 
Invalid JDK version in profile 'doclint-java8-disable': Unbounded range: [1.8, 
for project com.google.code.gson:gson
  com.google.code.gson:gson:jar:2.3

Looks to me that it is a maven setup issue, as the issue was noted/discovered 
in a maven library.

What is the expected output? What do you see instead?
Maven itself works fine - i.e. ignores the issue.
IntelliJ bombs out (yes it's their problem, but you are the cause)

What version of the product are you using? On what operating system?
2.3

Please provide any additional information below.

-----
Path to dependency: 
    1) com.bizfabrik:xcompiere:war:1.0-SNAPSHOT
    2) com.bizfabrik:biz-base:jar:1.0-SNAPSHOT

java.lang.RuntimeException: 
org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get 
dependency information: Unable to read the metadata file for artifact 
'com.google.code.gson:gson:jar': Invalid JDK version in profile 
'doclint-java8-disable': Unbounded range: [1.8, for project 
com.google.code.gson:gson
  com.google.code.gson:gson:jar:2.3

from the specified remote repositories:
  public (http://rep.bizfabrik.com/nexus/content/groups/public),
  central (http://repo1.maven.org/maven2),
  releases (http://rep.bizfabrik.com/nexus/content/repositories/releases),
  splunk-release (http://splunk.artifactoryonline.com/splunk/ext-releases-local),
  snapshots (http://rep.bizfabrik.com/nexus/content/repositories/snapshots),
  audaxis-snapshots (http://support.audaxis.com/m2-snapshots)

Path to dependency: 
    1) com.bizfabrik:xcompiere:war:1.0-SNAPSHOT
    2) com.bizfabrik:biz-base:jar:1.0-SNAPSHOT

    at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:430)
    at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
    at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:74)
    at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:316)
    at org.jetbrains.maven.embedder.MavenEmbedder.resolveProject(MavenEmbedder.java:210)
    at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$2.execute(Maven2ServerEmbedderImpl.java:135)
    at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$2.execute(Maven2ServerEmbedderImpl.java:132)
    at org.jetbrains.idea.maven.server.embedder.Maven2ServerEmbedderImpl$6.run(Maven2ServerEmbedderImpl.java:532)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: 
org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Unable 
to read the metadata file for artifact 'com.google.code.gson:gson:jar': Invalid 
JDK version in profile 'doclint-java8-disable': Unbounded range: [1.8, for 
project com.google.code.gson:gson
    at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:200)
    at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedArtifact(MavenMetadataSource.java:94)
    at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:387)
    ... 12 more
Caused by: java.lang.RuntimeException: 
org.apache.maven.project.ProjectBuildingException: Invalid JDK version in 
profile 'doclint-java8-disable': Unbounded range: [1.8, for project 
com.google.code.gson:gson
    at org.apache.maven.project.DefaultMavenProjectBuilder.injectActiveProfiles(DefaultMavenProjectBuilder.java:1502)
    at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1194)
    at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
    at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
    at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163)
    ... 14 more
Caused by: java.lang.RuntimeException: 
org.apache.maven.profiles.activation.ProfileActivationException: Invalid JDK 
version in profile 'doclint-java8-disable': Unbounded range: [1.8,
    at org.apache.maven.profiles.activation.JdkPrefixProfileActivator.isActive(JdkPrefixProfileActivator.java:57)
    at org.apache.maven.profiles.DefaultProfileManager.isActive(DefaultProfileManager.java:273)
    at org.apache.maven.profiles.DefaultProfileManager.getActiveProfiles(DefaultProfileManager.java:209)
    at org.apache.maven.project.DefaultMavenProjectBuilder.injectActiveProfiles(DefaultMavenProjectBuilder.java:1496)
    ... 18 more

Original issue reported on code.google.com by jorg.ja...@accorto.com on 12 Sep 2014 at 11:36

GoogleCodeExporter commented 9 years ago
uups ... duplicate of 588

Original comment by jorg.ja...@accorto.com on 12 Sep 2014 at 11:50

GoogleCodeExporter commented 9 years ago
I am having the exact same issue with Maven 3.2.3, IntelliJ, and gson 2.3

Original comment by ryanlan...@gmail.com on 18 Sep 2014 at 2:00

GoogleCodeExporter commented 9 years ago
as quick fix open the pom file at your local repository and add ')' and should 
looks like

 91         <jdk>[1.8,)</jdk>

save and execute again

Original comment by arterza...@gmail.com on 25 Sep 2014 at 3:39

GoogleCodeExporter commented 9 years ago
Fixed in https://code.google.com/p/google-gson/source/detail?r=1300

Original comment by inder123 on 12 Nov 2014 at 11:25