You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Clifton Craig <cc...@icsaward.com> on 2006/05/16 22:33:52 UTC

Running a simple project, Maven2

Hello all!

Apologies for the double post but my first send went through the wrong email 
identity in my KMail client... I'm having trouble running a simmple (well 
moderately simple) project. It consists of two Groovy defined classes so far 
and Groovy source loading seems to not work for some reason. So instead I 
tried compiling using the Antrun plugin in Maven. All is well but now I wish 
to run my code (it's a simple GUI) to see what it looks like and now I have 
problems. I can create a jar using the jar plugin from the command line, "mvn 
jar:jar" but that doesnot run through all of the lifecycle phases and only 
picks up resources. I can create a jar using "mvn install" and that works ok 
but I can't seem to define a Main-Class attribute in my manifest. I've 
included my custom manifest definition (MANIFEST.MF) under 
src/main/resources/META-INF but that doesn't get included in the jar for some 
reason. Maven preferrs to generate one for me no matter what I do. I'm not 
understanding how to easily get what would be a straight foward JAva project 
to execute from the command line using Maven. In Maven 1 I'm thinking this 
would be as simple as running "maven jar run" but I'm not sure how to do the 
same here. Is there a way I can define the main class in my pom or in the 
plugin settings that I'm not aware of? please advise. Thanx in advance!

--------------------------------------------------- 
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
ccc@icsaward.com
ccraig@gbg.com

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


Re: Running a simple project, Maven2

Posted by Wayne Fay <wa...@gmail.com>.
This is a pretty common topic. Search the Maven User list archive for
the following email threads for a complete discussion on this issue...

From: Andrea Aime <a....@satanet.it>
To: users@maven.apache.org
Date: May 10, 2006 5:08 AM
Subject: Packaging a standalone application

From: Stefan Arentz <st...@gmail.com>
To: users@maven.apache.org
Date: Apr 27, 2006 2:44 PM
Subject: Some simple questions from a Maven 2.0 n00b

From: Kevin Galligan <ma...@kgalligan.com>
To: Maven Users List <us...@maven.apache.org>
Date: Apr 13, 2006 6:48 AM
Subject: Executing a maven class application


Wayne

On 5/16/06, Clifton Craig <cc...@icsaward.com> wrote:
> Hello all!
>
> Apologies for the double post but my first send went through the wrong email
> identity in my KMail client... I'm having trouble running a simmple (well
> moderately simple) project. It consists of two Groovy defined classes so far
> and Groovy source loading seems to not work for some reason. So instead I
> tried compiling using the Antrun plugin in Maven. All is well but now I wish
> to run my code (it's a simple GUI) to see what it looks like and now I have
> problems. I can create a jar using the jar plugin from the command line, "mvn
> jar:jar" but that doesnot run through all of the lifecycle phases and only
> picks up resources. I can create a jar using "mvn install" and that works ok
> but I can't seem to define a Main-Class attribute in my manifest. I've
> included my custom manifest definition (MANIFEST.MF) under
> src/main/resources/META-INF but that doesn't get included in the jar for some
> reason. Maven preferrs to generate one for me no matter what I do. I'm not
> understanding how to easily get what would be a straight foward JAva project
> to execute from the command line using Maven. In Maven 1 I'm thinking this
> would be as simple as running "maven jar run" but I'm not sure how to do the
> same here. Is there a way I can define the main class in my pom or in the
> plugin settings that I'm not aware of? please advise. Thanx in advance!
>
> ---------------------------------------------------
> Clifton C. Craig, Software Engineer
> Intelligent Computer Systems - A Division of GBG
> ccc@icsaward.com
> ccraig@gbg.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