When attempting to execute mvn tomcat:run
right after a clean, and with a configured tomcatWebXml
specified in the pom, I get a FileNotFoundException.
Here's the snippet from my POM:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<path>/licensing</path>
<tomcatWebXml>${basedir}/src/main/mock/web.xml</tomcatWebXml>
</configuration>
</plugin>
And here's the error I experience, but only on the first invocation after a clean, subsequent invocations find the file and work fine.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Could not create Tomcat configuration
Embedded error: C:\..snip..\src\main\mock\web.xml
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Could not create Tomcat
configuration
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:703)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:553)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:523)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4
1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not create Tomc
at configuration
at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java
:153)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:678)
... 17 more
**Caused by: java.io.FileNotFoundException: C:\...snip..\src\main\mock\web.xml**
at org.codehaus.mojo.tomcat.AbstractRunMojo.copyFile(AbstractRunMojo.jav
a:326)
at org.codehaus.mojo.tomcat.AbstractRunMojo.initConfiguration(AbstractRu
nMojo.java:273)
at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java
:143)
... 19 more
Any ideas on how I could resolve this? If it's an unconditional bug, it would seem to be the sort of thing that would affect anyone & everyone.