You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by RobJac <ro...@caritor.com> on 2006/04/13 17:04:19 UTC

Remove mavern folder in META-INF

My EJB project has a META_INF folder that i have placed under "resources"
folder When I execute maven package for my project. The project gets jarred
but when I actually open the Jar file i see some maven folder under the
META-INF folder. How can i avouid this from getting created?
Thanks  in advance

--
View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3902183
Sent from the Maven - Users forum at Nabble.com.


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


Re: Remove mavern folder in META-INF

Posted by Stephen Duncan <st...@gmail.com>.
What about the version number in the manifest?

Personally, I'd rather build the artifact with just a version number
change once the product is ready for release, to take advantage of
Maven properly providing the version number in the Manifest, etc.

-Stephen

On 4/13/06, Gunther Popp <Gu...@web.de> wrote:
> I had the same issue with jars and am currently using the 2.1-SNAPSHOT
> of the jar-plugin to exclude the pom.xml and pom.properties from the
> generated file. One problem with the included pom is that it contains a
> version number (in my case 1.2.0-SNAPSHOT). I am running an integration
> build every night and deploy a new snapshot-build of the product to an
> internal repository. Other guys pick up the builds and verify them. At
> some point in time, hopefully, we decide that the product is ready and
> release it - as is. We explicitly do NOT want to modify the artifact in
> any way.
>
> However, if the pom.xml is included in all the jars, the version number
> contained within will state "1.2.0-SNAPSHOT" for a released product.
> That´s not a big issue, but I simply dislike it. So it decided to
> exclude the poms from the beginning from all jars.
>
> Gunther
>
> Wayne Fay schrieb:
> > Just curious why you care about this? It doesn't affect/break anything
> > for me, so I've just ignored it until now.
> >
> > (You're not the only person to ask this question on the users list, so
> > I'm wondering what issues people are running into etc, and if perhaps
> > this "create META-INF/maven folder" is something that should be
> > defaulted to false if its causing problems for people...)
> >
> > Wayne
> >
> > On 4/13/06, RobJac <ro...@caritor.com> wrote:
> >
> >> My EJB project has a META_INF folder that i have placed under "resources"
> >> folder When I execute maven package for my project. The project gets jarred
> >> but when I actually open the Jar file i see some maven folder under the
> >> META-INF folder. How can i avouid this from getting created?
> >> Thanks  in advance
> >>
> >> --
> >> View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3902183
> >> Sent from the Maven - Users forum at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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


Re: Remove mavern folder in META-INF

Posted by Gunther Popp <Gu...@web.de>.
I had the same issue with jars and am currently using the 2.1-SNAPSHOT 
of the jar-plugin to exclude the pom.xml and pom.properties from the 
generated file. One problem with the included pom is that it contains a 
version number (in my case 1.2.0-SNAPSHOT). I am running an integration 
build every night and deploy a new snapshot-build of the product to an 
internal repository. Other guys pick up the builds and verify them. At 
some point in time, hopefully, we decide that the product is ready and 
release it - as is. We explicitly do NOT want to modify the artifact in 
any way.

However, if the pom.xml is included in all the jars, the version number 
contained within will state "1.2.0-SNAPSHOT" for a released product. 
That´s not a big issue, but I simply dislike it. So it decided to 
exclude the poms from the beginning from all jars.

Gunther

Wayne Fay schrieb:
> Just curious why you care about this? It doesn't affect/break anything
> for me, so I've just ignored it until now.
>
> (You're not the only person to ask this question on the users list, so
> I'm wondering what issues people are running into etc, and if perhaps
> this "create META-INF/maven folder" is something that should be
> defaulted to false if its causing problems for people...)
>
> Wayne
>
> On 4/13/06, RobJac <ro...@caritor.com> wrote:
>   
>> My EJB project has a META_INF folder that i have placed under "resources"
>> folder When I execute maven package for my project. The project gets jarred
>> but when I actually open the Jar file i see some maven folder under the
>> META-INF folder. How can i avouid this from getting created?
>> Thanks  in advance
>>
>> --
>> View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3902183
>> Sent from the Maven - Users forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     


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


