You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter Kahn (JIRA)" <ji...@codehaus.org> on 2013/06/18 20:54:03 UTC

[jira] (MDEP-406) skip is ignored

    [ https://jira.codehaus.org/browse/MDEP-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=326954#comment-326954 ] 

Peter Kahn commented on MDEP-406:
---------------------------------

I think it is this as I too have this problem.   The skip setting in the configuration for at least the copy-dependencies mojo doesn't appear to work properly.  I would expect the skip xml below to skip the execution, but it does not.


h2. Goal
Conditionally execute copy-dependencies for specific modules in my project.  

h2. Approach
* Top level pom defines copy-dependency execution using property *skipIncludeCompileDeps* to control execution
* Top level pom sets *skipIncludeCompileDeps* to true
* Child poms will automatically skip execution unless they override property definition


h2. Root Pom
{code}
<properties>
  <skipIncludeCompileDeps>true</skipIncludeCompileDeps>
</properties>
....
      <build>
        <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-dependency-plugin</artifactId>
             <executions>
               <execution>
                 <id>ROOT POM: Gather Compile Dependencies For Scan</id>
                 <phase>validate</phase>
                 <goals>
                   <goal>copy-dependencies</goal>
                 </goals>
                 <configuration>
                    <skip>true</skip>
                    <includeScope>compile</includeScope>
                    <outputDirectory>${project.build.directory}/compileScopeDependencies</outputDirectory>
                 </configuration>
               </execution>
             </executions>
           </plugin>
        </plugins>
      </build>      
{code}

h2. Module Using common execution to gather deps
{code}
...
<properties>
  <skipIncludeCompileDeps>false</skipIncludeCompileDeps>
</properties>{code}

                
> skip is ignored
> ---------------
>
>                 Key: MDEP-406
>                 URL: https://jira.codehaus.org/browse/MDEP-406
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Maven 3.0.4, Dependency Plugin 2.7
>            Reporter: H.-C. Gürsoy
>
> I've a build there I've to skip dependency resolution.
> According to the 2.7 documentation, using the skip parameter should prevent from running the whole plugin execution.
> Call mvn with -Dmdep.skip=true or setting skip to true in the plugin configuration with 
> {code}
> 				<plugin>
> 					<groupId>org.apache.maven.plugins</groupId>
> 					<artifactId>maven-dependency-plugin</artifactId>
> 					<version>2.7</version>
> 					<configuration>
> 						<skip>true</skip>
> 					</configuration>
> 				</plugin>
> {code}
> is allways ignored.

--
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