Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip packaging #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ public abstract class AbstractJarMojo extends AbstractMojo {
@Parameter(property = "maven.jar.forceCreation", defaultValue = "false")
private boolean forceCreation;

/**
* Skip creating archives.
*/
@Parameter(property = "maven.jar.skipJar", defaultValue = "false")
private boolean skipJar;

/**
* Skip creating empty archives.
*/
Expand Down Expand Up @@ -286,6 +292,10 @@ public void execute() throws MojoExecutionException {
+ "Please see the >>Major Version Upgrade to version 3.0.0<< on the plugin site.");
}

if (skipJar) {
getLog().info("Skipping packaging ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to skip anything

}

if (skipIfEmpty
&& (!getClassesDirectory().exists() || getClassesDirectory().list().length < 1)) {
getLog().info("Skipping packaging of the " + getType());
Expand Down