I am running an application using exec-maven-plugin version 1.1.1. This is the pom config
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.org.dc.dcClient</mainClass>
</configuration>
</execution>
</executions>
This has worked fine. I recently updated some components and it now runs properly but gets blocked at the end and won't complete (the code completes but maven doesn't finish).
I have googled a bit and I think this is a bug ? I have 2 questions if anyone has the time to answer
1) has this been fixed anywhere or should I try to convert it to cargo or Ant (I am running on windows)
2) I have tried upgrading to the more recent 1.3.2 but this doesn't work. I can't see anything obvious in the log files but the app is return an http 500 response. I have essentially just changed the 1.1.1 to 1.3.2 but I can't see anything in the documentation which implies I need to do anything else ? I'm still flapping about in this area a bit but presumably as this is a maven plug in there probably isn't a dependency conflict ?
I'm using Maven 3.2.1 and JDK 1.7 by the way.
Thanks.
In response to comment
What I'm trying to do - I inherited this code that had developed from a proof of concept to a bit of code run on a live build server. I want to upgrade elastic search with minimal effort for now as I've just taken it on and have a few things to do (hasn't everyone!). I want the app itself to run from the command line (via jenkins) and close when it has finished. I guess partly I'm just being stubborn now and wanting to know what the problem with upgrading to 1.3.2 is and partly I'm not sure what the best solution to the fundamental problem of the exec-maven not releasing the process son completion. That being said I'm beginning to think moving it to the antrun plugin will be quicker and simpler as this seems to be a solution suggested for the underlying problem (both in the other comment and on a google search) that the 1.1.1 version (and very possibly 1.3.2 version) of exec-maven doesn't release at the end of processing).
In terms of the log file I'm not sure how much you would like to see as obvioulsy they are massive. When using version 1.1.1 I get (mostly output messages I've put in ...
New 8080 server set to go
New 8080 server set
Context set
Using war file: target/dc.war
Waiting for startup...
Request Set
execute run
200
Startup complete.
.. app starts
when I change the version to 1.3.2 I get
New 8080 server set to go
New 8080 server set
Context set
Using war file: target/dc.war
Waiting for startup...
Request Set
execute run
500
...
...
Waiting for startup...
Request Set
execute run
500
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Server failed to start up in 60 seconds
at com.org.dcapp.dcclass.startServer(dcclass.java:138)
at com.org.dcapp.dcclass.main(dcclass.java:30)
... 6 more
[DEBUG] joining on thread Thread[qtp1062658514-33-selector- ServerConnectorManager@b8e088e/0,5,com.org.dcapp.dcclass]
Let me know if you want more.
Thanks