This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233614 - the project doesn't run when i put the main class in the project's properties.
Summary: the project doesn't run when i put the main class in the project's properties.
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-29 19:04 UTC by montblack
Modified: 2016-10-26 14:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (145.64 KB, text/plain)
2013-07-29 19:04 UTC, montblack
Details
Debug Output With -X maven Option (15.38 KB, text/plain)
2013-08-21 02:31 UTC, montblack
Details
nbactions.xml file (1.72 KB, text/xml)
2013-08-21 02:34 UTC, montblack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description montblack 2013-07-29 19:04:42 UTC
Product Version = NetBeans IDE 7.4 Beta (Build 201307092200)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

Error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mavenproject1: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Comment 1 montblack 2013-07-29 19:04:45 UTC
Created attachment 137961 [details]
IDE log
Comment 2 Milos Kleint 2013-08-19 11:55:17 UTC
please do what the build output says. Run with debug output enabled (and attach to the issue). Also interesting is the initial output printed by netbeans that shows what's being put on the cmd line. And possibly the content of nbactions.xml file. 
closing as incomplete, please reopen with additional information
Comment 3 montblack 2013-08-21 02:31:28 UTC
Created attachment 138955 [details]
Debug Output With -X maven Option

Milos Kleint: Run with debug output enabled (and attach to the issue)
Comment 4 montblack 2013-08-21 02:34:24 UTC
Created attachment 138956 [details]
nbactions.xml file
Comment 5 montblack 2013-08-21 02:36:14 UTC
attached the requested documents
Comment 6 Milos Kleint 2013-08-21 04:40:05 UTC
-jar -classpath %classpath com.ingweb.mavenproject1.MainApp -jar ${basedir}/target/mavenproject1-1.0-SNAPSHOT.jar

from nbactions.xml file is the root of the problem. One cannot have both -jar <jar> and -classpath <cp> <mainClass> at the same time.

How did you reach such state?
Comment 7 montblack 2013-08-22 03:39:39 UTC
i'm just create a new project and the project runs ok, but when i open the project properties/run and set the Main Class, then the project doesn't run.
Comment 8 Milos Kleint 2013-08-22 12:54:13 UTC
which archetype/project template have you used to create the project?
Comment 9 montblack 2013-08-23 01:09:48 UTC
i'm just got to "file>new project>maven>JavaFx Application>Next>Finish" the i go to "project properties>run" and set the main class then i run and netbeans throws me the error.
Comment 10 Milos Kleint 2013-08-23 09:27:28 UTC
In project properties Run panel however the -jar <name>.jar part of the execution is clearly visible. When I manually remove it, it will write a correct -classpath <cp> <mainClass> sequence. Not that it would correctly run afterwards because javafx needs to run from the jar file. 

I suppose it's partly user error. All we can do is to recognise the state somehow and prevent the Run panel from showing altogether in this case I guess.
Comment 11 Milos Kleint 2013-08-23 14:10:17 UTC
http://hg.netbeans.org/core-main/rev/cb6ea97f1c63

disables the run panel fields when the action mappings are modified in a way that is not supported.
Comment 12 yunwang6 2016-10-06 13:22:18 UTC
I run into the same problem, but I don't see the nbactions.xml file. Is this somewhere else for the latest netbeans?
Comment 13 yunwang6 2016-10-06 13:30:14 UTC
my project was created as maven project
Comment 14 Tomas Stupka 2016-10-26 14:14:43 UTC
> my project was created as maven project
see the project files node in projects view or bellow the project root in the files view