maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Ocke (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MCOMPILER-272) When annotationProcessorPaths has multiple entries, only the transitive dependencies of the first entry are added
Date Sat, 16 Jul 2016 11:27:20 GMT

     [ https://issues.apache.org/jira/browse/MCOMPILER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Ocke updated MCOMPILER-272:
----------------------------------
    Description: 
I have multiple path elements in annotationProcessorPaths. The expected result is, that all
of them together with their transitive dependencies are passed to javac as annotationprocessorpath
parameter.
However, when running maven in debug mode, I can see, that only for the first path element,
the transitive dependencies are passed to javac.

I have no easy example to reproduce yet, but I did some debugging:

In http://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-3.5.1/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?view=markup#l1378
 , the first artifact is set as the "main" artifact for the ArtifactResolutionRequest.  The
other artifacts are just added as "artifactDependencies".
After some more debugging into DefaultArtifactResolver, it seem to me, that only for this
root artifact, the transitive dependencies are resolved. The other artifacts are just added
without their dependencies. See also here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven/maven-compat/3.3.3/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java#442

  was:
I have multiple path elements in annotationProcessorPaths. The expected result is, that all
of them together with their transitive dependencies are passed to javac as annotationprocessorpath
parameter.
However, when running maven in debug mode, I can see, that only for the first path element,
the transitive dependencies are passed to javac.

I have no easy example to reproduce yet, but I did some debugging:

In http://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-3.5.1/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?view=markup#l1378
 , the first artifact is set as the "main" artifact for the ArtifactResolutionRequest.  The
other artifacts are just added as "artifactDependencies".
After some more debugging into DefaultArtifactResolver, it seem to me, that only for this
root artifact, the transitive dependencies are resolved. The other artifacts are just added
without their dependencies.
See also here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven/maven-compat/3.3.3/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java#442


> When annotationProcessorPaths has multiple entries, only the transitive dependencies
of the first entry are added
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-272
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-272
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5.1
>            Reporter: Stefan Ocke
>
> I have multiple path elements in annotationProcessorPaths. The expected result is, that
all of them together with their transitive dependencies are passed to javac as annotationprocessorpath
parameter.
> However, when running maven in debug mode, I can see, that only for the first path element,
the transitive dependencies are passed to javac.
> I have no easy example to reproduce yet, but I did some debugging:
> In http://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-3.5.1/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?view=markup#l1378
 , the first artifact is set as the "main" artifact for the ArtifactResolutionRequest.  The
other artifacts are just added as "artifactDependencies".
> After some more debugging into DefaultArtifactResolver, it seem to me, that only for
this root artifact, the transitive dependencies are resolved. The other artifacts are just
added without their dependencies. See also here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven/maven-compat/3.3.3/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java#442



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message