You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dmitry Beransky <dm...@gmail.com> on 2008/12/16 23:56:05 UTC

maven 2.0.9+ and windows absolute paths

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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven 2.0.9+ and windows absolute paths

Posted by Dmitry Beransky <dm...@gmail.com>.
Another datapoint:

I've taken out the ant plugin where the problem was showing up before,
so now the Cargo plugin is failing with the same error.  Here's my
Cargo configuration:

                <configuration>
                    <container>
                        <containerId>tomcat5x</containerId>
                        <type>remote</type>
                    </container>

                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.tomcat.manager.url>
                                ${appserver.home}:8100/manager
                            </cargo.tomcat.manager.url>
                            <cargo.remote.username>csa</cargo.remote.username>
                            <cargo.remote.password>checkit
                            </cargo.remote.password>
                        </properties>
                    </configuration>

                    <deployer>
                        <type>remote</type>
                        <deployables>
                            <deployable>
                                <groupId>com.csatp.website</groupId>
                                <artifactId>csa</artifactId>
                                <location>
                                    ${project.build.directory}/${warName}.war
                                </location>
                                <type>war</type>
                            </deployable>
                        </deployables>
                    </deployer>
                </configuration>
            </plugin>


Just like the ant plugin before, Cargo configuration uses
${project.build.directory} variable that comes through with an
incorrectly resolved Windows path.


Dmitry
On Wed, Dec 17, 2008 at 10:50 AM, Dmitry Beransky
<dm...@gmail.com> wrote:
> On Tue, Dec 16, 2008 at 3:34 PM, Jörg Schaible <jo...@gmx.de> wrote:
>> Dmitry Beransky wrote:
>>
>>> Hi,
>>>
>>> It seems that Maven 2.0.9 has introduced a bug where Windows absolute
>>> paths aren't being properly resolved.
>>
>> [snip]
>>
>> Are you running Maven under Cygwin?
>
> Nope, pure unadulterated Windows.
>

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


Re: maven 2.0.9+ and windows absolute paths

Posted by Dmitry Beransky <dm...@gmail.com>.
On Tue, Dec 16, 2008 at 3:34 PM, Jörg Schaible <jo...@gmx.de> wrote:
> Dmitry Beransky wrote:
>
>> Hi,
>>
>> It seems that Maven 2.0.9 has introduced a bug where Windows absolute
>> paths aren't being properly resolved.
>
> [snip]
>
> Are you running Maven under Cygwin?

Nope, pure unadulterated Windows.

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


Re: maven 2.0.9+ and windows absolute paths

Posted by Jörg Schaible <jo...@gmx.de>.
Dmitry Beransky wrote:

> Hi,
> 
> It seems that Maven 2.0.9 has introduced a bug where Windows absolute
> paths aren't being properly resolved.

[snip]

Are you running Maven under Cygwin?

- Jörg


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