Exec Maven Plugin to Command Line
Posted
by
mistercaste
on Stack Overflow
See other posts from Stack Overflow
or by mistercaste
Published on 2012-11-13T16:42:44Z
Indexed on
2012/11/16
23:00 UTC
Read the original article
Hit count: 418
I have an application developed in NetBeans/Maven that can be started via command line with:
mvn exec:exec "-Dexec.executable=C:\\Java\\jdk1.6.0_33\\bin\\java.exe" "-Dexec.args=-Dlog4j.properties=... -classpath %classpath com.xxx.MyLauncher" -Dexec.classpathScope=runtime -Dexec.workingdir=
Now I need to run the application through the standard java command line method, like:
java -Dlog4j.properties=... -jar myapp-1.2-SNAPSHOT.jar
Unfortunately this does not work in the same manner, as I get the following exception:
opencard.core.util.OpenCardPropertyLoadingException: property file not found
Questions:
- What is the difference between launching applications with the Exec-Maven-plugin and the standard java execution on command line?
- Is there an easy way to convert a Maven execution script to a standard command line?
- How to run the application succesfully?
© Stack Overflow or respective owner