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.xmlconfiguration to declare resources while using the TomEE Maven Plugin.You can define your datasource in the TomEE Maven Plugin (similar to
conf/tomee.xmlin a standalone deployment) as follows:and reference the folder containing the
tomee.xmlvia<config>in the TomEE Maven Plugin<configuration>section.Alternative would be to use a
resources.xmlinWEB-INFof your web application: