You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Blackbird <pa...@yahoo.fr> on 2009/06/19 15:26:03 UTC

Backslash colon problem with ${basedir} using maven-plugin-tools-ant

I'm calling an Ant target using Java. I'm using the:
    <groupId>org.apache.maven.plugin-tools</groupId>
    <artifactId>maven-plugin-tools-ant</artifactId>
    <version>2.4</version>
plugin.

I have the following "build_foo.xml" Ant script in my Maven source dir:
    <project name="build_foo" default="info" basedir=".">
        <target name="info">
            <mkdir dir="${basedir}/foo" />
        </target>
    </project>

Upon calling "mvn clean package", this file is copied in the
"target/classes" directory, with the following content:
    <project name="build_foo" default="info" basedir=".">
        <target name="info">
            <mkdir dir="C\:\\Program
Files\\eclipse-3.4\\workspace\\maven-agp-plugin/foo" />
        </target>
    </project>

Then, doing "ant -f target/classes/build_foo.xml" fails with this error:
    C:\Program
Files\eclipse-3.4\workspace\maven-agp-plugin\target\classes\build_foo.xml:4:
Directory C:\Program
Files\eclipse-3.4\workspace\maven-agp-plugin\target\classes\C\:\Program
Files\eclipse-3.4\workspace\maven-agp-plugin\foo creation was not successful
for an unknown reason

Basically, it fails because of the backslash before the colon ("C\:").


Is this a bug in the Ant Maven plugin?
-- 
View this message in context: http://www.nabble.com/Backslash-colon-problem-with-%24%7Bbasedir%7D-using-maven-plugin-tools-ant-tp24111308p24111308.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Backslash colon problem with ${basedir} using maven-plugin-tools-ant

Posted by Blackbird <pa...@yahoo.fr>.
=== Problem solved ===

The ${basedir} variable was replaced because in the project's POM I had
specified <filtering>true</filtering> for the directory enclosing the Ant
script file.
I still think there is a bug in the Ant plugin (adding the backslash before
the colon).
-- 
View this message in context: http://www.nabble.com/Backslash-colon-problem-with-%24%7Bbasedir%7D-using-maven-plugin-tools-ant-tp24111308p24149242.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Backslash colon problem with ${basedir} using maven-plugin-tools-ant

Posted by Blackbird <pa...@yahoo.fr>.
Hasn't anyone faced this problem? I really need some help there..
-- 
View this message in context: http://www.nabble.com/Backslash-colon-problem-with-%24%7Bbasedir%7D-using-maven-plugin-tools-ant-tp24111308p24142465.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Backslash colon problem with ${basedir} using maven-plugin-tools-ant

Posted by Blackbird <pa...@yahoo.fr>.
Why does "mvn package" transform "${basedir}" to a hard-coded directory
anyway? I don't see any particular reason for doing this...
-- 
View this message in context: http://www.nabble.com/Backslash-colon-problem-with-%24%7Bbasedir%7D-using-maven-plugin-tools-ant-tp24111308p24111587.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org