maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shelli Orton" <Shelli.Or...@sjrb.ca>
Subject RE: Cannot Exclude pom.xml from jar file
Date Thu, 03 Jun 2010 18:48:50 GMT
Using version 2.1 builds, but it still includes the pom.xml and pom.properties file in the
jar.

Shelli

-----Original Message-----
From: Dennis Lundberg [mailto:dennisl@apache.org] 
Sent: Thursday, June 03, 2010 12:06 PM
To: Maven Users List
Subject: Re: Cannot Exclude pom.xml from jar file

Try version 2.1 instead.

On 2010-06-03 19:54, Shelli Orton wrote:
> I changed it to:
> 
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-jar-plugin</artifactId>
>                 <version>2.0.1</version>
>                 <configuration>
>                     <archive>
>                         <addMavenDescriptor>false</addMavenDescriptor>
>                     </archive>
>                 </configuration>
>             </plugin>
> 
> but still no luck.  I am using m2eclipse.  Perhaps that's part of the problem?  When
I tried it via the mvn command line, I got this error:
> 
> C:\Devel\MyProject>mvn clean
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building My Project
> [INFO]    task-segment: [clean]
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository central (http://repo1.maven.org/maven2)
> Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository java.net2 (http://download.java.net/maven/2)
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository central (http://repo1.maven.org/maven2)
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> 
> 
> Project ID: org.apache.maven.plugins:maven-jar-plugin
> 
> Reason: POM 'org.apache.maven.plugins:maven-jar-plugin' not found in repository: Unable
to download the artifact from any repository
> 
>   org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   java.net2 (http://download.java.net/maven/2)
> 
>  for project org.apache.maven.plugins:maven-jar-plugin
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Thu Jun 03 11:51:02 MDT 2010
> [INFO] Final Memory: 2M/15M
> [INFO] ------------------------------------------------------------------------
> C:\Devel\MyProject>mvn package
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building My Project
> [INFO]    task-segment: [package]
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository central (http://repo1.maven.org/maven2)
> Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository java.net2 (http://download.java.net/maven/2)
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.0.1/maven-jar-plugin-2.0.1.pom
> [INFO] Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1'
in repository central (http://repo1.maven.org/maven2)
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> 
> 
> Project ID: org.apache.maven.plugins:maven-jar-plugin
> 
> Reason: POM 'org.apache.maven.plugins:maven-jar-plugin' not found in repository: Unable
to download the artifact from any repository
> 
>   org.apache.maven.plugins:maven-jar-plugin:pom:2.0.1
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   java.net2 (http://download.java.net/maven/2)
> 
>  for project org.apache.maven.plugins:maven-jar-plugin
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Thu Jun 03 11:51:09 MDT 2010
> [INFO] Final Memory: 3M/15M
> [INFO] ------------------------------------------------------------------------
> 
> Thanks,
> Shelli
> 
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com] 
> Sent: Thursday, June 03, 2010 11:46 AM
> To: Maven Users List
> Subject: Re: Cannot Exclude pom.xml from jar file
> 
>>                <groupId>org.apache.maven.plugins</groupId>
>>                <artifactId>maven-jar-plugin</artifactId>
> 
> No version tag means you don't really have any control over what
> version of the jar plugin that Maven is using. In all likelihood, the
> version you are using pre-dates this Jira fix.
> 
> So lock down your jar plugin with a version that definitely have this
> fix in it. Jira says this was fixed in 2.0.1 so try that to start.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


-- 
Dennis Lundberg

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

Mime
View raw message