You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by L....@cn.ca on 2007/08/21 20:01:07 UTC

Trouble building application with space in path

I tried to build an application that has a space in the path and it fails.

- I tried with ant 1.6.5 and 1.7.0.
- Other users of this build script have a path with spaces and are not 
having any problems.
- I'm getting this from both the command line and from the IDE (RAD7).

Here's the target that gives me trouble:

        <target name="sqljTranslator" description="Precompile SQLJ files" 
if="sqlj.source.present">
                <copy todir="${sqlj.dir}">
                        <fileset dir="${source.dir}">
                                <include name="**/*.sqlj"/>
                        </fileset>
                </copy>

                <apply executable="sqlj" failonerror="true"
                           parallel="true" verbose="true" 
skipemptyfilesets="true">

                                <arg value="-compile=false"/>
                                <arg 
value="-C-sourcepath=${source.dir}${path.separator}${sqlj.dir}"/>
                                <arg 
value="-C-classpath=${sqlj.precompile.classpath}"/>
 
                        <fileset dir="${sqlj.dir}">
                                <include name="**/*.sqlj"/>
                        </fileset>
                </apply>

                <move todir="${bin.dir}">
                        <fileset dir="${sqlj.dir}">
                                <include name="**/*.ser"/>
                        </fileset>
                </move>
 
        </target>

Running Ant with -debug here's the output I get:
sqljTranslator:
fileset: Setup scanner in dir 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
eBusiness MainMenu Application\JavaSource with patternSet{ includes: 
[**/*.sqlj] excludes: [] }
[copy] ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj omitted as 
ca/cn/common/mainmenu/MainMenuHelperDataMapper.sqlj is up to date.
[apply] Current OS is Windows XP
fileset: Setup scanner in dir 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
eBusiness MainMenu Application\SQLJJavaSource with patternSet{ includes: 
[**/*.sqlj] excludes: [] }
[apply] Executing 'sqlj' with arguments:
[apply] '-compile=false'
[apply] '-C-sourcepath=JavaSource;SQLJJavaSource'
[apply] 
'-C-classpath=../../../Common/COMMON_Framework/Deploy/CN_Services.jar'
[apply] 
'C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
eBusiness MainMenu 
Application\SQLJJavaSource\ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj'
[apply] 
[apply] The ' characters around the executable and arguments are
[apply] not part of the command.
Execute:Java13CommandLauncher: Executing 'sqlj' with arguments:
'-compile=false'
'-C-sourcepath=JavaSource;SQLJJavaSource'
'-C-classpath=../../../Common/COMMON_Framework/Deploy/CN_Services.jar'
'C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
eBusiness MainMenu 
Application\SQLJJavaSource\ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj'

The ' characters around the executable and arguments are
not part of the command.
[apply] 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN: Error: 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN is not 
a valid input filename
[apply] Total 1 error.
[ant] Exiting 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
eBusiness MainMenu Application\build.xml.
[antcall] Exiting 
C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\Build\build.xml.

BUILD FAILED

Any help would be greatly appreciated.
LPC

Re: Trouble building application with space in path

Posted by L....@cn.ca.
Good day,

Thank you for your replies. You're absolutely right about the space. We 
shouldn't have projects name with spaces. Unfortunately I'm not the only 
developer and this is not something that is going to change overnight.

Turns out that I had the wrong sqlj.exe in my path. The Oracle sqlj was 
being executed but I was looking for the IBM one.

Thanks for the help,
LPC



Krzysztof Kucybała <kk...@echo.fr> 
08/22/2007 03:18
Please respond to
"Ant Users List" <us...@ant.apache.org>


To
Ant Users List <us...@ant.apache.org>
cc

Subject
Re: Trouble building application with space in path






I don't know if I'm not missing something out here, but why do You use 
spaces in paths? Change them to underscores and You'll have tons of 
trouble off Your head. One of the very first things I learned in 
computer science was never to put whitespaces where they don't belong - 
identifiers, filenames, directories.

Best regards,
Krzysztof

Rebhan, Gilbert wrote:
> 
> Hi,
> 
> -----Original Message-----
> From: L.Charbonneau@cn.ca [mailto:L.Charbonneau@cn.ca] 
> Sent: Tuesday, August 21, 2007 8:01 PM
> To: user@ant.apache.org
> Subject: Trouble building application with space in path
> 
>> I tried to build an application that has a space in the path and it
> fails.
> 
> Did you try "'...'" ?
> 
> i.e. =
> 
>  "'your/path with/spaces in it/foobar'"
> 
> 
> Regards, Gilbert
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Re: Trouble building application with space in path

Posted by Krzysztof Kucybała <kk...@echo.fr>.
I don't know if I'm not missing something out here, but why do You use 
spaces in paths? Change them to underscores and You'll have tons of 
trouble off Your head. One of the very first things I learned in 
computer science was never to put whitespaces where they don't belong - 
identifiers, filenames, directories.

