Hi,

It seems that Maven 2.0.9 has introduced a bug where Windows absolute
paths aren't being properly resolved.  A project that builds just fine
with 2.0.8 produces this error under 2.0.9:

[INFO] An Ant BuildException has occured: Failed to copy E:\svn\team\csa\main\re
sources\WEB-INF\log4j-production.xml to E:\svn\team\csa\main\e:\temp\maven\csa\t
arget\csa-5.2.1\WEB-INF\classes\log4j.xml due to java.io.FileNotFoundException E
:\svn\team\csa\main\e:\temp\maven\csa\target\csa-5.2.1\WEB-INF\classes\log4j.xml
 (The filename, directory name, or volume label syntax is incorrect)

Notice that "e:" is being treated as a relative path.

Here's the plugin where the error happens:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>copy-extra</id>
                        <phase>process-resources</phase>
                        <configuration>
                            <tasks>
                                <copy
tofile="${buildDirectory}/${artifactId}-${version}/WEB-INF/classes/log4j.xml"

file="resources/WEB-INF/log4j-production.xml"
                                      overwrite="true"/>
                                <copy
tofile="${buildDirectory}/${artifactId}-${version}/META-INF/context.xml"
                                      file="resources/WEB-INF/conf/context.xml"
                                      overwrite="true"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

${buildDirectory} is defined in the same pom as:

        <buildDirectory>${project.build.directory}</buildDirectory>

And the project's output directory is set in a parent pom:

     <outputDirectory>${buildDir}/classes</outputDirectory>

   <properties>
     <workDir>${java.io.tmpdir}</workDir>
     <buildDir>${workDir}/maven/${pom.artifactId}/target</buildDir>
   </properties>


Has anyone seen this or similar problem before, any ideas how to solve it?

I've tried compiling the latest version of Maven 2.1 from the
subversion repo and I'm getting the same error there too.


Thanks
Dmitry

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

Reply via email to