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

[ARCHETYPE-649] work around warning 'Don't override file...' #160

Open
wants to merge 1 commit 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.
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 @@ -133,6 +133,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
archiver.setOutputFile(jarFile);

archiver.setArchiver((JarArchiver) archivers.get("jar"));
// Workaround for ARCHETYPE-649: after archetype plugin 3.1.2, the jar file contains entries for each directory,
// that conflict with the filesets in "archetype-metadata.xml". So force the archiver not to create jar entries
// for empty dirs. The same is done later on "DefaultFileSet".
archiver.getArchiver().setIncludeEmptyDirs(false);

// configure for Reproducible Builds based on outputTimestamp value
archiver.configureReproducible(outputTimestamp);
Expand All @@ -141,7 +145,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
DefaultFileSet fs = DefaultFileSet.fileSet(archetypeDirectory)
.prefixed("")
.includeExclude(null, null)
.includeEmptyDirs(true);
.includeEmptyDirs(false);
fs.setUsingDefaultExcludes(useDefaultExcludes);
archiver.getArchiver().addFileSet(fs);

Expand Down
Loading