Best regards,
Krzysztof

Rebhan, Gilbert wrote:
>  
> Hi,
> 
> -----Original Message-----
> From: L.Charbonneau@cn.ca [mailto:L.Charbonneau@cn.ca] 
> Sent: Tuesday, August 21, 2007 8:01 PM
> To: user@ant.apache.org
> Subject: Trouble building application with space in path
> 
>> I tried to build an application that has a space in the path and it
> fails.
> 
> Did you try "'...'" ?
> 
> i.e. =
> 
>  "'your/path with/spaces in it/foobar'"
> 
> 
> Regards, Gilbert
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Trouble building application with space in path

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 
Hi,

-----Original Message-----
From: L.Charbonneau@cn.ca [mailto:L.Charbonneau@cn.ca] 
Sent: Tuesday, August 21, 2007 8:01 PM
To: user@ant.apache.org
Subject: Trouble building application with space in path

>I tried to build an application that has a space in the path and it
fails.

Did you try "'...'" ?

i.e. =

 "'your/path with/spaces in it/foobar'"


Regards, Gilbert




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Trouble building application with space in path

Posted by Ron Wheeler <rw...@artifact-software.com>.
There are still programs and libraries that do not handle legal 
filenames. Space is legal but they have not figured out how to parse a 
filename properly.
You can avoid this by using the 8.3 equivalent name.

cd to the C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common directory and then type dir/x. 
This will give you the 8.3 name of CN eBusiness MainMenu Application directory.


Ron

L.Charbonneau@cn.ca wrote:
> I tried to build an application that has a space in the path and it fails.
>
> - I tried with ant 1.6.5 and 1.7.0.
> - Other users of this build script have a path with spaces and are not 
> having any problems.
> - I'm getting this from both the command line and from the IDE (RAD7).
>
> Here's the target that gives me trouble:
>
>         <target name="sqljTranslator" description="Precompile SQLJ files" 
> if="sqlj.source.present">
>                 <copy todir="${sqlj.dir}">
>                         <fileset dir="${source.dir}">
>                                 <include name="**/*.sqlj"/>
>                         </fileset>
>                 </copy>
>
>                 <apply executable="sqlj" failonerror="true"
>                            parallel="true" verbose="true" 
> skipemptyfilesets="true">
>
>                                 <arg value="-compile=false"/>
>                                 <arg 
> value="-C-sourcepath=${source.dir}${path.separator}${sqlj.dir}"/>
>                                 <arg 
> value="-C-classpath=${sqlj.precompile.classpath}"/>
>  
>                         <fileset dir="${sqlj.dir}">
>                                 <include name="**/*.sqlj"/>
>                         </fileset>
>                 </apply>
>
>                 <move todir="${bin.dir}">
>                         <fileset dir="${sqlj.dir}">
>                                 <include name="**/*.ser"/>
>                         </fileset>
>                 </move>
>  
>         </target>
>
> Running Ant with -debug here's the output I get:
> sqljTranslator:
> fileset: Setup scanner in dir 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
> eBusiness MainMenu Application\JavaSource with patternSet{ includes: 
> [**/*.sqlj] excludes: [] }
> [copy] ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj omitted as 
> ca/cn/common/mainmenu/MainMenuHelperDataMapper.sqlj is up to date.
> [apply] Current OS is Windows XP
> fileset: Setup scanner in dir 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
> eBusiness MainMenu Application\SQLJJavaSource with patternSet{ includes: 
> [**/*.sqlj] excludes: [] }
> [apply] Executing 'sqlj' with arguments:
> [apply] '-compile=false'
> [apply] '-C-sourcepath=JavaSource;SQLJJavaSource'
> [apply] 
> '-C-classpath=../../../Common/COMMON_Framework/Deploy/CN_Services.jar'
> [apply] 
> 'C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
> eBusiness MainMenu 
> Application\SQLJJavaSource\ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj'
> [apply] 
> [apply] The ' characters around the executable and arguments are
> [apply] not part of the command.
> Execute:Java13CommandLauncher: Executing 'sqlj' with arguments:
> '-compile=false'
> '-C-sourcepath=JavaSource;SQLJJavaSource'
> '-C-classpath=../../../Common/COMMON_Framework/Deploy/CN_Services.jar'
> 'C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
> eBusiness MainMenu 
> Application\SQLJJavaSource\ca\cn\common\mainmenu\MainMenuHelperDataMapper.sqlj'
>
> The ' characters around the executable and arguments are
> not part of the command.
> [apply] 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN: Error: 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN is not 
> a valid input filename
> [apply] Total 1 error.
> [ant] Exiting 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\CN 
> eBusiness MainMenu Application\build.xml.
> [antcall] Exiting 
> C:\cc_dev\charbo12_core_CommonIntegration\Ebusiness\EBUS_Common\Build\build.xml.
>
> BUILD FAILED
>
> Any help would be greatly appreciated.
> LPC
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org