Cargo does not set JVM properties on Glassfish

Description

See: http://article.gmane.org/gmane.comp.java.cargo.user/3142

Hi

I'm using the maven cargo plugin 1.2.1.

I want to overwrite some properties during the deployment of my war to glasssfish 3.1, but this doesn't seem
to work.

Does anyone got this working?

In my pom, I set:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.2.1</version> <configuration> <container> <dependencies> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> </dependency> </dependencies> <systemProperties> <derby.system.home>${project.build.directory}/derby</derby.system.home> <hibernate.hbm2ddl.auto>create-drop</hibernate.hbm2ddl.auto> </systemProperties> </container> ... </plugin>

I see in the log that cargo passes these properties to the asadmin command as system properties:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [DEBUG] [talledLocalContainer] Jvm Spawn flag [false] [DEBUG] [talledLocalContainer] Execute:Java13CommandLauncher: Executing '/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home/jre/bin/java' with arguments: '-Dhibernate.hbm2ddl.auto=create-drop' '-Dderby.system.home=.../target/derby' '-jar' '.../target/cargo/installs/glassfish-3.1.2/glassfish3/glassfish/modules/admin-cli.jar' '--interactive=false' '--user' 'admin' '--passwordfile' '.../target/cargo/configurations/glassfish3x/password.properties' 'create-domain' '--adminport' '4848' '--instanceport' '8080' '--domainproperties' 'jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666' '--domaindir' '.../target/cargo/configurations/glassfish3x' 'cargo-domain'

But my application fails during the test as the hibernate property isn't set.

I think that cargo should use a call to asadmin to set the properties on the container (<http://docs.oracle.com/cd/E26576_01/doc.312/e24938/create-system-properties.htm#GSRFM00059>).

Any thoughts?

Thanks

Status

Assignee

Savas Ali Tokmen

Reporter

Savas Ali Tokmen

Components

Fix versions

Affects versions

1.2.1

Priority

Minor