Cannot configure tomcat on Windows using absolute path

Description

I want to patch the server.xml of the Tomcat installed the following way:

In the cargo-maven2-plugin config i use the configfiles section to override the server.xml. The path to the server.xml is absolute and determined by the maven-find-plugin.

1 2 3 4 5 <configfiles> <configfile> <file>${cargo.tomcat7.conf.server.xml.patch}</file> <todir>conf</todir> </configfile>

This work fine on Linux, Sparc etc. On Windows the Cargo-Plugin wants to copy to a non existing dir:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 org.codehaus.cargo.util.CargoException: Failed to copy source file [C:\<hudson-workspace>\src\main\resources\tomcat7x\server.xml] to [<hudson-workspace>\target/tomcat/conf/C:\<hudson-workspace>\src\main\resources\tomcat7x\server.xml] with FilterChain at org.codehaus.cargo.util.DefaultFileHandler.copyFile(DefaultFileHandler.java:190) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configureFiles(AbstractStandaloneLocalConfiguration.java:247) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configure(AbstractStandaloneLocalConfiguration.java:76) at org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.configure(AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.java:123) at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:153) at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStartMojo.java:62) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:268) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) Caused by: java.io.FileNotFoundException: C:\<hudson-workspace>\target\tomcat\conf\C:\<hudson-workspace>\src\main\resources\tomcat7x\server.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.apache.tools.ant.types.resources.FileResource.getOutputStream(FileResource.java:213) at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:373) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:475) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:438) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:404) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:379) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:151) at org.codehaus.cargo.util.DefaultFileHandler.copyFile(DefaultFileHandler.java:139) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configureFiles(AbstractStandaloneLocalConfiguration.java:247) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configure(AbstractStandaloneLocalConfiguration.java:76) at org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.configure(AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.java:123) at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:153) at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStartMojo.java:62) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:268) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)

Status

Assignee

Unassigned

Reporter

Daniel Strassenburg

Components

Fix versions

Affects versions

1.0.6

Priority

Minor