You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:01 UTC

[jira] [Updated] (MNG-7515) Cannot see a dependency tree for apache-maven module

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

Guillaume Nodet updated MNG-7515:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> Cannot see a dependency tree for apache-maven module
> ----------------------------------------------------
>
>                 Key: MNG-7515
>                 URL: https://issues.apache.org/jira/browse/MNG-7515
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.8.6
>            Reporter: Rafael Chaves
>            Assignee: Michael Osipov
>            Priority: Minor
>             Fix For: 3.9.0, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> The {{apache-maven}} module configures maven-dependency-plugin under the {{<plugin>}} element, which prevents that plug-in from being used with custom configuration from the command-line.
>  
> {noformat}
> mvn org.apache.maven.plugins:maven-dependency-plugin:3.3.0:list -f apache-maven 
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] -------------------< org.apache.maven:apache-maven >--------------------
> [INFO] Building Apache Maven Distribution 3.6.3
> [INFO] --------------------------------[ pom ]---------------------------------
> [INFO] 
> [INFO] --- maven-dependency-plugin:3.3.0:list (default-cli) @ apache-maven ---
> [INFO] 
> [INFO] The following files have been resolved:
> [INFO]    org.fusesource.jansi:jansi:jar:1.17.1:compile -- module jansi (auto)
> [INFO] 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  0.483 s
> [INFO] Finished at: 2022-07-14T16:55:57-03:00
> [INFO] ------------------------------------------------------------------------{noformat}
> The `dependency:tree` goal under debug mode shows something interesting:
> {noformat}
> [DEBUG] + Filtering dependency tree by artifact include patterns: [META-INF/native/**]{noformat}
>  Turns out the apache-maven module configures the dependency plugin in a way that prevents it from being used from the command-line:
>  
> {noformat}
> <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <configuration>
>           <includeArtifactIds>jansi</includeArtifactIds>
>           <includes>META-INF/native/**</includes>
>         </configuration>
>         <executions>
>           <execution>
>             <id>unpack-jansi-native</id>
>             <goals>
>               <goal>unpack-dependencies</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>{noformat}
>  
>  Moving the configuration element to under the {{<execution>}} element avoids the issue:
> {noformat}
> mvn org.apache.maven.plugins:maven-dependency-plugin:3.3.0:list -f apache-maven  
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] -------------------< org.apache.maven:apache-maven >--------------------
> [INFO] Building Apache Maven Distribution 3.6.3
> [INFO] --------------------------------[ pom ]---------------------------------
> [INFO] 
> [INFO] --- maven-dependency-plugin:3.3.0:list (default-cli) @ apache-maven ---
> [INFO] 
> [INFO] The following files have been resolved:
> [INFO]    org.apache.maven:maven-embedder:jar:3.6.3:compile -- module maven.embedder (auto)
> [INFO]    org.apache.maven:maven-settings:jar:3.6.3:compile -- module maven.settings (auto)
> [INFO]    org.apache.maven:maven-settings-builder:jar:3.6.3:compile -- module maven.settings.builder (auto)
> [INFO]    org.apache.maven:maven-plugin-api:jar:3.6.3:compile -- module maven.plugin.api (auto)
> [INFO]    org.apache.maven:maven-model:jar:3.6.3:compile -- module maven.model (auto)
> [INFO]    org.apache.maven:maven-model-builder:jar:3.6.3:compile -- module maven.model.builder (auto)
> [INFO]    org.apache.maven:maven-builder-support:jar:3.6.3:compile -- module maven.builder.support (auto)
> [INFO]    org.apache.maven.resolver:maven-resolver-api:jar:1.4.1:compile -- module org.apache.maven.resolver [auto]
> [INFO]    org.apache.maven.resolver:maven-resolver-util:jar:1.4.1:compile -- module org.apache.maven.resolver.util [auto]
> [INFO]    org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile -- module maven.shared.utils (auto)
> [INFO]    commons-io:commons-io:jar:2.5:compile -- module commons.io (auto)
> [INFO]    com.google.inject:guice:jar:no_aop:4.2.1:compile -- module com.google.guice [auto]
> [INFO]    com.google.guava:guava:jar:25.1-android:compile -- module com.google.common [auto]
> [INFO]    javax.inject:javax.inject:jar:1:compile -- module javax.inject (auto)
> [INFO]    javax.annotation:jsr250-api:jar:1.0:compile -- module jsr250.api (auto)
> [INFO]    org.codehaus.plexus:plexus-utils:jar:3.2.1:compile -- module plexus.utils (auto)
> [INFO]    org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile -- module plexus.classworlds (auto)
> [INFO]    org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile -- module plexus.sec.dispatcher (auto)
> [INFO]    org.sonatype.plexus:plexus-cipher:jar:1.7:compile -- module plexus.cipher (auto)
> [INFO]    org.slf4j:slf4j-api:jar:1.7.29:compile -- module org.slf4j [auto]
> [INFO]    org.apache.commons:commons-lang3:jar:3.8.1:compile -- module org.apache.commons.lang3 [auto]
> [INFO]    org.apache.maven:maven-core:jar:3.6.3:compile -- module maven.core (auto)
> [INFO]    org.apache.maven:maven-repository-metadata:jar:3.6.3:compile -- module maven.repository.metadata (auto)
> [INFO]    org.apache.maven:maven-artifact:jar:3.6.3:compile -- module maven.artifact (auto)
> [INFO]    org.apache.maven:maven-resolver-provider:jar:3.6.3:compile -- module maven.resolver.provider (auto)
> [INFO]    org.apache.maven.resolver:maven-resolver-impl:jar:1.4.1:compile -- module org.apache.maven.resolver.impl [auto]
> [INFO]    org.apache.maven.resolver:maven-resolver-spi:jar:1.4.1:compile -- module org.apache.maven.resolver.spi [auto]
> [INFO]    org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile -- module org.eclipse.sisu.inject (auto)
> [INFO]    org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile -- module plexus.component.annotations (auto)
> [INFO]    org.apache.maven:maven-compat:jar:3.6.3:compile -- module maven.compat (auto)
> [INFO]    org.codehaus.plexus:plexus-interpolation:jar:1.25:compile -- module plexus.interpolation (auto)
> [INFO]    org.apache.maven.wagon:wagon-provider-api:jar:3.3.4:compile -- module wagon.provider.api (auto)
> [INFO]    org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4:compile -- module org.eclipse.sisu.plexus (auto)
> [INFO]    javax.enterprise:cdi-api:jar:1.0:compile -- module cdi.api (auto)
> [INFO]    commons-cli:commons-cli:jar:1.4:compile -- module commons.cli (auto)
> [INFO]    org.apache.maven.wagon:wagon-http:jar:shaded:3.3.4:compile -- module wagon.http (auto)
> [INFO]    org.jsoup:jsoup:jar:1.12.1:runtime -- module org.jsoup [auto]
> [INFO]    org.slf4j:jcl-over-slf4j:jar:1.7.29:runtime -- module org.apache.commons.logging [auto]
> [INFO]    org.apache.maven.wagon:wagon-file:jar:3.3.4:compile -- module wagon.file (auto)
> [INFO]    org.apache.maven.resolver:maven-resolver-connector-basic:jar:1.4.1:compile -- module org.apache.maven.resolver.connector.basic [auto]
> [INFO]    org.apache.maven.resolver:maven-resolver-transport-wagon:jar:1.4.1:compile -- module org.apache.maven.resolver.transport.wagon [auto]
> [INFO]    org.apache.maven:maven-slf4j-provider:jar:3.6.3:compile -- module maven.slf4j.provider (auto)
> [INFO]    org.fusesource.jansi:jansi:jar:1.17.1:compile -- module jansi (auto)
> [INFO]    junit:junit:jar:4.12:test -- module junit (auto)
> [INFO]    org.hamcrest:hamcrest-core:jar:1.3:test -- module hamcrest.core (auto)
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)