Ada*_*ion 8 java maven wildfly
我想有办法运行maven,以便:
wildfly:run
)问题是:
wildfly:run
阻止所以不能执行其他maven目标我想到的一个可能的工作是:
wildfly:start
您可以使用运行的beforeDeployment参数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>
Run Code Online (Sandbox Code Playgroud)
如果您的数据库驱动程序需要其他库,您可以执行类似的操作(源代码):
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)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3645 次 |
最近记录: |