sbegaudeau / AngularJS-Eclipse-Tools

AngularJS Eclipse Tools
14 stars 29 forks source link

Problem with maven building #5

Open MagnetonBora opened 11 years ago

MagnetonBora commented 11 years ago

Hi,

I'm using java jdk1.7 and maven 3.

After invoking "mvn clean verify" command I've got the following stack trace:

[INFO] Scanning for projects...

[WARNING] No explicit target runtime environment configuration. Build is platform dependent.

constituent[0]: file:/opt/apache-maven-3.1.0/lib/javax.inject-1.jar constituent[1]: file:/opt/apache-maven-3.1.0/lib/maven-settings-3.1.0.jar constituent[2]: file:/opt/apache-maven-3.1.0/lib/maven-compat-3.1.0.jar constituent[3]: file:/opt/apache-maven-3.1.0/lib/plexus-sec-dispatcher-1.3.jar constituent[4]: file:/opt/apache-maven-3.1.0/lib/plexus-interpolation-1.16.jar constituent[5]: file:/opt/apache-maven-3.1.0/lib/jsr250-api-1.0.jar constituent[6]: file:/opt/apache-maven-3.1.0/lib/maven-model-3.1.0.jar constituent[7]: file:/opt/apache-maven-3.1.0/lib/maven-plugin-api-3.1.0.jar constituent[8]: file:/opt/apache-maven-3.1.0/lib/maven-repository-metadata-3.1.0.jar constituent[9]: file:/opt/apache-maven-3.1.0/lib/jsr305-1.3.9.jar constituent[10]: file:/opt/apache-maven-3.1.0/lib/wagon-file-2.4.jar constituent[11]: file:/opt/apache-maven-3.1.0/lib/plexus-cipher-1.7.jar constituent[12]: file:/opt/apache-maven-3.1.0/lib/aopalliance-1.0.jar constituent[13]: file:/opt/apache-maven-3.1.0/lib/maven-aether-provider-3.1.0.jar constituent[14]: file:/opt/apache-maven-3.1.0/lib/wagon-provider-api-2.4.jar constituent[15]: file:/opt/apache-maven-3.1.0/lib/maven-model-builder-3.1.0.jar constituent[16]: file:/opt/apache-maven-3.1.0/lib/aether-util-0.9.0.M2.jar constituent[17]: file:/opt/apache-maven-3.1.0/lib/cdi-api-1.0.jar constituent[18]: file:/opt/apache-maven-3.1.0/lib/aether-spi-0.9.0.M2.jar constituent[19]: file:/opt/apache-maven-3.1.0/lib/aether-impl-0.9.0.M2.jar constituent[20]: file:/opt/apache-maven-3.1.0/lib/slf4j-api-1.7.4.jar constituent[21]: file:/opt/apache-maven-3.1.0/lib/aether-api-0.9.0.M2.jar constituent[22]: file:/opt/apache-maven-3.1.0/lib/wagon-http-2.4-shaded.jar constituent[23]: file:/opt/apache-maven-3.1.0/lib/asm-3.3.1.jar constituent[24]: file:/opt/apache-maven-3.1.0/lib/guava-11.0.2.jar constituent[25]: file:/opt/apache-maven-3.1.0/lib/plexus-utils-3.0.10.jar constituent[26]: file:/opt/apache-maven-3.1.0/lib/commons-cli-1.2.jar constituent[27]: file:/opt/apache-maven-3.1.0/lib/maven-artifact-3.1.0.jar constituent[28]: file:/opt/apache-maven-3.1.0/lib/sisu-guice-3.1.3-no_aop.jar constituent[29]: file:/opt/apache-maven-3.1.0/lib/maven-settings-builder-3.1.0.jar constituent[30]: file:/opt/apache-maven-3.1.0/lib/org.eclipse.sisu.inject-0.0.0.M2a.jar constituent[31]: file:/opt/apache-maven-3.1.0/lib/maven-core-3.1.0.jar constituent[32]: file:/opt/apache-maven-3.1.0/lib/aether-connector-wagon-0.9.0.M2.jar constituent[33]: file:/opt/apache-maven-3.1.0/lib/org.eclipse.sisu.plexus-0.0.0.M2a.jar constituent[34]: file:/opt/apache-maven-3.1.0/lib/plexus-component-annotations-1.5.5.jar constituent[35]: file:/opt/apache-maven-3.1.0/lib/maven-embedder-3.1.0.jar constituent[36]: file:/opt/apache-maven-3.1.0/lib/slf4j-simple-1.7.4.jar

constituent[37]: file:/opt/apache-maven-3.1.0/conf/logging/

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession; at org.eclipse.tycho.core.maven.utils.PluginRealmHelper.execute(PluginRealmHelper.java:92) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.getDependencyMetadata(P2TargetPlatformResolver.java:144) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:126) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:87) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)

sbegaudeau commented 11 years ago

Hi,

The issue is coming from the use of Maven 3.1.0 with an "old" version of Tycho:

Known Incompatibilities with Maven 3.0.x

The significant change in Eclipse Aether with respect to API changes and package relocation will likely cause issues with plugins that directly depend on Aether. We are aware of the issues in the Maven Site Plugin, the Maven Dependency Plugin, the Maven Shade Plugin and the Maven Project Info Reports Plugin, and have fixed them in recent releases. But this is a significant change and is likely to cause issues in any plugin that depends on the now deprecated Sonatype Aether. In the external plugin ecosystem, it is known that Tycho, the Android Maven Plugin and the NetBeans Module Plugin are also affected: the plugin developers are aware of this issue and will release a new version of the plugin to address it.

We maintain a list of affected plugins with fixed version: please report if you find another plugin not yet in this list.

http://maven.apache.org/docs/3.1.0/release-notes.html

You can update your Tycho to the version 0.18.1. I will update the reference to Tycho in the build once I will have tested it completely.

Regards,

Stéphane Bégaudeau

TobseTobse commented 10 years ago

For all noobs like me: what Stéphane want to point out is...

cd AngularJS-Eclipse-Tools-master/releng/org.obeonetwork.angularjs.eclipse.tools.releng/

edit pom.xml, search for "tycho" and change version to 0.18.1

mvn clean verify