[
https://issues.jboss.org/browse/JBASMP-41?page=com.atlassian.jira.plugin....
]
James Perkins commented on JBASMP-41:
-------------------------------------
This could be done with the {{maven-dependency-plugin}}, but when testing I realized
commands are property handled in the plugin. Since the modules command is an actual
command and not an operation it fails to create execute. This needs to be fixed first, but
it could be more intuitive to have a goal like you suggest rather than relying on the
command.
FWIW the config would look like:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JBoss AS plugin to deploy war -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${version.jboss.maven.plugin}</version>
<executions>
<execution>
<id>create-modules</id>
<phase>package</phase>
<goals>
<goal>execute-commands</goal>
</goals>
<configuration>
<execute-commands>
<commands>
<command>module add --name=oracle.jdbc
--resources=${com.oracle:ojdbc6:jar}
--dependencies=javax.api,javax.transaction.api
</command>
</commands>
</execute-commands>
</configuration>
</execution>
</executions>
</plugin>
{code}
Create goals to add modules do Jboss AS
---------------------------------------
Key: JBASMP-41
URL:
https://issues.jboss.org/browse/JBASMP-41
Project: JBoss AS Maven Plugins
Issue Type: Feature Request
Reporter: Gustavo Orair
Assignee: James Perkins
A command to create modules using Jboss CLI was created
(refer to
https://issues.jboss.org/browse/AS7-4265).
It should be nice if one may create these modules on Jboss server referencing a maven
dependency similarly to deploy-artifact configuration section.
Maybe a possible workaround for now should be use execute-commands but it would need to
locate where the maven depencies are located:
<execution>
<id>create-modules</id>
<phase>install</phase>
<goals>
<goal>execute-commands</goal>
</goals>
<configuration>
<execute-commands>
<commands>
<command>module add --name=oracle.jdbc --resources=ojdbc6.jar
--dependencies=javax.api,javax.transaction.api</command>
</commands>
</execute-commands>
</configuration>
</execution>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira