You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by I am Who i am <ra...@gmail.com> on 2008/04/23 21:39:28 UTC

removing maven files from jar

Hi All,

How to remove maven related files like maven folder / pom.xml /
pom.properties files from the jar file being created, i have the following
in my pom, but still seeing the maven directory with pom / .xml/.properties
under META-INF directory, my jar plugin version is 2.2
<build>
     <plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                                <execution>
                                        <id>CUSTOM-MANIFEST</id>
                                        <goals>
                                                <goal>jar</goal>
                                        </goals>
                                        <configuration>
                                                <archive>

<manifestFile>${basedir}/../wsear/META-INF/MANIFEST.MF</manifestFile>
<addMavenDescriptor>false</addMavenDescriptor>
                                                </archive>
                                        </configuration>
                                </execution>
                        </executions>
                </plugin>
       </plugins>
   </build>


Please help

Re: removing maven files from jar

Posted by Patrizio Munzi <pa...@eris4.com>.
Hi,

you have to use the <exclude> tag.

Take a look here:

http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html

Regards.

I am Who i am wrote:
> Hi All,
>
> How to remove maven related files like maven folder / pom.xml /
> pom.properties files from the jar file being created, i have the following
> in my pom, but still seeing the maven directory with pom / .xml/.properties
> under META-INF directory, my jar plugin version is 2.2
> <build>
>      <plugins>
>                 <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-jar-plugin</artifactId>
>                         <executions>
>                                 <execution>
>                                         <id>CUSTOM-MANIFEST</id>
>                                         <goals>
>                                                 <goal>jar</goal>
>                                         </goals>
>                                         <configuration>
>                                                 <archive>
>
> <manifestFile>${basedir}/../wsear/META-INF/MANIFEST.MF</manifestFile>
> <addMavenDescriptor>false</addMavenDescriptor>
>                                                 </archive>
>                                         </configuration>
>                                 </execution>
>                         </executions>
>                 </plugin>
>        </plugins>
>    </build>
>
>
> Please help
>
>   

-- 

*Patrizio Munzi*
Product Engineer
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: patrizio.munzi@eris4.com <ma...@eris4.com>
web: http://www.eris4.com <http://www.eris4.com/>
skype: eris4_munzi <skype:eris4_munzi?add>


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


Re: removing maven files from jar

Posted by Stephen Connolly <st...@gmail.com>.
One reason is that the pom.xml you develop with is no the one you want being
published.

For example, the pom.xml's we develop with contains a lot of internal
information that should not go outside the company (developer email
addresses, etc)

On Wed, Apr 23, 2008 at 8:44 PM, Wayne Fay <wa...@gmail.com> wrote:

> Just curious, why do you want to do this?
>
> Also, you say "my jar plugin version is 2.2" but its not stated in the
> <plugin> declaration, so are you certain of this? You really should
> "lock down" the version of plugins.
>
> Wayne
>
> On 4/23/08, I am Who i am <ra...@gmail.com> wrote:
> > Hi All,
> >
> > How to remove maven related files like maven folder / pom.xml /
> > pom.properties files from the jar file being created, i have the
> following
> > in my pom, but still seeing the maven directory with pom /
> .xml/.properties
> > under META-INF directory, my jar plugin version is 2.2
> > <build>
> >     <plugins>
> >                <plugin>
> >                        <groupId>org.apache.maven.plugins</groupId>
> >                        <artifactId>maven-jar-plugin</artifactId>
> >                        <executions>
> >                                <execution>
> >                                        <id>CUSTOM-MANIFEST</id>
> >                                        <goals>
> >                                                <goal>jar</goal>
> >                                        </goals>
> >                                        <configuration>
> >                                                <archive>
> >
> > <manifestFile>${basedir}/../wsear/META-INF/MANIFEST.MF</manifestFile>
> > <addMavenDescriptor>false</addMavenDescriptor>
> >                                                </archive>
> >                                        </configuration>
> >                                </execution>
> >                        </executions>
> >                </plugin>
> >       </plugins>
> >   </build>
> >
> >
> > Please help
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: removing maven files from jar

Posted by Wayne Fay <wa...@gmail.com>.
Just curious, why do you want to do this?

Also, you say "my jar plugin version is 2.2" but its not stated in the
<plugin> declaration, so are you certain of this? You really should
"lock down" the version of plugins.

Wayne

On 4/23/08, I am Who i am <ra...@gmail.com> wrote:
> Hi All,
>
> How to remove maven related files like maven folder / pom.xml /
> pom.properties files from the jar file being created, i have the following
> in my pom, but still seeing the maven directory with pom / .xml/.properties
> under META-INF directory, my jar plugin version is 2.2
> <build>
>     <plugins>
>                <plugin>
>                        <groupId>org.apache.maven.plugins</groupId>
>                        <artifactId>maven-jar-plugin</artifactId>
>                        <executions>
>                                <execution>
>                                        <id>CUSTOM-MANIFEST</id>
>                                        <goals>
>                                                <goal>jar</goal>
>                                        </goals>
>                                        <configuration>
>                                                <archive>
>
> <manifestFile>${basedir}/../wsear/META-INF/MANIFEST.MF</manifestFile>
> <addMavenDescriptor>false</addMavenDescriptor>
>                                                </archive>
>                                        </configuration>
>                                </execution>
>                        </executions>
>                </plugin>
>       </plugins>
>   </build>
>
>
> Please help
>

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