This was suggested to you earlier

          <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <archive>
                         <addMavenDescriptor>false</addMavenDescriptor>
                     </archive>
                 </configuration>
             </plugin>

On 03/06/2010 2:06 PM, govind ashrit wrote:
Hello

That version of Maven jar plugin is not found in repo

http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/

Check for other versions

On Thu, Jun 3, 2010 at 11:24 PM, Shelli Orton<[email protected]>  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:[email protected]]
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: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to