You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kamaldeep Tumkur (JIRA)" <ji...@codehaus.org> on 2013/09/17 08:10:52 UTC

[jira] (MDEP-430) Dependency plugin does not seem to respect profile specific copy goals

Kamaldeep Tumkur created MDEP-430:
-------------------------------------

             Summary: Dependency plugin does not seem to respect profile specific copy goals
                 Key: MDEP-430
                 URL: https://jira.codehaus.org/browse/MDEP-430
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: copy
    Affects Versions: 2.1
         Environment: Mac OSX Mountain Lion 10.8.4
            Reporter: Kamaldeep Tumkur


I am using the dependency plugin inside a swf type project that builds using Maven. Ant is currently being used to copy the target files to the destination directories, but my hope is to use the dependency plugin so that everything is included inside the POM.
Here's my rough POM structure:

<!-- Below build properties are listed outside of 'profile' since they are not supported inside a 'profile' tag. 
<build>
    <sourceDirectory>dir</sourceDirectory>
    <finalName>${project.name}</finalName>
</build>

<profiles>
<profile>
<id>profile1</id>
<build>
<plugins>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
   .
   <goal>copy</goal>
   .
  <configuration> ... </configuration>
  <outputDirectory>DIR1</outputDirectory>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>profile2</id>
<build>
<plugins>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
   .
   <goal>copy</goal>
   .
  <configuration> ... </configuration>
  <outputDirectory>DIR2</outputDirectory>
</plugin>
</plugins>
</build>
</profile>

</profiles>


What I am seeing:

When I run: 'mvn -U clean install -P profile1', the execution for profile1 proceeds and the files are copied to DIR1 as expected.

When I run: 'mvn -U clean install -P profile2', the execution for profile1 and profile2 both happen and the file meant to go into DIR2 is also copied into DIR1. This is undesirable.

Please let me know if any further details may be helpful here. Thanks for your time.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira