With release of jboss-as maven plugin version 7.0.1.Final the new goal deploy-artifact is added. It allows to deploy additional artifacts to JBoss server, like JDBC DB driver JAR.
After trying do deploy JDBC driver with jboss-as maven plugin using following code in pom.xml I received the NullPointerException
in Maven build.
Here is part of maven pom.xml used to deploy the driver to jboss:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
In the plugin’s manual at http://docs.jboss.org/jbossas/7/plugins/maven/latest/examples/deployment-example.html it said
The artifact must be already listed as a dependency in the projects pom.xml
but it do not tells in which scope the driver’s JAR have to be: it have to be in compile or runtime scope in order to work. I had it in provided scope. After changing the scope of dependency it works fine.