cargo maven plugin ignores configuration options configured for different executions in one project

Description

I'm using an installed local tomcat and I start and stop it from pom before/after my Selenium functional tests.
I have added jvm debugging arguments to <cargo.jvmargs> in the plugin configuration and this causes the 'stop' goal to fail with timeout. The 'start' works ok.

It seems that the second jvm that is spawned in order to stop the container uses the same command line arguments as the 'start' goal execution and this means it will also try to bind to the same port for debugging. I have tried to use the shared memory debugger connector instead of the socket connector but the issue persists. I have also tried to configure <cargo.jvmargs> independently for start and stop executions, without using any debug args for stop goal, but this did not solve the problem either.

After analyzing the logs (relevant snippets included) I found out the stop goal ignores completely its <cargo.jvmargs>.

[22:22:39.368][info][talledLocalContainer] Tomcat 6.x starting...

[22:22:39.412][debug][talledLocalContainer] Project base dir set to: D:\work\prj\demo\trunk

[22:22:39.413][debug][talledLocalContainer] Executing 'c:\java\jdk1.6.0_22\jre\bin\java.exe' with arguments:
'-Xms256m'
'-Xmx1024m'
'-XX:MaxPermSize=512m'
'-Djava.library.path=c:\work\server/bin'
'-Xdebug'
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005'
'-XXermSize=48m'
'-Dcatalina.home=C:\Users\ADRIAN~1\AppData\Local\Temp\cargo\tomcat-demo-ft\apache-tomcat-6.0.33\apache-tomcat-6.0.33'
'-Dcatalina.base=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home'
'-Djava.io.tmpdir=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home/temp'
'-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager'
'-Djava.util.logging.config.file=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home/conf/logging.properties'
'-classpath'
'C:\Users\ADRIAN~1\AppData\Local\Temp\cargo\tomcat-demo-ft\apache-tomcat-6.0.33\apache-tomcat-6.0.33\bin\bootstrap.jar;c:\java\jdk1.6.0_22\lib\tools.jar'
'org.apache.catalina.startup.Bootstrap'
'start'

...........

[22:26:00.609][info][talledLocalContainer] Tomcat 6.x is stopping...

[22:26:00.609][debug][talledLocalContainer] +Task: java

[22:26:00.610][debug][talledLocalContainer] Waiting for port 8080 to shutdown, deadline 1319571000610

[22:26:00.620][debug][talledLocalContainer] Connection attempt with socket Socket[unconnected]

[22:26:00.622][debug][talledLocalContainer] Executing 'c:\java\jdk1.6.0_22\jre\bin\java.exe' with arguments:
'-Xms256m'
'-Xmx1024m'
'-XX:MaxPermSize=512m'
'-Djava.library.path=null/bin'
'-Xdebug'
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005'
'-Dcatalina.home=C:\Users\ADRIAN~1\AppData\Local\Temp\cargo\tomcat-demo-ft\apache-tomcat-6.0.33\apache-tomcat-6.0.33'
'-Dcatalina.base=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home'
'-Djava.io.tmpdir=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home/temp'
'-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager'
'-Djava.util.logging.config.file=D:\work\prj\demo\trunk\demo-ft\target\cargo-tomcat-home/conf/logging.properties'
'-classpath'
'C:\Users\ADRIAN~1\AppData\Local\Temp\cargo\tomcat-demo-ft\apache-tomcat-6.0.33\apache-tomcat-6.0.33\bin\bootstrap.jar;c:\java\jdk1.6.0_22\lib\tools.jar'
'org.apache.catalina.startup.Bootstrap'
'stop'

The config of the plugin with independetly configured start and stop executions is attached.

Status

Assignee

Savas Ali Tokmen

Reporter

Adrian Nistor

Components

Fix versions

Affects versions

Priority

Major
Configure