« Return to Thread: Problem with exec mojo after update

Problem with exec mojo after update

by alex.g :: Rate this Message:

Reply to Author | View in Thread

I am using netbeans ide 6.1 and this morning I upgraded my maven plugin to 3.1.1. I don't know if this is the cause of the problem I'm having or if it's something completely different, but I've been trying all day to fix my exec plugin with no success. I have already tried uninstalling and installing the maven plugin. I even tried doing a clean install of the IDE and the problem remains. I can clean and build projects but not run them. It seems that when it constructs the command line that fires up the JVM with the project, it doesn't quote correctly the "c:\program files\java\..." string so I get an error. When I try to run a new maven project, I get the output that I post below, but when I right click on the class with the main() method and click run it runs. But even that doesn't work for the projects I have from before. If someone could point me in the right direction on how to fix this I'd be grateful because I'm new to maven and I've spent all day trying to figure it out with no success.

Scanning for projects...
project-execute
[#process-resources]
[resources:resources]
Using default encoding to copy filtered resources.
[#compile]
[compiler:compile]
Nothing to compile - all classes are up to date
[exec:exec]
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
[ERROR]
[ERROR]
The following mojo encountered an error while executing:
Group-Id: org.codehaus.mojo
Artifact-Id: exec-maven-plugin
Version: 1.1-beta-1
Mojo: exec
brought in via: Direct invocation

While building project:
Group-Id: com.mycompany
Artifact-Id: mavenproject1
Version: 1.0-SNAPSHOT
From file: C:\Documents and Settings\user\My Documents\NetBeansProjects\mavenproject1\pom.xml
Reason: Result of "C:\Program Files\Java\jdk1.6.0_06\bin\java.exe" -classpath "C:\Documents and Settings\user\My Documents\NetBeansProjects\mavenproject1\target\classes" com.mycompany.mavenproject1.App execution is: '1'.
------------------------------------------------------------------------
For more information, run with the -e flag
------------------------------------------------------------------------
BUILD FAILED
------------------------------------------------------------------------
Total time: < 1 second
Finished at: Wed May 14 16:29:08 CEST 2008
Final Memory: 68M/162M
------------------------------------------------------------------------

 « Return to Thread: Problem with exec mojo after update

LightInTheBox - Buy quality products at wholesale price