ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25721] New: - Exec Task, Arg Path and Quotes (";)
Date Tue, 23 Dec 2003 10:20:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25721>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25721

Exec Task, Arg Path and Quotes (&quot;;)

           Summary: Exec Task, Arg Path and Quotes (&quot;;)
           Product: Ant
           Version: 1.6.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: david.harrigan@hpi.co.uk


Hi,

In Ant 1.6.0 (also in 1.5.4), the exec task process, with arg path is
incorrectly setting the path if &quot; is used. E.g.,

<exec dir="${dist.dir}"
executable="${websphere.dir}/bin/ejbdeploy.${script.filename.extension}"
output="${log.dir}/generatestubs.log">
            <arg path="${dist.dir}/ear.jar"/>
            <arg path="${build.tmp.dir}"/>
            <arg path="${dist.dir}/ear_deployable.jar"/>
            <arg value="-cp"/>
            <arg
path="&quot;${lib.dir}/gnu/regexp/${regexp.version}/regexp.jar:${websphere.dir}/lib/xerces.jar:${dist.dir}/hpiutil.jar&quot;"/>
        </exec>

Using

ant -verbose generatestub (name of the target)

Generating stubs and skeletons, please wait...this may take several minutes...
     [exec] Current OS is Linux
     [exec] Output redirected to
/home/david/public_html/hpc/build/logs/generatestubs.log
     [exec] Executing '/opt/WebSphere/AppServer/bin/ejbdeploy.sh' with arguments:
     [exec] '/home/david/public_html/ear/build/dist/ear.jar'
     [exec] '/home/david/public_html/ear/build/tmp'
     [exec] '/home/david/public_html/ear/build/dist/ear_deployable.jar'
     [exec] '-cp'
     [exec]
'/home/david/public_html/newbuild/"/home/david/public_html/lib/gnu/regexp/1.1.4/regexp.jar:/opt/WebSphere/AppServer/lib/xerces.jar:/home/david/public_html/ear/build/dist/earutil.jar"'

Notice the '/home/david/public_html/newbuild/" at the start of the arg path.
This causes the script to not find the -cp jars. but funnily enough, it works
under Windows (NT/2000/XP).

If I remove the &quot; from the arg path, I get...

[echo] Generating stubs and skeletons, please wait...this may take several
minutes...
     [exec] Current OS is Linux
     [exec] Output redirected to
/home/david/public_html/hpc/build/logs/generatestubs.log
     [exec] Executing '/opt/WebSphere/AppServer/bin/ejbdeploy.sh' with arguments:
     [exec] '/home/david/public_html/ear/build/dist/ear.jar'
     [exec] '/home/david/public_html/ear/build/tmp'
     [exec] '/home/david/public_html/ear/build/dist/ear_deployable.jar'
     [exec] '-cp'
     [exec]
'/home/david/public_html/lib/gnu/regexp/1.1.4/regexp.jar:/opt/WebSphere/AppServer/lib/xerces.jar:/home/david/public_html/hpc/build/dist/earutil.jar'

This correctly makes the script find the jar, but most importantly it now fails
to work under Windows (NT, XP and 2000).

Any clues?

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


Mime
View raw message