You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jiapei100 <jp...@gmail.com> on 2012/10/19 09:36:17 UTC
Maven pom.xml ?
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) By
using Eclipse, how to build a .jar from this pom.xml within the project?
-----
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.
Re: Maven pom.xml ?
Posted by Ron Wheeler <rw...@artifact-software.com>.
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" <ts...@kth.se>
> To: "Maven Users List" <us...@maven.apache.org>
> Sent: Friday, October 19, 2012 9:44:18 AM
> Subject: Re: Maven pom.xml ?
>
> On 19 October 2012 09:36, jiapei100 <jp...@gmail.com> 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: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven pom.xml ?
Posted by Mikhail Kalkov <mi...@purplescout.se>.
> 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" <ts...@kth.se>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Friday, October 19, 2012 9:44:18 AM
Subject: Re: Maven pom.xml ?
On 19 October 2012 09:36, jiapei100 <jp...@gmail.com> 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.
--
Thomas Sundberg
M. Sc. in Computer Science
Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg
Better software through faster feedback
---------------------------------------------------------------------
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: Maven pom.xml ?
Posted by Thomas Sundberg <ts...@kth.se>.
On 19 October 2012 09:36, jiapei100 <jp...@gmail.com> 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.
--
Thomas Sundberg
M. Sc. in Computer Science
Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg
Better software through faster feedback
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org