Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
* This does not work when other plugins, like the maven-shade-plugin, are configured to post-process the JAR.
* This plugin can not detect the post-processing, and so leaves the post-processed JAR file in place.
* This can lead to failures when those plugins do not expect to find their own output as an input.
* Set this parameter to {@code true} to avoid these problems by forcing this plugin to recreate the JAR every time.
* Set this parameter to {@code true} to recreate the JAR every time.
* When {@link #skipIfEmpty} is {@code true} and the classes directory is empty, packaging is skipped even if
* {@code forceCreation} is true.
*
* <p>Starting with <b>3.0.0</b> the property has been renamed from {@code jar.forceCreation}
* to {@code maven.jar.forceCreation}.</p>
Expand All @@ -128,6 +130,8 @@

/**
* Skip creating empty archives.
* When {@code true}, packaging is skipped if the classes directory is empty, even if {@link #forceCreation} is also
* {@code true}.
*/
@Parameter(defaultValue = "false")
protected boolean skipIfEmpty;
Expand Down Expand Up @@ -282,7 +286,7 @@
getLog().warn("JAR will be empty - no content was marked for inclusion!");
}
} else {
archiver.getArchiver().addDirectory(contentDirectory.toFile(), getIncludes(), getExcludes());

Check warning on line 289 in src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-17-zulu 4.0.0-rc-6

addDirectory(java.io.File,java.lang.String[],java.lang.String[]) in org.codehaus.plexus.archiver.AbstractArchiver has been deprecated

Check warning on line 289 in src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java

View workflow job for this annotation

GitHub Actions / Verify / ubuntu-latest jdk-21-zulu 4.0.0-rc-6

addDirectory(java.io.File,java.lang.String[],java.lang.String[]) in org.codehaus.plexus.archiver.AbstractArchiver has been deprecated

Check warning on line 289 in src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java

View workflow job for this annotation

GitHub Actions / Verify / macos-latest jdk-17-zulu 4.0.0-rc-6

addDirectory(java.io.File,java.lang.String[],java.lang.String[]) in org.codehaus.plexus.archiver.AbstractArchiver has been deprecated

Check warning on line 289 in src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java

View workflow job for this annotation

GitHub Actions / Verify / macos-latest jdk-21-zulu 4.0.0-rc-6

addDirectory(java.io.File,java.lang.String[],java.lang.String[]) in org.codehaus.plexus.archiver.AbstractArchiver has been deprecated
}

archiver.createArchive(session, project, archive);
Expand Down
Loading