[jboss-jira] [JBoss JIRA] (JBASMP-41) Create goals to add modules do Jboss AS

Christofer Dutz (JIRA) issues at jboss.org
Wed Aug 19 11:17:27 EDT 2015


    [ https://issues.jboss.org/browse/JBASMP-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099870#comment-13099870 ] 

Christofer Dutz commented on JBASMP-41:
---------------------------------------

I just stumbled over this post a few minutes ago and tried it right away. First of all: Thanks for that tip with the maven-dependency-plugin ... that actually would do the trick, if there wasn't another little problem in the CLI. This doesn't seem to work on Windows based machines as I am forced to change the paths for Windows.

The dependency plugin would expand:
{code}
                        <configuration>
                            <before-deployment>
                                <commands>
                                    <command>module add --name=oracle.jdbc --resources=${oracle:oracle-jdbc:jar};${oracle:orai18n:jar} --dependencies=javax.api,javax.transaction.api</command>
                                </commands>
                            </before-deployment>
                        </configuration>
{code}
To: 
{code}
module add --name=oracle.jdbc --resources=C:\LocalData\maven-local-repo\oracle\oracle-jdbc\11.2g\oracle-jdbc-11.2g.jar;C:\LocalData\maven-local-repo\oracle\orai18n\11.2g\orai18n-11.2g.jar --dependencies=javax.api,javax.transaction.api
{code}
Which looks good for a Windows machine ... unfortunately the CLI seems to be prefixing the paths with "C:\", which results in: 
{code}
module add --name=oracle.jdbc --resources=C:\C:\LocalData\maven-local-repo\oracle\oracle-jdbc\11.2g\oracle-jdbc-11.2g.jar;C:\C:\LocalData\maven-local-repo\oracle\orai18n\11.2g\orai18n-11.2g.jar --dependencies=javax.api,javax.transaction.api
{code}
Another thing I noticed was that it seems to be impossible to create the commands platform independent as I have to separate the resources using ":" on unix/linux and ";" on windows ... would be good if there was one option that worked on all target platforms ... Would be glad to help fixing this.

> 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 was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list