Hi,

no one and idea ?

Kind regards
Karl Heinz


On 7/17/16 11:46 AM, Karl Heinz Marbaise wrote:
Hi,

so after I found the issue related to reactor order (MNG-6057) (Thanks
Robert for the tip which brought me to right direction) now I'm diving
more into the problem related to the resolution of the artifacts which I
have described related to maven-assembly-plugin after more testing I
have found that it seemed to be related to the following line of code:


@Requirement
private RepositorySystem resolver;
...

And the following line is the culprit (transition to Maven Core):

result = resolver.resolve( req );

The request in maven-assembly-plugin seemed to be filled with the
correct data:
        final MavenProject project = configSource.getProject();

        ArtifactResolutionRequest req = new ArtifactResolutionRequest();
        req.setLocalRepository( configSource.getLocalRepository() );
        req.setResolveRoot( false );
        req.setRemoteRepositories( repos );
        req.setResolveTransitively( true );
        req.setArtifact( project.getArtifact() );
        req.setArtifactDependencies( dependencyArtifacts );
        req.setManagedVersionMap( project.getManagedVersionMap() );
        req.setCollectionFilter( filter );
        req.setOffline( configSource.getMavenSession().isOffline() );
        req.setForceUpdate(
configSource.getMavenSession().getRequest().isUpdateSnapshots() );
        req.setServers(
configSource.getMavenSession().getRequest().getServers() );
        req.setMirrors(
configSource.getMavenSession().getRequest().getMirrors() );
        req.setProxies(
configSource.getMavenSession().getRequest().getProxies() );

And non of the above data does contain the wrong versions
(1.7.2-SNAPSHOT), but I get always errors like this:

[DEBUG] Could not find metadata
com.soebes.examples.j2ee:service-client:1.7.2-SNAPSHOT/maven-metadata.xml in
local (/Users/kama/.m2/repository)
[WARNING] Missing POM for
com.soebes.examples.j2ee:service-client:jar:1.7.2-SNAPSHOT: Error
resolving project artifact: Could not find artifact
com.soebes.examples.j2ee:service-client:pom:1.7.2-SNAPSHOT for project
com.soebes.examples.j2ee:service-client:pom:1.7.2-SNAPSHOT
[DEBUG] Could not find metadata
com.soebes.examples.j2ee:webgui:1.7.2-SNAPSHOT/maven-metadata.xml in
local (/Users/kama/.m2/repository)


What I can't explain where those wrong version numbers are coming from?
Is there a kind of cache involved which contains this versions ? Where
is this defined? Can I clean it ? (RepositorySystem)

At the moment I'm convinced that it is a Maven core issue.

The RepositorySystem is an interface where two implementation
exist:LegacyRepositorySystem and TestMavenRepositorySystem.

So LegacyRepositorySystem contains an appropriate implementation of:

    public ArtifactResolutionResult resolve( ArtifactResolutionRequest
request )


But I can't find a hint of where those wrong version numbers could come
from cause the ArtifactResolutionRequest contains the correct data ...


Anyone an idea? Hint ? Good questions?

Kind regards
Karl Heinz Marbaise


So this looks at the moment like an issue in Maven core...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to