I'd like to set up a one-liner to deploy my webapp in TomEE using Maven TomEE plugin. Normally, I'd just put the .war artifact in <tomee-home>/webapps/
and set up <tomee-home>/conf/system.properties
in a way like this:
myAppDS.jdbcUrl = jdbc:mysql://<host>:<port>/<schemaName>
myAppDS.password = <db user password>
myAppDS.userName = <db user name>
But how can I set these properties in command line using maven tomee:run
?
I would prefer the
tomee.xml
configuration to declare resources while using the TomEE Maven Plugin.You can define your datasource in the TomEE Maven Plugin (similar to
conf/tomee.xml
in a standalone deployment) as follows:and reference the folder containing the
tomee.xml
via<config>
in the TomEE Maven Plugin<configuration>
section.Alternative would be to use a
resources.xml
inWEB-INF
of your web application: