You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter Lamby (Jira)" <ji...@apache.org> on 2020/10/07 12:17:00 UTC

[jira] [Comment Edited] (ARCHETYPE-606) There is no way to include .gitignore files for the jar goal

    [ https://issues.apache.org/jira/browse/ARCHETYPE-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17209500#comment-17209500 ] 

Peter Lamby edited comment on ARCHETYPE-606 at 10/7/20, 12:16 PM:
------------------------------------------------------------------

The problem is when we pass the files/folders to plexus-archiver. The archiver defaults to exclude some standard files like `.gitignore`. It also does not seem to offer an api to change this behavior. We need to extend the API of plexus-archiver and then use it.

 

EDIT: Seems like Im mistaken. There is an API to allow this. addFileSet


was (Author: serra):
The problem is when we pass the files/folders to plexus-archiver. The archiver defaults to exclude some standard files like `.gitignore`. It also does not seem to offer an api to change this behavior. We need to extend the API of plexus-archiver and then use it.

> 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
>            Priority: Major
>
> 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.3.4#803005)