The following comment has been added to this issue:

     Author: dion gillard
    Created: Mon, 11 Aug 2003 12:30 AM
       Body:
Maven home with '~' in the name does work. Here's output:

C:\source\maven>maven clean

C:\source\maven>if exist "\mavenrc_pre.bat" call "\mavenrc_pre.bat"

C:\source\maven>if "Windows_NT" == "Windows_NT"

C:\source\maven>set MAVEN_COMMAND_COM="cmd.exe"

C:\source\maven>if exist "C:\WINDOWS\system32\cmd.exe" set MAVEN_COMMAND_COM="C:
\WINDOWS\system32\cmd.exe"

C:\source\maven>if exist "C:\WINDOWS\command.com" set MAVEN_COMMAND_COM="C:\WIND
OWS\command.com"

C:\source\maven>set MAVEN_FIND_EXE="find.exe"

C:\source\maven>if exist "C:\WINDOWS\system32\find.exe" set MAVEN_FIND_EXE="C:\W
INDOWS\system32\find.exe"

C:\source\maven>if exist "C:\WINDOWS\command\find.exe" set MAVEN_FIND_EXE="C:\WI
NDOWS\command\find.exe"

C:\source\maven>if not "c:\j2sdk1.4.2" == "" goto OkJHome

C:\source\maven>"C:\WINDOWS\system32\cmd.exe" /C DIR "c:\j2sdk1.4.2"   2>&1  | "
C:\WINDOWS\system32\find.exe" /I /C "c:\j2sdk1.4.2"  1>nul

C:\source\maven>if not errorlevel 1 goto chkMHome

C:\source\maven>if not "c:\progra~1\maven" == "" goto valMHome

C:\source\maven>"C:\WINDOWS\system32\cmd.exe" /C DIR "c:\progra~1\maven"   2>&1
 | "C:\WINDOWS\system32\find.exe" /I /C "c:\progra~1\maven"  1>nul

C:\source\maven>if not errorlevel 1 goto init

C:\source\maven>if NOT "Windows_NT" == "Windows_NT" goto Win9xArg

C:\source\maven>if "eval[2+2]" == "4" goto 4NTArgs

C:\source\maven>set MAVEN_CMD_LINE_ARGS="-Dmaven.home.local=C:\Documents and Set
tings\dion/.maven" clean

C:\source\maven>goto endInit

C:\source\maven>if "" == "" SET MAVEN_OPTS="-Xmx160m"

C:\source\maven>SET MAVEN_JAVA_EXE="c:\j2sdk1.4.2\bin\java.exe"

C:\source\maven>SET MAVEN_CLASSPATH="c:\progra~1\maven\lib\forehead-1.0-beta-4.j
ar"

C:\source\maven>SET MAVEN_MAIN_CLASS="com.werken.forehead.Forehead"

C:\source\maven>SET MAVEN_ENDORSED="-Djava.endorsed.dirs=c:\j2sdk1.4.2\lib\endor
sed;c:\progra~1\maven\lib\endorsed"

C:\source\maven>if not "C:\Documents and Settings\dion/.maven" == "" goto StartM
HL

C:\source\maven>"c:\j2sdk1.4.2\bin\java.exe" -Djavax.xml.parsers.DocumentBuilder
Factory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SA
XParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl "-Dmaven.home=c:\prog
ra~1\maven" "-Dmaven.home.local=C:\Documents and Settings\dion/.maven" "-Dtools.
jar=c:\j2sdk1.4.2\lib\tools.jar" "-Dforehead.conf.file=c:\progra~1\maven\bin\for
ehead.conf" "-Djava.endorsed.dirs=c:\j2sdk1.4.2\lib\endorsed;c:\progra~1\maven\l
ib\endorsed" "-Xmx160m" -classpath "c:\progra~1\maven\lib\forehead-1.0-beta-4.ja
r" "com.werken.forehead.Forehead" "-Dmaven.home.local=C:\Documents and Settings\
dion/.maven" clean
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-666


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-666
    Summary: maven.bat dosen't work when JAVA_HOME or MAVEN_HOME contains space 
character
       Type: Bug

     Status: Unassigned
   Priority: Major

 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             core
   Versions:
             1.0-beta-10

   Assignee: 
   Reporter: Uijin Hong

    Created: Sun, 10 Aug 2003 9:43 PM
    Updated: Sun, 10 Aug 2003 9:43 PM
Environment: OS : Windows 2003 Server

Description:
It's normal to use some space characters at file name or directory name these days,

But maven won't support it in the maven.bat script.

here is how to reproduce

---

0. Windows 2003 Server, run cmd.exe and enter follows
1. set JAVA_HOME=C:\Program Files\Java\JDK\
2. set MAVEN_HOME=C:\Some Directory Name That Has A Space Character\Maven\
3. set PATH=%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%PATH%
4. set MAVEN_BATCH_ECHO=on
5. maven.bat

and here is the generated error when I run with space containing MAVEN_HOME 

--- 

C:\Documents and Settings\HeartBit>maven

C:\Documents and Settings\HeartBit>if exist "\mavenrc_pre.bat" call "\mavenrc_pr
e.bat"

C:\Documents and Settings\HeartBit>if "Windows_NT" == "Windows_NT"

C:\Documents and Settings\HeartBit>set MAVEN_COMMAND_COM="cmd.exe"

C:\Documents and Settings\HeartBit>if exist "C:\WINDOWS\system32\cmd.exe" set MA
VEN_COMMAND_COM="C:\WINDOWS\system32\cmd.exe"

C:\Documents and Settings\HeartBit>if exist "C:\WINDOWS\command.com" set MAVEN_C
OMMAND_COM="C:\WINDOWS\command.com"

C:\Documents and Settings\HeartBit>set MAVEN_FIND_EXE="find.exe"

C:\Documents and Settings\HeartBit>if exist "C:\WINDOWS\system32\find.exe" set M
AVEN_FIND_EXE="C:\WINDOWS\system32\find.exe"

C:\Documents and Settings\HeartBit>if exist "C:\WINDOWS\command\find.exe" set MA
VEN_FIND_EXE="C:\WINDOWS\command\find.exe"

C:\Documents and Settings\HeartBit>if not "C:\Progra~1\Java\j2re1.4.2" == "" got
o OkJHome

C:\Documents and Settings\HeartBit>"C:\WINDOWS\system32\cmd.exe" /C DIR "C:\Prog
ra~1\Java\j2re1.4.2"   2>&1  | "C:\WINDOWS\system32\find.exe" /I /C "C:\Progra~1
\Java\j2re1.4.2"  1>nul

C:\Documents and Settings\HeartBit>if not errorlevel 1 goto chkMHome
and was unexpected at this time.

C:\Documents and Settings\HeartBit>if not ""C:\Documents and Settings\HeartBit\M
y Documents\My Program Files\maven""=="" goto valMHome

C:\Documents and Settings\HeartBit>



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to