Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.2
-
None
-
None
-
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/local/share/java/maven3
Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /opt/local/share/java/maven3 Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/jre Default locale: fr_FR, platform encoding: UTF-8 OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
Description
I need to ignore some dependencies in my project when doing dependency:resolve.
But I don't think excludes* settings are used in this goal.
I even try:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<excludeTypes>jar</excludeTypes>
</configuration>
</plugin>
It's indeed used, but it fails:
$ mvn dependency:resolve -X
[DEBUG] Goal: org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve (default-cli)
...
<excludeTypes default-value="">jar</excludeTypes>
...
[ERROR] Failed to execute goal on project jrds-log4j: Could not resolve dependencies for project fr.jrds:jrds-log4j:jar:2021.1: The following artifacts could not be resolved: fr.jrds:jrds-core:jar:2021.1, fr.jrds:jrds-core:jar:tests:2021.1: Could not find artifact fr.jrds:jrds-core:jar:2021.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
I download the code for the current release. If I look for excludeTypes in src/test/java, it's used only on classes TestCopyDependenciesMojo.java and TestUnpackDependenciesMojo.java. So I think it's not tested.