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

Always uses the same classifier when defining the plugin more than one time

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Auto Closed
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: copy
    • Labels:
      None
    • Environment:
      Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
      Java version: 1.6.0_16
      Default locale: de_DE, platform encoding: Cp1252
      OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"

      Description

      I've got something like this, which is always executed:

       <build>
               <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-dependency-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>copy</id>
                              <phase>process-resources</phase>
                              <goals>
                                  <goal>copy</goal>
                              </goals>
                              <configuration>
                                  <artifactItems>
                                          <artifactItem>
                                          <groupId>documentation</groupId>
                                          <artifactId>user-manual</artifactId>
                                          <version>${manual.version}</version>
                                          <classifier>german</classifier>
                                          <type>pdf</type>
                                                                               </artifactItem>
                                      <artifactItem>
                                          <groupId>documentation</groupId>
                                          <artifactId>user-manual</artifactId>
                                          <version>${manual.version}</version>
                                          <classifier>english</classifier>
                                          <type>pdf</type>
                                         </artifactItem>
                                      <artifactItem>
                                          <groupId>documentation</groupId>
                                          <artifactId>administration-manual</artifactId>
                                          <version>${manual.version}</version>
                                          <classifier>german</classifier>
                                          <type>pdf</type>
                                      </artifactItem>
                                      <artifactItem>
                                          <groupId>documentation</groupId>
                                          <artifactId>administration-manual</artifactId>
                                          <version>${manual.version}</version>
                                          <classifier>english</classifier>
                                          <type>pdf</type>
                                      </artifactItem>
                                  </artifactItems>
                                  <outputDirectory>${project.build.directory}/downloads/documentation</outputDirectory>
                                  <overWriteReleases>false</overWriteReleases>
                                  <overWriteSnapshots>true</overWriteSnapshots>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
      
      ...
      </build>
      
      

      I've also defined a profile "development" where I want to copy some additional dependencies. When I configure the plugin like the version above Maven always appends a classifier "german" to all dependencies. This results in an error, that Maven is not able to resolve the dependencies from any repository. Also setting the classifier to empty using <classifier></classifier> doesn't help.

        Attachments

        1. mdep-287.zip
          3 kB
          Adrian Sutton

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adrian Adrian Sutton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: