Is there a way ( I mean how do I ) set a system property in a maven project?
I want to access a property from my test and my webapp ( running locally ) and I know I can use a java system property.
Should I put that in ./settings.xml or something like that?
Context
I took an open source project and managed to change the db configuration to use JavaDB
Now, in the jdbc url for JavaDB, the location of the database could be specified as the full path ( see: this other question )
Or a system property: derby.system.home
I have the code working already, but currently it is all hardcoded to:
jdbc:derby:/Users/oscarreyes/javadbs/mydb
And I want to remove the full path, to leave it like:
jdbc:derby:mydb
To do that I need to specify the system property ( derby.system.home
) to maven, but I don't know how.
The test are performed using junit ( I don't see any plugin in pom.xml ) and the web app runs with the jetty plugin.
Specifying the system property in the command line seems to work for jetty, but I'm not sure if that's something practical ( granted some other users may run it from eclipse/idea/ whatever )