[ 
http://jira.codehaus.org/browse/MJBOSS-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216051#action_216051
 ] 

Marco Fago commented on MJBOSS-46:
----------------------------------

The cd command can change just the current directory and not the current disk, 
so that fix won't work if the launching disk and the one referred by the 
jbossHome parameter are not the same.
The couple

jbossHome = D:\JBOSS\jboss-5.1.0.GA and you type
C:\>mvn jboss:start

won't work.

Use the /D option
String command[] = { "cmd.exe", "/C", "cd /D " + jbossHome + "\\bin & set 
JBOSS_HOME=\"" + jbossHome + "\" & " + fName + ".bat " + " " + params };
instead.

> Wrong version of JBOSS is started if JBOSS_HOME env variable is set
> -------------------------------------------------------------------
>
>                 Key: MJBOSS-46
>                 URL: http://jira.codehaus.org/browse/MJBOSS-46
>             Project: Maven 2.x JBoss Plugin
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>         Environment: I have two installations of JBoss (v4 and v5) with 
> JBOSS_HOME pointing to v4 dir.
>            Reporter: Dumitru Postoronca
>            Assignee: Paul Gier
>            Priority: Minor
>             Fix For: 1.4.1
>
>
> HOW TO REPLICATE:
> Set the <jbossHome /> parameter to the JBoss 5 directory and run "mvn 
> jboss:start". The run.bat script called from AbstractJBossMojo:launch() still 
> uses the %JBOSS_HOME% environment variable, so it starts the v4 server 
> instead of the configured v5 one.
> PROPOSED SOLUTION:
> The jbossHome parameter needs to overwrite the JBOSS_HOME variable before 
> starting run.bat so that the intended jboss server is stated.
> Possibly change in AbstractJBossMojo line 84:
> String command[] = { "cmd.exe", "/C", "cd " + jbossHome + "\\bin & " + fName 
> + ".bat " + " " + params };
> to
> String command[] = { "cmd.exe", "/C", "cd " + jbossHome + "\\bin & set 
> JBOSS_HOME=\"" + jbossHome + "\" & " + fName + ".bat " + " " + params };

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to