You probably should take a few minutes and read the first few chapters of one of the Maven books. http://maven.apache.org/articles.html lists a number of free resources that will get you going.

If you are going to use Eclipse, I would suggest replacing Eclipse with the Springsource Eclipse/STS. It is an Eclipse packaged up with all the plug-ins that you need for Java development including a complete set of Maven tools (m2) in a single download and install. Save hours of searching for all the plug-ins each time there is a new version of Eclipse.

In the Package or Navigator view, just point to the pom, right click => Run As = then select the Maven operation that you want or select Build... to make your own Maven launch configuration.

Ron

On 19/10/2012 3:53 AM, Mikhail Kalkov wrote:
By using Eclipse, how to build a .jar from this pom.xml within the project?
http://www.sonatype.org/m2eclipse

/Mikhail

----- Original Message -----
From: "Thomas Sundberg" <[email protected]>
To: "Maven Users List" <[email protected]>
Sent: Friday, October 19, 2012 9:44:18 AM
Subject: Re: Maven pom.xml ?

On 19 October 2012 09:36, jiapei100 <[email protected]> wrote:
Hi, sorry for my naive question:I've got a maven project, in which there is a
file pom.xml .My naive question:1) By using bash, what is the command line
to build a .jar from pom.xml ?*maven **** pom.xml  -> project.jar ?*2)
You would use

mvn package

to build a jar. It will end up in the ./target directory.

This is of course dependent of how you pom looks like.

The simplest possible pom would look something like this:

<project>
     <modelVersion>4.0.0</modelVersion>
     <groupId>se.somath.maven</groupId>
     <artifactId>simplest-possible</artifactId>
     <version>1.0.0-SNAPSHOT</version>
</project>

As you see, there is no packaging specified. This means that the
default packaging will be used and the default packaging is a jar.


By
using Eclipse, how to build a .jar from this pom.xml within the project?
I have no idea, life is to short to use Eclipse.

HTH
Thomas




-----
Welcome to Vision Open
http://www.visionopen.com
--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-pom-xml-tp5727069.html
Sent from the Maven - Users mailing list archive at Nabble.com.




--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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

Reply via email to