You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2016/03/07 09:47:40 UTC

[jira] [Comment Edited] (MRESOURCES-190) Regression: The plugin is now silently ignoring .gitignore files.

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

Karl Heinz Marbaise edited comment on MRESOURCES-190 at 3/7/16 8:47 AM:
------------------------------------------------------------------------

The contain the following:  
{code}
  /**
+     * By default files like {@code .gitignore}, {@code .cvsignore} etc. are excluded which means they will not being
+     * copied. If you need them for a particular reason you can do that by settings this to {@code false}. This means
+     * all files like the following will be copied.
+     * <ul>
+     * <li>Misc: &#42;&#42;/&#42;~, &#42;&#42;/#&#42;#, &#42;&#42;/.#&#42;, &#42;&#42;/%&#42;%, &#42;&#42;/._&#42;</li>
+     * <li>CVS: &#42;&#42;/CVS, &#42;&#42;/CVS/&#42;&#42;, &#42;&#42;/.cvsignore</li>
+     * <li>RCS: &#42;&#42;/RCS, &#42;&#42;/RCS/&#42;&#42;</li>
+     * <li>SCCS: &#42;&#42;/SCCS, &#42;&#42;/SCCS/&#42;&#42;</li>
+     * <li>VSSercer: &#42;&#42;/vssver.scc</li>
+     * <li>MKS: &#42;&#42;/project.pj</li>
+     * <li>SVN: &#42;&#42;/.svn, &#42;&#42;/.svn/&#42;&#42;</li>
+     * <li>GNU: &#42;&#42;/.arch-ids, &#42;&#42;/.arch-ids/&#42;&#42;</li>
+     * <li>Bazaar: &#42;&#42;/.bzr, &#42;&#42;/.bzr/&#42;&#42;</li>
+     * <li>SurroundSCM: &#42;&#42;/.MySCMServerInfo</li>
+     * <li>Mac: &#42;&#42;/.DS_Store</li>
+     * <li>Serena Dimension: &#42;&#42;/.metadata, &#42;&#42;/.metadata/&#42;&#42;</li>
+     * <li>Mercurial: &#42;&#42;/.hg, &#42;&#42;/.hg/&#42;&#42;</li>
+     * <li>GIT: &#42;&#42;/.git, &#42;&#42;/.gitignore, &#42;&#42;/.gitattributes, &#42;&#42;/.git/&#42;&#42;</li>
+     * <li>Bitkeeper: &#42;&#42;/BitKeeper, &#42;&#42;/BitKeeper/&#42;&#42;, &#42;&#42;/ChangeSet,
+     * &#42;&#42;/ChangeSet/&#42;&#42;</li>
+     * <li>Darcs: &#42;&#42;/_darcs, &#42;&#42;/_darcs/&#42;&#42;, &#42;&#42;/.darcsrepo,
+     * &#42;&#42;/.darcsrepo/&#42;&#42;&#42;&#42;/-darcs-backup&#42;, &#42;&#42;/.darcs-temp-mail
+     * </ul>
+     *
+     * @since 3.0.0
{code}
Apart from that your assumption is partially not correct (See above list). maven-filtering component contained a default call to addDefaultExcludes which always excluded the above list. 
I need to add {{.hgignore}} to plexus...


was (Author: khmarbaise):
The contain the following:  
{code}
  /**
+     * By default files like {@code .gitignore}, {@code .cvsignore} etc. are excluded which means they will not being
+     * copied. If you need them for a particular reason you can do that by settings this to {@code false}. This means
+     * all files like the following will be copied.
+     * <ul>
+     * <li>Misc: &#42;&#42;/&#42;~, &#42;&#42;/#&#42;#, &#42;&#42;/.#&#42;, &#42;&#42;/%&#42;%, &#42;&#42;/._&#42;</li>
+     * <li>CVS: &#42;&#42;/CVS, &#42;&#42;/CVS/&#42;&#42;, &#42;&#42;/.cvsignore</li>
+     * <li>RCS: &#42;&#42;/RCS, &#42;&#42;/RCS/&#42;&#42;</li>
+     * <li>SCCS: &#42;&#42;/SCCS, &#42;&#42;/SCCS/&#42;&#42;</li>
+     * <li>VSSercer: &#42;&#42;/vssver.scc</li>
+     * <li>MKS: &#42;&#42;/project.pj</li>
+     * <li>SVN: &#42;&#42;/.svn, &#42;&#42;/.svn/&#42;&#42;</li>
+     * <li>GNU: &#42;&#42;/.arch-ids, &#42;&#42;/.arch-ids/&#42;&#42;</li>
+     * <li>Bazaar: &#42;&#42;/.bzr, &#42;&#42;/.bzr/&#42;&#42;</li>
+     * <li>SurroundSCM: &#42;&#42;/.MySCMServerInfo</li>
+     * <li>Mac: &#42;&#42;/.DS_Store</li>
+     * <li>Serena Dimension: &#42;&#42;/.metadata, &#42;&#42;/.metadata/&#42;&#42;</li>
+     * <li>Mercurial: &#42;&#42;/.hg, &#42;&#42;/.hg/&#42;&#42;</li>
+     * <li>GIT: &#42;&#42;/.git, &#42;&#42;/.gitignore, &#42;&#42;/.gitattributes, &#42;&#42;/.git/&#42;&#42;</li>
+     * <li>Bitkeeper: &#42;&#42;/BitKeeper, &#42;&#42;/BitKeeper/&#42;&#42;, &#42;&#42;/ChangeSet,
+     * &#42;&#42;/ChangeSet/&#42;&#42;</li>
+     * <li>Darcs: &#42;&#42;/_darcs, &#42;&#42;/_darcs/&#42;&#42;, &#42;&#42;/.darcsrepo,
+     * &#42;&#42;/.darcsrepo/&#42;&#42;&#42;&#42;/-darcs-backup&#42;, &#42;&#42;/.darcs-temp-mail
+     * </ul>
+     *
+     * @since 3.0.0
{code}
Apart from that your assumption is not correct (See above list). maven-filtering component contained a default call to addDefaultExcludes which always excluded the above list. 

> Regression: The plugin is now silently ignoring .gitignore files.
> -----------------------------------------------------------------
>
>                 Key: MRESOURCES-190
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-190
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Apache Maven 3.0.5
> Java version: 1.7.0_67, vendor: Oracle Corporation
> OS name: "linux" arch: "amd64", family: "unix"
>            Reporter: Josue Abarca
>            Assignee: Karl Heinz Marbaise
>             Fix For: 3.0.0
>
>
> Hi, I have a custom archetype that includes a ".gitignore" file in the generated projects.
> Since the change to Maven Resources Plugin 2.7, it seems that now it is silently excluding the ".gitignore" files.
> If I change the pom to use the 2.6 version it works as expected.
> I looked in the changelog for 2.7 and I can not find any note about it, so it seems like a regression.
> In the archetype-metadata.xml I have:
> <fileSet filtered="false" encoding="UTF-8">
>       <directory></directory>
>       <includes>
>         <include>.gitignore</include>
>       </includes>
> </fileSet>
> Here you can find an example project, that I am using for testing:
> https://github.com/jmaslibre/my-app-archetype
> Steps to reproduce:
> - Compile and install the archetype
> mvn clean install
> - Generate a project with the archetype
> cd ..
> mvn archetype:generate -DarchetypeGroupId=com.mycompany.app -DarchetypeArtifactId=my-app-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=customGroup -DartifactId=customproject -DinteractiveMode=false
> (unexpected) Current result :
> ls -a customproject/.gitignore
> ls: cannot access customproject/.gitignore: No such file or directory
> Expected result:
> ls -a customproject/.gitignore
> customproject/.gitignore
> Using:
> Apache Maven 3.0.5
> Java version: 1.7.0_67, vendor: Oracle Corporation
> OS name: "linux" arch: "amd64", family: "unix"
> If you need more information just let me know.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)