Re: Remove mavern folder in META-INF

Posted by Wayne Fay <wa...@gmail.com>.
Just curious why you care about this? It doesn't affect/break anything
for me, so I've just ignored it until now.

(You're not the only person to ask this question on the users list, so
I'm wondering what issues people are running into etc, and if perhaps
this "create META-INF/maven folder" is something that should be
defaulted to false if its causing problems for people...)

Wayne

On 4/13/06, RobJac <ro...@caritor.com> wrote:
>
> My EJB project has a META_INF folder that i have placed under "resources"
> folder When I execute maven package for my project. The project gets jarred
> but when I actually open the Jar file i see some maven folder under the
> META-INF folder. How can i avouid this from getting created?
> Thanks  in advance
>
> --
> View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3902183
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Remove mavern folder in META-INF

Posted by Tim Kettler <ti...@udo.edu>.
Uups,

my fault, due to some other plugin testing I had a snv version of the jar plugin 
installed. In the current released version this parameter isn't available. So as Mang said 
, if you really have to remove the maven specific files you have to use a recent snapshot 
version of the plugin or build it from svn.

However if I try to build with the released jar-plugin it just bumps out with the error 
below and not with the exception you got.

-Tim

[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: 
org.apache.maven.plugins:maven-jar-plugin:2.0



Cause: Cannot find setter nor field in org.apache.maven.archiver.MavenArchiveConfiguration 
for 'addMavenDescriptor'
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Thu Apr 13 19:08:11 CEST 2006
[INFO] Final Memory: 3M/6M
[INFO] ----------------------------------------------------------------------------



RobJac schrieb:
> Hi,
> I tried adding the plugin tag but it was giving me the below error
> 
> java.lang.NullPointerException
>         at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
>         at java.util.regex.Matcher.reset(Matcher.java:284)
>         at java.util.regex.Matcher.<init>(Matcher.java:205)
>         at java.util.regex.Pattern.matcher(Pattern.java:879)
>         at
> org.apache.maven.plugin.PluginConfigurationException.addParameterUsag
> eInfo(PluginConfigurationException.java:85)
>         at
> org.apache.maven.plugin.PluginConfigurationException.buildConfigurati
> onDiagnosticMessage(PluginConfigurationException.java:272)
>         at
> org.apache.maven.usability.PluginConfigurationDiagnoser.diagnose(Plug
> inConfigurationDiagnoser.java:49)
>         at
> org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro
> rDiagnostics.java:81)
>         at
> org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:693)
>         at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:640)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:119)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> 
> Any idea why i am getting this? My pom.xml looks like this
> 
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>  
>   <groupId>Component_ADP</groupId>
>   <artifactId>Component_ADP</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0</version>
>   <name>Maven Quick Start Archetype</name>
>   <parent>
>     <groupId>DefinedBenefit_EA</groupId>
>     <artifactId>DefinedBenefit_EA</artifactId>
>     <version>1.0</version>
>   </parent>
>   <build>
>     <directory>${basedir}</directory>
>     <outputDirectory>classes</outputDirectory>
>     <finalName>${project.artifactId}</finalName>
>     <testOutputDirectory>test-classes</testOutputDirectory>
>     <sourceDirectory>src</sourceDirectory>
>     <testSourceDirectory>test</testSourceDirectory>
>     <resources>
>       <resource>
>         <directory>${basedir}/resources</directory>
>       </resource>
>     </resources>
>     <testResources>
>       <testResource>
>         <directory>test</directory>
>       </testResource>
>     </testResources>
> 	<plugins>
> 		<plugin> 
> 		<groupId>org.apache.maven.plugins</groupId> 
> 		<artifactId>maven-jar-plugin</artifactId> 
> 		<configuration> 
> 		 <archive> 
> 		   <addMavenDescriptor>false</addMavenDescriptor> 
> 		 </archive> 
> 		</configuration> 
> 		</plugin> 
> 
> 		<plugin> 
> 			<groupId>org.apache.maven.plugins</groupId> 
> 			<artifactId>maven-surefire-plugin</artifactId> 
> 			<configuration> 
> 			  <skip>${unittests.skip}</skip> 
> 			  <testFailureIgnore>true</testFailureIgnore> 
> 			</configuration> 
> 		</plugin>
> 	    <plugin>
> 	      <groupId>org.apache.maven.plugins</groupId>
> 	      <artifactId>maven-compiler-plugin</artifactId>
> 		<configuration>
> 		  <source>1.5</source>
> 		  <target>1.5</target>
> 		</configuration>
> 	       </plugin>        
> 	</plugins>      
>   </build>
> 
>   <reporting>
>     <outputDirectory>target/site</outputDirectory>
>   </reporting>
> </project>
> --
> View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3903992
> Sent from the Maven - Users forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


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


