NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to specify a which Java main class to run complied with a Maven Project

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Craig Motell
Posted via mailing list.





PostPosted: Fri Mar 18, 2011 1:11 am    Post subject: How to specify a which Java main class to run complied with a Maven Project Reply with quote

Dear Maven users with Netbeans: I hope there are!

I have a maven project, it creates many Java classes with main() that I can run.

I am able to run my application using the following Maven command line:


D:\projects\web\core>mvn org.codehaus.mojo:exec-maven-plugin:1.1.1:java -Dexec.mainClass=Project.task.ipt
[INFO] Scanning for projects...
and it runs...albeit poorly:)

--------------------------------------------------

But I can't run it directly in NETBEANS.

QUESTION: my primary question is how to run this class in Netbeans. How to tell Netbeans which Java class to run with a project.


My Attempt:

I try adding this as a Project Properties->Run

----------------------------------------------------------------------------
| Configuration: <default config>
| Main Class: Project.task.ipt
| Arguments:
| Working Directory:
| VM Options: -Xms126m -Xm512m
-------------------------------------------------------------------------------

but when I run I get the error:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:exec


Also, note, the package is ipt.task.project

---------------------------------------------------------------------------------

-----> So how do we specify which java main class to run?

thank you,
Craig
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo