Skip to content

Instantly share code, notes, and snippets.

@emag
Created December 11, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emag/9770072811f055c0ded0 to your computer and use it in GitHub Desktop.
Save emag/9770072811f055c0ded0 to your computer and use it in GitHub Desktop.
Get system property at newContainer()

Just passed

$ ./mvnw clean verify -pl lifelog-postgresql -Dlifelog.production=true
[...]
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running wildflyswarmtour.lifelog.api.EntryControllerIT
now:2015-12-11T23:31:45.377
createDeployment.ENVIRONMENT_PRODUCTION: null
createDeployment.production: true
now:2015-12-11T23:32:19.925
newContainer.ENVIRONMENT_PRODUCTION: null
*** newContainer.production: null ***
tmpDir: /tmp
23:32:20,729 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
[...]

JAVA_OPTS

$ JAVA_OPTS="$JAVA_OPTS -Dlifelog.production=true" ./mvnw clean verify -pl lifelog-postgresql
[...]
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running wildflyswarmtour.lifelog.api.EntryControllerIT
now:2015-12-11T23:34:28.907
createDeployment.ENVIRONMENT_PRODUCTION: null
createDeployment.production: null
now:2015-12-11T23:35:02.119
newContainer.ENVIRONMENT_PRODUCTION: null
*** newContainer.production: null ***
tmpDir: /tmp
23:35:02,922 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
[...]

_JAVA_OPTIONS

$ _JAVA_OPTIONS="-Dlifelog.production=true" ./mvnw clean verify -pl lifelog-postgresql
Picked up _JAVA_OPTIONS: -Dlifelog.production=true
[...]
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Picked up _JAVA_OPTIONS: -Dlifelog.production=true
Running wildflyswarmtour.lifelog.api.EntryControllerIT
now:2015-12-11T23:36:39.012
createDeployment.ENVIRONMENT_PRODUCTION: null
createDeployment.production: true
now:2015-12-11T23:37:12.641
newContainer.ENVIRONMENT_PRODUCTION: null
*** newContainer.production: null ***
tmpDir: /tmp
23:37:13,389 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment