Discussion:
How I can run a netbeans Maven project outside the netbeans ide?
legolas
2008-12-11 11:26:36 UTC
Permalink
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?

Thanks.
--
View this message in context: http://www.nabble.com/How-I-can-run-a-netbeans-Maven-project-outside-the-netbeans-ide--tp20953727p20953727.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
legolas
2008-12-12 14:49:38 UTC
Permalink
Hi
Any comment?

Thanks
Post by legolas
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?
Thanks.
--
View this message in context: http://www.nabble.com/How-I-can-run-a-netbeans-Maven-project-outside-the-netbeans-ide--tp20953727p20977072.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Jason Lee
2008-12-12 15:03:30 UTC
Permalink
I'm not sure what you mean. Are you wanting to execute the project?
If so, what type of project is it (command line, GUI, Web, etc)? Are
you wanting to build it? If so, reference the maven docs at http://maven.apache.org
.

Etc. :)
Post by legolas
Hi
Any comment?
Thanks
Post by legolas
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?
Thanks.
--
View this message in context: http://www.nabble.com/How-I-can-run-a-netbeans-Maven-project-outside-the-netbeans-ide--tp20953727p20977072.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Jason Lee
Senior Java Developer
GlassFish Administration Console

Sun Microsystems, Inc.
Phone x31197/+1 405-343-1964
Email ***@sun.com
Blog http://blogs.sun.com/jasondlee
Blog http://blogs.steeplesoft.com
Wade Chandler
2008-12-12 15:07:02 UTC
Permalink
Do you mean the build, or the actual application? Are you getting some specific errors? Should have a pom.xml file which should let you build it. Have to have maven installed and on the path too.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
Sent: Friday, December 12, 2008 9:49:38 AM
Subject: Re: [nbusers] How I can run a netbeans Maven project outside the netbeans ide?
Hi
Any comment?
Thanks
Post by legolas
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?
Thanks.
--
http://www.nabble.com/How-I-can-run-a-netbeans-Maven-project-outside-the-netbeans-ide--tp20953727p20977072.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Jaroslav Pospisil
2008-12-12 15:18:19 UTC
Permalink
Hi,
there should be no problem with this.You can run your project from
command line like this:
- install Maven 2 on your computer
- ensure you've got system property M2_HOME set to your Maven
installation location and also Maven bin folder added to PATH
- go to the directory,containing pom.xml of your project and type "mvn
install" plus Enter to build your project
- if it's for example simple project,packaged as JAR,you can run it then
by typing something like this in the console:

$ java -cp target/simple-1.0-SNAPSHOT.jar org.yourcompany.projectNam.App
and Enter

Have a nice day.

-Jarek
Post by legolas
Hi
Any comment?
Thanks
Post by legolas
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?
Thanks.
legolas
2008-12-12 16:04:48 UTC
Permalink
Thank you, it worked and the project compiled.
Now, what If I wanted to execute the jar file right after the compilation
using the maven command instead of making users to write some command line
statement?
for example, after user typed: "mvn install", then he can type "mvn run" to
run the project.
Thanks.
Post by Jaroslav Pospisil
Hi,
there should be no problem with this.You can run your project from
- install Maven 2 on your computer
- ensure you've got system property M2_HOME set to your Maven
installation location and also Maven bin folder added to PATH
- go to the directory,containing pom.xml of your project and type "mvn
install" plus Enter to build your project
- if it's for example simple project,packaged as JAR,you can run it then
$ java -cp target/simple-1.0-SNAPSHOT.jar org.yourcompany.projectNam.App
and Enter
Have a nice day.
-Jarek
Post by legolas
Hi
Any comment?
Thanks
Post by legolas
Hi
I have a Maven based project and I wan to run it outside netbeans IDE, can
someone please let me know how I can do this?
Thanks.
--
View this message in context: http://www.nabble.com/How-I-can-run-a-netbeans-Maven-project-outside-the-netbeans-ide--tp20953727p20978448.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Loading...