Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-735

excludes* are ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • resolve
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fbacchella Fabrice Bacchella
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: