maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucas Persson <lucas.pers...@oracle.com>
Subject maven-dependency-plugin uses target dir instead of artifacts from repository
Date Fri, 08 Apr 2011 07:28:46 GMT
Hi


I have some issues with the maven-dependency-plugin vers 2.2 under Maven3.

In one project I uses the plugin to unpack a sources artifact like this:
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-artifact-sources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>oracle.ucs.callcontrol</groupId>
                  <artifactId>callcontrolapi</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <overWrite>true</overWrite>
                </artifactItem>
              </artifactItems>
             
<outputDirectory>${project.build.directory}/unpack-sources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>


This works very well when doing e.g. 'mvn install'
But when runnning e.g. mvn pmd:pmd on the parent project (which also
builds the artifact that this project tries to unpack)
then the maven-dependency-plugin uses that project's target dir instead
taking the sources jar form the repository.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:unpack
(unpack-artifact-sources) on project javadoc: Error unpacking file: /ade/aime_sdp_924164/target/oracle.ucs.callcontrol/callcontrolapi/target/classes
to: /ade/aime_sdp_924164/target/oracle.sdp.tools/javadoc/target/unpack-sources


This is very strange.

Anyone with similar experience?

Thanks
Lucas


-- 
Oracle <http://www.oracle.com>
Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656
<tel:+46730946656>
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm

Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment

Mime
View raw message