Re: Remove mavern folder in META-INF

Posted by Mang Jun Lau <Ma...@otpp.com>.
Hi,

I don't think that this functionality is in the current release of the 
maven-jar-plugin and the maven-war-plugin.  So far, it only works with the 
maven-ear-plugin.  So if you really need it, you can use the snapshot 
version of those plugins.


_Mang Lau





RobJac <ro...@caritor.com> 
04/13/2006 12:31 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
users@maven.apache.org
cc

Subject
Re: Remove mavern folder in META-INF







Hi,
I tried adding the plugin tag but it was giving me the below error

java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
        at java.util.regex.Matcher.reset(Matcher.java:284)
        at java.util.regex.Matcher.<init>(Matcher.java:205)
        at java.util.regex.Pattern.matcher(Pattern.java:879)
        at
org.apache.maven.plugin.PluginConfigurationException.addParameterUsag
eInfo(PluginConfigurationException.java:85)
        at
org.apache.maven.plugin.PluginConfigurationException.buildConfigurati
onDiagnosticMessage(PluginConfigurationException.java:272)
        at
org.apache.maven.usability.PluginConfigurationDiagnoser.diagnose(Plug
inConfigurationDiagnoser.java:49)
        at
org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro
rDiagnostics.java:81)
        at
org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:693)
        at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:640)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:119)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Any idea why i am getting this? My pom.xml looks like this

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion> 
  <groupId>Component_ADP</groupId>
  <artifactId>Component_ADP</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>Maven Quick Start Archetype</name>
  <parent>
    <groupId>DefinedBenefit_EA</groupId>
    <artifactId>DefinedBenefit_EA</artifactId>
    <version>1.0</version>
  </parent>
  <build>
    <directory>${basedir}</directory>
    <outputDirectory>classes</outputDirectory>
    <finalName>${project.artifactId}</finalName>
    <testOutputDirectory>test-classes</testOutputDirectory>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>test</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>test</directory>
      </testResource>
    </testResources>
                 <plugins>
                                 <plugin> 
 <groupId>org.apache.maven.plugins</groupId> 
                                 <artifactId>maven-jar-plugin</artifactId> 

                                 <configuration> 
                                  <archive> 
 <addMavenDescriptor>false</addMavenDescriptor> 
                                  </archive> 
                                 </configuration> 
                                 </plugin> 

                                 <plugin> 
 <groupId>org.apache.maven.plugins</groupId> 
 <artifactId>maven-surefire-plugin</artifactId> 
                                                 <configuration> 
 <skip>${unittests.skip}</skip> 
 <testFailureIgnore>true</testFailureIgnore> 
                                                 </configuration> 
                                 </plugin>
                     <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-compiler-plugin</artifactId>
                                 <configuration>
                                   <source>1.5</source>
                                   <target>1.5</target>
                                 </configuration>
                        </plugin> 
                 </plugins> 
  </build>

  <reporting>
    <outputDirectory>target/site</outputDirectory>
  </reporting>
