gregorycallea opened a new pull request #3: Skip specified attached artifacts 
from deploy
URL: https://github.com/apache/maven-deploy-plugin/pull/3
 
 
   Suppose you have differents artifacts attached on a single Maven module. For 
example:
   
   - a shaded jar created using the "maven-shade-plugin" with 
"shadedArtifactAttached" attribute set to true
   - a generic jar attached using the "build-helper-maven-plugin" plugin
   
   I've worked on my fork project in order to allow to specify artifacts to 
skip deploy for.
   Here the usage example:
   
        <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-deploy-plugin</artifactId>
              <version>3.0.3-SNAPSHOT</version>
              <configuration>
                <skipAttachedArtifacts>
                  <artifact>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>${project.artifactId}</artifactId>
                    <version>${project.version}</version>
                    <packaging>jar</packaging>
                    <classifier>shaded</classifier>
                  </artifact>
                  <artifact>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>${project.artifactId}</artifactId>
                    <version>${project.version}</version>
                    <packaging>zip</packaging>
                  </artifact>
                </skipAttachedArtifacts>
              </configuration>
       </plugin>
   
   Implementing feature I took care of:
   - write documentation
   - to create two dedicated asserted junit tests on DeployMojoTest.
   - to respect code styles according to constraints provided
   - to test build on my use case scenario
   
   As result you will have the following output during execution:
   
   [INFO] 
   [INFO] --- maven-deploy-plugin:3.0.3-SNAPSHOT:deploy (default-deploy) @ 
cc-manager4j ---
   [INFO] Skipping artifact 
[com.group.test:test-artifact:jar:shaded:1.0-SNAPSHOT]
   
   If attached artifact to skip doesn't exists the plugin will fail the 
execution:
   
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-deploy-plugin:3.0.3-SNAPSHOT:deploy 
(default-deploy) on project cc-manager4j: No attached artifact 
com.group.test:test-artifact:zip:shaded:1.0-SNAPSHOT to exclude from deploy 
found -> [Help 1]
   [ERROR] 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to