[
https://issues.apache.org/jira/browse/ARCHETYPE-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476937#comment-17476937
]
Brett E. Meyer commented on ARCHETYPE-606:
------------------------------------------
Hey [[email protected]], if it helps, I was bit by the same thing tonight. But
this line in the diff helped:
https://github.com/apache/maven-archetype/commit/5351651b33fde2cb046e2f103bbc6be3c38acbab#diff-0688c079bb77e1b385bfcc162e461397754653c8a8510607f7dba8882a7a24e2R63
Use the following:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<!-- needed to include .gitignore -->
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<!-- needed to include .gitignore -->
<useDefaultExcludes>false</useDefaultExcludes>
</configuration>
</plugin>
{code}
> There is no way to include .gitignore files for the jar goal
> ------------------------------------------------------------
>
> Key: ARCHETYPE-606
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-606
> Project: Maven Archetype
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.2.0
> Environment: CentOS 7 64bits, OpenJDK 11.0.7, Maven 3.6.3, Maven
> Archetype Plugin 3.2.0
> Reporter: Joël Royer
> Assignee: Robert Scholte
> Priority: Major
> Fix For: 3.2.1
>
>
> In a Maven archetype, I'm using the resource plugin to copy some files like a
> .gitignore template. But this file is not copied when I generate a project
> from this artefact.
> Here is my config for the resource plugin in my artefact:
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>3.1.0</version>
> <configuration>
> <!-- Required so that .gitignore gets included in archetypes -->
> <!-- See https://issues.apache.org/jira/browse/MRESOURCES-190 -->
> <addDefaultExcludes>false</addDefaultExcludes>
> </configuration>
> </plugin>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)