ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schrenk <oliver.schr...@gmail.com>
Subject Problems resolving paths in copy's "tofile" when combining multiple properties
Date Wed, 03 Mar 2010 13:26:34 GMT
Hi,

I use an Ant script that shows different behavior on the Mac and Windows
platform. Both Ant are used from within Eclipse

Mac: Eclipse 3.5 (Build-id, 20090621-0832) with Ant 1.7.1.v20090120-1145
Windows: Eclipse 3.5 (Build id: 20100218-1602) with Ant 1.7.1.v20090120-1145

In particular it fails on the Windows machine with (ran from inside the
project):

Buildfile: C:\Development\eclipseEE\workspace\acmeproject\build.xml
init:
compile:
    [copy] Copying 1 file to
C:\Development\eclipseEE\workspace\acmeproject\build\classesC:\Development\eclipseEE\workspace\acmeproject\src\acme\servlet

BUILD FAILED
C:\Development\eclipseEE\workspace\acmeproject\build.xml:86: Failed to copy
C:\Development\eclipseEE\workspace\acmeproject\src\acme\servlet\messages.properties
to
C:\Development\eclipseEE\workspace\acmeproject\build\classesC:\Development\eclipseEE\workspace\acmeproject\src\acme\servlet\messages.properties
due to java.io.FileNotFoundException
C:\Development\eclipseEE\workspace\acmeproject\build\classesC:\Developement\eclipseEE\workspace\acmeproject\src\acme\servlet\messages.properties
(Die Syntax f├╝r den Dateinamen, Verzeichnisnamen oder die
Datentr├Ągerbezeichnung ist falsch)

Total time: 282 milliseconds



Here is an excerpt from the build file:

<project name="Project" default="preview" basedir=".">

<property name="build" location="build" />
<property name="classes" location="${build}/classes" />
<property name="properties-path"
location="/acme/servlet/messages.properties" />

<!-- snip -->

<target name="compile" depends="init" description="compile the source ">
<!-- Next line is line 86 -->
<copy file="${properties-path}" tofile="${classes}${properties-path}" />
<!-- snip -->
</target>
 <!-- snip -->
</project>

So what seems to happen is that ${classes} AND ${properties-path} are each
transformed into a full path. instead of resolving each property-variable
first, concatenating them and then transforming that into a path (like it
does on the Mac).


Is this a known issue, expected behavior or just bland misuse of properties
on my part?

Best regards
Oliver Schrenk

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message