dev@glassfish.java.net

Re: entity-persistence does not build when path contains a blank

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 11 Dec 2006 14:26:34 -0800

Hi Michael,

Is it entity-persistence specific problem? Can you build GF from a
directory with spaces in its name?

thanks,
-marina

Michael Bouschen wrote On 12/11/06 11:30,:
> Hi Markus,
>
> good catch! I have the feeling this is caused by the way the maven goal
> invoke-ant calls the ant Main class. The goal is defined in the
> maven.xml under bootstrap. It passes all the options and -D settings in
> a single <arg line ="..."/> element:
> <arg line="-f ${build.file} -Dglassfish.maven=${glassfish.maven}
> -Dglassfish.home=${glassfish.home} ... />
> ant splits this into different command line argument by looking for
> blanks and this fails if one of the system properties includes a blank.
> E.g. if ${glassfish.home}includes a blank, then
> -Dglassfish.home=${glassfish.home} results in two arguments: one -D
> setting using the text up to the blank and another argument interpreted
> as target of the ant call.
>
> I propose to update maven.xml under bootstrap and replace the <arg
> line="..."/> by multiple <arg value="..."/> elements. I started doing
> this. Attached you find a patch file that allows me to build
> entity-persistence from a directory including blanks. I did not replace
> all the arguments from the <arg line="..."/> just the ones where I
> thought they could include blanks.
>
> Regards Michael
>
>
>>If Windows is running on a German PC, then the folder containing a
>>user's private files is called "C:\Dokumente und Einstellungen" - it
>>contains blanks! As Eclipse's default location for the workspace is in
>>that folder, I moved my entity-persistence working copy into that
>>folder. As a result, I cannot build: It tells me that "und" is not a
>>valid target! Actually the maven script seems to scan for the name of
>>the current folder and then tokenizes it.
>>
>>I workaround by moving my workspace to a folder without blanks in the
>>name, but this is not very smart. The script should be corrected.
>>
>>Thanks
>>Markus
>
>
>
> ------------------------------------------------------------------------
>
> Index: maven.xml
> ===================================================================
> RCS file: /cvs/glassfish/bootstrap/maven.xml,v
> retrieving revision 1.57
> diff -c -r1.57 maven.xml
> *** maven.xml 8 Dec 2006 23:52:59 -0000 1.57
> --- maven.xml 11 Dec 2006 19:13:22 -0000
> ***************
> *** 528,534 ****
> <j:if test='${maven.debugOn}'>
> <arg value='-debug' />
> </j:if>
> ! <arg line="-f ${build.file} -Dglassfish.maven=${glassfish.maven} -Dglassfish.home=${glassfish.home} ${ant.target} -Dbuild_id=${build_id} -Dmaven.proxy.host=${maven.proxy.host} -Dmaven.proxy.port=${maven.proxy.port} -Dnative.build=${native.build} -Duse.jks=${use.jks} ${ant.verbose}"/>
> </java>
>
> <!-- If an error occured, make sure we reports it -->
> --- 528,539 ----
> <j:if test='${maven.debugOn}'>
> <arg value='-debug' />
> </j:if>
> ! <arg value="-f"/>
> ! <arg value="${build.file}"/>
> ! <arg value="${ant.target}"/>
> ! <arg value="-Dglassfish.maven=${glassfish.maven}"/>
> ! <arg value="-Dglassfish.home=${glassfish.home}"/>
> ! <arg line="-Dbuild_id=${build_id} -Dmaven.proxy.host=${maven.proxy.host} -Dmaven.proxy.port=${maven.proxy.port} -Dnative.build=${native.build} -Duse.jks=${use.jks} ${ant.verbose}"/>
> </java>
>
> <!-- If an error occured, make sure we reports it -->
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net