kerasking / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

IntelliJ reporting error parsing POM using version 3.8.3+ #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create or open an android project in (IntelliJ that use 
android-maven-plugin-3.8.3+

What is the expected output?
That the POM is parsed and all build facets are configured.

What do you see instead?
Error message from IntelliJ saying that it couldn't parse the POM.

What version of maven-android-plugin are you using?
3.8.3, 3.9.0-rc.1

What are the complete output lines of "mvn -version" on your machine?
3.2.1

Please use labels and text to provide additional information.
Full details at the IntelliJ bug report below, but the correct error is:

{code}
1 error
java.lang.RuntimeException: com.google.inject.ProvisionException: Guice 
provision errors:

1) No implementation for org.eclipse.aether.impl.VersionResolver was bound.
  while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@39172e08]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@39172e08]
  while locating org.eclipse.aether.RepositorySystem
  while locating com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@39172e08]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@39172e08]
  while locating org.apache.maven.AbstractMavenLifecycleParticipant annotated with @com.google.inject.name.Named(value=AarMavenLifecycleListener)
{code}

It is possible/probable that this is a fault entirely within IntelliJ. likely 
caused by them using a pre Maven 3.1.0 core which relies upon Sonatype Aether 
instead of Eclipse Aether.

As such I have raised an issue with them 
http://youtrack.jetbrains.com/issue/IDEA-121136#comment=27-683559

But it is also possible that the config for the AarMavenLifeCycleParticipant is 
not 100% correct (cannot find any doco explaining exactly how or where it 
should be configured - pointers gratefully accepted).

Original issue reported on code.google.com by william....@xandar.com.au on 26 Feb 2014 at 12:28

GoogleCodeExporter commented 9 years ago
It appears that is is caused by IntelliJ using a version of Maven-core pre 3.1
As clearly outlined by Stuart McCulloch on the Maven-Users list in the thread 
titled 
"Guice provision error with AbstractMavenLifecycleParticipant"

We either need to rewrite using the depdendency:tree classes or push IntelliJ 
to upgrade to using Maven-Core 3.1

Original comment by william....@xandar.com.au on 3 Mar 2014 at 11:10

GoogleCodeExporter commented 9 years ago
This is an absolute blocker for me.

IntelliJ cannot parse the POM at all so new dependencies aren't added to the 
IDE dependency graph.

I am digging into whether we can use the dependency-tree component to abstract 
us from whether it is a Maven 3.1+ or previous environment. But this means 
removing all dependnencies and references to Aether.

Original comment by william....@xandar.com.au on 7 Mar 2014 at 11:39

GoogleCodeExporter commented 9 years ago
Submitted pull request #305

Original comment by william....@xandar.com.au on 10 Mar 2014 at 11:43

GoogleCodeExporter commented 9 years ago
Resolved in pull request #305

Original comment by william....@xandar.com.au on 22 Mar 2014 at 1:09