I just started to use m2e to try to build the sample travellog elastic beanstalk project. On the console I'm getting "[ERROR] Project read error".
This also appears in red on the "Dependency Hierarchy" tab.
What does this mean and how do I find out more details?
Edit: Adding pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>BeanstalkTest</groupId>
<artifactId>BeanstalkTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>[1.0.007,)</version>
</dependency>
</dependencies>
</project>
Ok. So I think I figured it out.
In workspace\.metadata there are log files, e.g. .log mine has this entry:
!ENTRY org.eclipse.m2e.logback.appender 4 0 2012-05-28 18:50:44.641
!MESSAGE Project read error
You can look in:
Workspace\.metadata\.plugins\org.eclipse.m2e.logback.configuration
to find the log files for m2e, e.g., 0.log
These are pretty detailed and useful. Anyway, my log file has this entry:
2012-05-28 18:50:44,640 [Worker-52] ERROR o.e.m.editor.pom.DependencyTreePage - Project read error
org.eclipse.core.runtime.CoreException: Project read error
at org.eclipse.m2e.core.embedder.MavenModelManager.readDependencyTree(MavenModelManager.java:230) ~[na:na]
at org.eclipse.m2e.editor.pom.MavenPomEditor.readDependencyTree(MavenPomEditor.java:701) ~[na:na]
at org.eclipse.m2e.editor.pom.DependencyTreePage$1.run(DependencyTreePage.java:215) ~[na:na]
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [org.eclipse.core.jobs_3.5.101.v20120113-1953.jar:na]
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [com.amazonaws:aws-java-sdk:jar:[1.0.007,) (compile)]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:262) ~[na:na]
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:345) ~[na:na]
at org.eclipse.m2e.core.embedder.MavenModelManager.readDependencyTree(MavenModelManager.java:226) ~[na:na]
... 3 common frames omitted
Caused by: org.sonatype.aether.resolution.VersionRangeResolutionException: Failed to resolve version range for org.codehaus.jackson:jackson-mapper-asl:jar:[1.8.): Invalid version range [1.8.), single version must be surrounded by []
at org.apache.maven.repository.internal.DefaultVersionRangeResolver.resolveVersionRange(DefaultVersionRangeResolver.java:114) ~[na:na]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:378) ~[na:na]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:533) ~[na:na]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:243) ~[na:na]
... 5 common frames omitted
Caused by: org.sonatype.aether.version.InvalidVersionSpecificationException: Invalid version range [1.8.), single version must be surrounded by []
at org.sonatype.aether.util.version.GenericVersionRange.<init>(GenericVersionRange.java:84) ~[na:na]
at org.sonatype.aether.util.version.GenericVersionScheme.parseVersionRange(GenericVersionScheme.java:40) ~[na:na]
at org.sonatype.aether.util.version.GenericVersionScheme.parseVersionConstraint(GenericVersionScheme.java:66) ~[na:na]
at org.apache.maven.repository.internal.DefaultVersionRangeResolver.resolveVersionRange(DefaultVersionRangeResolver.java:109) ~[na:na]
... 8 common frames omitted
So, it appears that there is a problem with the definition for the aws-java-sdk dependencies. It specifies that the jackson-mapper-asl can be of version [1.8.) which appears to be invalid syntax.
If I modify the pom.xml to exclude that dependency it becomes:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>BeanstalkTest</groupId>
<artifactId>BeanstalkTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>[1.0.007,)</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
and this does not produce the "Project Read Error". So, basically two things:
Thanks Luca.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With