[ 
http://jira.codehaus.org/browse/CONTINUUM-2424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205469#action_205469
 ] 

Igor Grapp commented on CONTINUUM-2424:
---------------------------------------

"java.home" system property points JAVA_HOME that java app started with. It is 
loaded implicitly by jvm and it could be retrieved by code snippet -  "String 
javahome = System.getProperty("java.home" );

See 
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties() 
for more info.

Reporduction steps:

1. In windows, right click on "My Computer", navigate to "Advanced" tab and 
click "Enviromental Variables" button.
2. remove JAVA_HOME variable(s).
3. Install continuum as a service.
4. Install maven 2 at c:\temp\apache-maven-2.0.10.
5. Start continuum as a service.
6. Open browser, login into continuum and add new installation.
7. Select "maven2" type.
8. Enter c:\temp\apache-maven-2.0.10 as a path.
9. Hit submit button - you will get an error described.



> Getting ".../mvn version return code 1" error when trying to add maven2 
> installation.
> -------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2424
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2424
>             Project: Continuum
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: Windows server 2003 sp2
>            Reporter: Igor Grapp
>            Priority: Minor
>
> Getting ".../mvn version return code 1" error when trying to add maven2 
> installation.
> After quick debugging session, I discovered that this happens due to 
> JAVA_HOME was not set as a system env variable and "mvn" script requires it 
> to be set before running.
> I guess that "JAVA_HOME" env variable need to  explicitly set in 
> org.apache.maven.continuum.web.validator.InstallationValidator with value 
> taken from  "java.home" system property.
> Also, I would recommend to output stderr stream to the log during error, 
> since this will clearly indicate an error with no need for debugging session.
> Regards,
> Igor Grapp.

-- 
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

        

Reply via email to