You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Imesh Gunaratne <im...@apache.org> on 2014/05/04 19:44:32 UTC

Is it possible to exclude .gitignore file from source package?

Hi All,

I'm trying to exclude the .gitignore file from the source package generated
with Maven source plugin while executing mvn release:perform, but it did
not work.

<plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                            <configuration>
                                <excludes>

<exclude>${project.build.directory}/**/*</exclude>
                                    <exclude>**/.gitignore</exclude>
                                    <exclude>**/.git/**/*</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

The pom.xml file could be found here:
https://github.com/apache/incubator-stratos/blob/4.0.0-incubating/pom.xml

Really appreciate any thoughts on this.

Thanks

-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: Is it possible to exclude .gitignore file from source package?

Posted by Mirko Friedenhagen <mf...@gmail.com>.
Imesh,

I wonder why you need this, in my usecases the .git directory and
.gitignore are at the same level as pom.xml, the source plugin will
only pick up stuff from src/main/java (and maybe
target/generated-sources/SOURCE_GENERATOR).

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Sun, May 4, 2014 at 7:44 PM, Imesh Gunaratne <im...@apache.org> wrote:
> Hi All,
>
> I'm trying to exclude the .gitignore file from the source package generated
> with Maven source plugin while executing mvn release:perform, but it did
> not work.
>
> <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-source-plugin</artifactId>
>                     <executions>
>                         <execution>
>                             <id>attach-sources</id>
>                             <phase>verify</phase>
>                             <goals>
>                                 <goal>jar-no-fork</goal>
>                             </goals>
>                             <configuration>
>                                 <excludes>
>
> <exclude>${project.build.directory}/**/*</exclude>
>                                     <exclude>**/.gitignore</exclude>
>                                     <exclude>**/.git/**/*</exclude>
>                                 </excludes>
>                             </configuration>
>                         </execution>
>                     </executions>
>                 </plugin>
>
> The pom.xml file could be found here:
> https://github.com/apache/incubator-stratos/blob/4.0.0-incubating/pom.xml
>
> Really appreciate any thoughts on this.
>
> Thanks
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org