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

maven wagon not found in 3.9.0-rc #350

Closed
SierraGolf opened this issue May 12, 2014 · 7 comments
Closed

maven wagon not found in 3.9.0-rc #350

SierraGolf opened this issue May 12, 2014 · 7 comments

Comments

@SierraGolf
Copy link
Contributor

The code changes around the newly introduced ClasspathModifierLifecycleParticipant introduces a build error to projects using wagon extensions.

Stacktrace:

org.apache.maven.MavenExecutionException: Could not resolve dependencies for com.simpligility.android.tictactoe:tictactoe-app:apk:1.0.0-SNAPSHOT
    at com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant.getProjectsArtifacts(AarMavenLifecycleParticipant.java:115)
    at com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant.afterProjectsRead(AarMavenLifecycleParticipant.java:76)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:271)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    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:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not resolve dependencies for com.viewpagerindicator:viewpagerindicator:apklib:2.4.2-SNAPSHOT
    at com.jayway.maven.plugins.android.common.DependencyResolver.getDependenciesFor(DependencyResolver.java:109)
    at com.jayway.maven.plugins.android.common.DependencyResolver.getDependenciesFor(DependencyResolver.java:119)
    at com.jayway.maven.plugins.android.common.DependencyResolver.getDependenciesFor(DependencyResolver.java:68)
    at com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant.getProjectsArtifacts(AarMavenLifecycleParticipant.java:111)
    ... 14 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.viewpagerindicator:viewpagerindicator:apklib:2.4.2-SNAPSHOT
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:335)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:288)
    at com.jayway.maven.plugins.android.common.DependencyResolver.getDependenciesFor(DependencyResolver.java:105)
    ... 17 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.viewpagerindicator:viewpagerindicator:pom:2.4.2-SNAPSHOT from/to codereligion-mvn-repository-snapshots (s3://codereligion-mvn-repository/snapshots): No connector available to access repository codereligion-mvn-repository-snapshots (s3://codereligion-mvn-repository/snapshots) of type default using the available factories WagonRepositoryConnectorFactory, WagonRepositoryConnectorFactory
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
    ... 20 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.viewpagerindicator:viewpagerindicator:pom:2.4.2-SNAPSHOT from/to codereligion-mvn-repository-snapshots (s3://codereligion-mvn-repository/snapshots): No connector available to access repository codereligion-mvn-repository-snapshots (s3://codereligion-mvn-repository/snapshots) of type default using the available factories WagonRepositoryConnectorFactory, WagonRepositoryConnectorFactory
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:546)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436)
    ... 23 more
Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: No connector available to access repository codereligion-mvn-repository-snapshots (s3://codereligion-mvn-repository/snapshots) of type default using the available factories WagonRepositoryConnectorFactory, WagonRepositoryConnectorFactory
    at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:193)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:531)
    ... 24 more

The following clone of the samples illustrates the problem with the 3.9.0 rc.

Steps to reproduce:

  • checkout and build the most recent version of the 3.9.0 rc
  • checkout https://github.com/SierraGolf/maven-android-plugin-samples/tree/sierragolf/apklib-wagon-problem
  • make sure the samples use the version of the 3.9.0 rc you want to test (currently it is set to 3.9.0-SNAPSHOT)
  • run rm -r ~/.m2/repository/com/viewpagerindicator (remove of local apklib)
  • run mvn clean install -Daws.accessKeyId=AKIAJSGSWCG4CN33PJNQ -Daws.secretKey=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 in the tictactoe project

A little background on the above:

  • I added an old version of the view pager indicator as a dependency to the tictactoe project
  • I added the s3 wagon as a build extension to the tictactoe project
  • I added a temporary s3 test bucket as snapshot repository to the tictactoe project

The above mentioned steps work with the maven-android-plugin in version 3.8.2 but not in version 3.9.0-rc.

@william-ferguson-au
Copy link
Contributor

I have created a project https://github.com/william-ferguson-au/example-resolution-plugin that highlights the issue in some detail and have requested help on the maven-dev list.

s3wagon dep can be resolved naturally, explicitly within a Mojo, but not during MavenLifeCycleParticipant#afterProjectsRead.

@SierraGolf
Copy link
Contributor Author

cool, so may I remove my temporary example stuff then?

@william-ferguson-au
Copy link
Contributor

Sure, but leave access to the s3 bucket as that I what I am using in my example.

@william-ferguson-au
Copy link
Contributor

Fixed by #361
SierraGolf any chance you can test? nb you will need to build maven-dependency-tree

@SierraGolf
Copy link
Contributor Author

does it work with the test project?

@william-ferguson-au
Copy link
Contributor

Sorry HOLD. While the solution works for https://github.com/william-ferguson-au/example-resolution-plugin there is some other problem with android-maven-plugin.

@mosabua
Copy link
Member

mosabua commented May 27, 2014

Fix merged

@mosabua mosabua closed this as completed May 27, 2014
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