我想有一种方法来运行Maven,以便它将:
wildfly:run
)问题是:
wildfly:run
阻止,因此无法执行其他Maven目标我想到的一个可能的解决方法是:
wildfly:start
您可以使用参数runDeployment来运行goal
(source):
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<beforeDeployment>
<commands>
<command>data-source add --jndi-name=java:jboss/datasources/OracleDS --name=testDB --connection-url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 --driver-name=h2 --user-name=sa --password=sa</command>
</commands>
</beforeDeployment>
</configuration>
</plugin>
如果您的数据库驱动程序需要其他库,则可以执行以下操作(source):
module add --name=org.postgres --resources=/tmp/postgresql-9.3-1101.jdbc41.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句