.gitignore File not copied to JAR archetype - Workarounds?

There is currently an error in the maven-resources plugin that the .gitignore file is not copied to the JAR archetype. See this bug report.

A short and simple question: are there file traversal methods in the archetype?

Edit : setting maven-resources-plugin version to 2.6 does not solve my problem (e.g. mentioned here )

<build> <pluginManagement> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </plugin> </plugins> </pluginManagement> </build> 
+5
source share
1 answer

Now fixed a bug in the maven-resources plugin.

To include the .gitignore file, the maven-resources-plugin must be installed explicitly in the archetype pom.xml file with the addDefaultExcludes configuration addDefaultExcludes set to false :

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.0.2</version> <configuration> <addDefaultExcludes>false</addDefaultExcludes> </configuration> </plugin> 
+3
source

All Articles