Description
Since 3.2.0 (and plexus-archiver:4.2.2) JAR archive with archetype does not include .gitignore file, despite of fact that this file is located in archetype-resources directory.
In JarMojo Plexus' addDirectory(File) method is called.
archiver.getArchiver().addDirectory( archetypeDirectory );
This method does not configure default excludes, that are enabled by default.
@Override public void addDirectory( @Nonnull final File directory ) throws ArchiverException { addFileSet( fileSet( directory ).prefixed( "" ).includeExclude( null, null ).includeEmptyDirs( includeEmptyDirs ) ); }
setUsingDefaultExcludes method is not called on fileSet here.
Later on, this fileSet is used to create PlexusIoFileResourceCollection object. On this object, getResources method is called that uses Plexus' DirectoryScanner to find out all resources that should be included into final artifact. This scanner uses usingDefaultExcludes configuration and excludes among the others, .gitignore file.
I have not found any way to configure archetype-archiver to disable default excludes. In my opinion current behavior is a regression - custom .gitignore is useful feature in archetypes.
Attachments
Issue Links
- is duplicated by
-
ARCHETYPE-606 There is no way to include .gitignore files for the jar goal
- Closed
- links to