Skip to content

Commit

Permalink
[ARCHETYPE-64] work around warning 'Don't override file...'
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangHG committed Nov 30, 2023
1 parent 2f216ae commit 506c016
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 506c016

Please sign in to comment.