maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Ferguson <william.fergu...@xandar.com.au>
Subject Re: Wagon extensions not available from AbstractMavenLifecycleParticipant or maven-dependency-tree?
Date Sat, 17 May 2014 23:23:12 GMT
OK, I'm really hoping someone can provide some more insight on this as I
have reached my limit.

To make things clearer, I have created a project containing
integration-tests showing the failure that is causing us grief (external
wagon dependencies not being resolvable from within
MavenLifeCycleParticipant) and well as integration tests showing that that
same deps are resolvable either using the std Maven dep resolution or
explicit resolution from within a Mojo,

https://github.com/william-ferguson-au/example-resolution-plugin.

Could someone please have a look and help me work out how to get the
external wagon deps to resolve from the MLCP?

William


On Fri, May 16, 2014 at 1:22 AM, William Ferguson <
william.ferguson@xandar.com.au> wrote:

> No one on the user's list wanted to have a go at this. How about someone
> from the Dev list?
>
> William
>
>
> ---------- Forwarded message ----------
> From: William Ferguson <william.ferguson@xandar.com.au>
> Date: Mon, May 12, 2014 at 8:58 PM
> Subject: Wagon extensions not available from
> AbstractMavenLifecycleParticipant or maven-dependency-tree?
> To: Maven Users List <users@maven.apache.org>
>
>
> I have a MavenLifecycleParticipant in my plugin. It uses
> maven-dependency-tree to resolve some deps that we need to do extra
> processing on. It works fine if the deps are in the local repo.
>
> But if the s3 Wagon is defined in the project along with a dependency from
> the s3 bucket, then the following debug log shows that
> DependencyGraphBuilder of maven-dependency-tree can't resolve the s3 wagon,
> and the dependency is not resolved now or later in the build, so
> compilation fails.
>
> NB If I remove the MavenLifecycleParticipant then the dep is resolved via
> the S3 Wagon.
>
> Q1) When are the Wagons configured? Shouldn't it be prior to
> MavenLifecycleParticipant being called?
> Q2) How can I get the DependencyGraphBuilder to resolve the s3 artifact
> from within the MavenLifecycleParticipant?
>
>
> Here is the stacktrace:
>
> [DEBUG] Could not find metadata
> com.viewpagerindicator:viewpagerindicator:2.4.2-SNAPSHOT/maven-metadata.xml
> in local (D:\dev\maven-local-repository)
> [DEBUG] java.util.NoSuchElementException
>       role: org.apache.maven.wagon.Wagon
>   roleHint: s3
> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
> java.util.NoSuchElementException
>       role: org.apache.maven.wagon.Wagon
>   roleHint: s3
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:264)
>  at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
> at
> org.eclipse.aether.internal.connector.wagon.PlexusWagonProvider.lookup(PlexusWagonProvider.java:33)
>  at
> org.eclipse.aether.connector.wagon.WagonRepositoryConnector.lookupWagon(WagonRepositoryConnector.java:337)
> at
> org.eclipse.aether.connector.wagon.WagonRepositoryConnector.<init>(WagonRepositoryConnector.java:157)
>  at
> org.eclipse.aether.connector.wagon.WagonRepositoryConnectorFactory.newInstance(WagonRepositoryConnectorFactory.java:159)
> at
> org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:139)
>  at
> org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:613)
> at
> org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
>  at
> org.eclipse.aether.internal.impl.DefaultMetadataResolver$1.execute(DefaultMetadataResolver.java:540)
> at
> org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:395)
>  at
> org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:218)
> at
> org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:250)
>  at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:284)
> at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
>  at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:461)
> at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:261)
>  at
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:317)
> at
> org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:159)
>  at
> org.apache.maven.shared.dependency.graph.internal.Maven31DependencyGraphBuilder.resolveDependencies(Maven31DependencyGraphBuilder.java:113)
> at
> org.apache.maven.shared.dependency.graph.internal.Maven31DependencyGraphBuilder.buildDependencyGraph(Maven31DependencyGraphBuilder.java:99)
>  at
> org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:74)
> at
> com.jayway.maven.plugins.android.common.DependencyResolver.getProjectDependenciesFor(DependencyResolver.java:54)
>  at
> com.jayway.maven.plugins.android.phase_prebuild.ClasspathModifierLifecycleParticipant.afterProjectsRead(ClasspathModifierLifecycleParticipant.java:78)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
>  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
>  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: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)
>
>
> William
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message