</project>
--
View this message in context: 
http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3903992

Sent from the Maven - Users forum at Nabble.com.


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



Re: Remove mavern folder in META-INF

Posted by RobJac <ro...@caritor.com>.
Hi,
I tried adding the plugin tag but it was giving me the below error

java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
        at java.util.regex.Matcher.reset(Matcher.java:284)
        at java.util.regex.Matcher.<init>(Matcher.java:205)
        at java.util.regex.Pattern.matcher(Pattern.java:879)
        at
org.apache.maven.plugin.PluginConfigurationException.addParameterUsag
eInfo(PluginConfigurationException.java:85)
        at
org.apache.maven.plugin.PluginConfigurationException.buildConfigurati
onDiagnosticMessage(PluginConfigurationException.java:272)
        at
org.apache.maven.usability.PluginConfigurationDiagnoser.diagnose(Plug
inConfigurationDiagnoser.java:49)
        at
org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro
rDiagnostics.java:81)
        at
org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:693)
        at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:640)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:119)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Any idea why i am getting this? My pom.xml looks like this

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>  
  <groupId>Component_ADP</groupId>
  <artifactId>Component_ADP</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>Maven Quick Start Archetype</name>
  <parent>
    <groupId>DefinedBenefit_EA</groupId>
    <artifactId>DefinedBenefit_EA</artifactId>
    <version>1.0</version>
  </parent>
  <build>
    <directory>${basedir}</directory>
    <outputDirectory>classes</outputDirectory>
    <finalName>${project.artifactId}</finalName>
    <testOutputDirectory>test-classes</testOutputDirectory>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>test</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>test</directory>
      </testResource>
    </testResources>
	<plugins>
		<plugin> 
		<groupId>org.apache.maven.plugins</groupId> 
		<artifactId>maven-jar-plugin</artifactId> 
		<configuration> 
		 <archive> 
		   <addMavenDescriptor>false</addMavenDescriptor> 
		 </archive> 
		</configuration> 
		</plugin> 

		<plugin> 
			<groupId>org.apache.maven.plugins</groupId> 
			<artifactId>maven-surefire-plugin</artifactId> 
			<configuration> 
			  <skip>${unittests.skip}</skip> 
			  <testFailureIgnore>true</testFailureIgnore> 
			</configuration> 
		</plugin>
	    <plugin>
	      <groupId>org.apache.maven.plugins</groupId>
	      <artifactId>maven-compiler-plugin</artifactId>
		<configuration>
		  <source>1.5</source>
		  <target>1.5</target>
		</configuration>
	       </plugin>        
	</plugins>      
  </build>

  <reporting>
    <outputDirectory>target/site</outputDirectory>
  </reporting>
</project>
--
View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3903992
Sent from the Maven - Users forum at Nabble.com.


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


Re: Remove mavern folder in META-INF

Posted by Tim Kettler <ti...@udo.edu>.
You can add this to your pom to disable the inclusion of the maven folder:

<build>
   <plugins>
     <plugin>
       <artifactId>maven-jar-plugin</artifactId>
       <configuration>	
         <archive>
           <addMavenDescriptor>false</addMavenDescriptor>
         </archive>
       </configuration>
     </plugin>
   </plugins>
</build>

Hope this helps
-Tim

RobJac schrieb:
> My EJB project has a META_INF folder that i have placed under "resources"
> folder When I execute maven package for my project. The project gets jarred
> but when I actually open the Jar file i see some maven folder under the
> META-INF folder. How can i avouid this from getting created?
> Thanks  in advance
> 
> --
> View this message in context: http://www.nabble.com/Remove-mavern-folder-in-META-INF-t1444885.html#a3902183
> Sent from the Maven - Users forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


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