Skip to content

Commit

Permalink
Fix #133
Browse files Browse the repository at this point in the history
Adds an 'attachDistribution' parameter.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
  • Loading branch information
cescoffier committed Apr 6, 2014
1 parent a13a245 commit dc03cc3
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ public class BundlePackagerMojo extends AbstractWisdomWatcherMojo implements Con
@Parameter(defaultValue = "false")
private boolean disableDistributionPackaging;

/**
* If set to {@literal false}, the distribution is packaged but not attached to the project. As a consequence it
* will neither be installed in the local repository, nor deploy to remove repository.
*
* If {@link #disableDistributionPackaging} is set to {@literal true}, this parameter is meaningless.
*/
@Parameter(defaultValue = "true")
private boolean attachDistribution;

@Override
public void execute() throws MojoExecutionException {
try {
Expand Down Expand Up @@ -89,7 +98,9 @@ private void createApplicationDistribution() throws IOException {
archiver.setDestFile(distFile);
archiver.createArchive();

projectHelper.attachArtifact(project, "zip", distFile);
if (attachDistribution) {
projectHelper.attachArtifact(project, "zip", distFile);
}
}

@Override
Expand Down

0 comments on commit dc03cc3

Please sign in to comment.