Glen Mazza created MTOMCAT-194: ---------------------------------- Summary: Odd error message in switching from Codehaus to Maven Tomcat6 plugin Key: MTOMCAT-194 URL: https://issues.apache.org/jira/browse/MTOMCAT-194 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat6 Affects Versions: 2.0 Environment: Ubuntu, JDK 7, CXF 2.6.x branch. Reporter: Glen Mazza Assignee: Olivier Lamy (*$^¨%`£) Priority: Minor
Hi, in the CXF JAX-RS (REST) plugin, if I switch from the Codehaus Tomcat plugin to the Tomcat6 plugin (not Tomcat7 because this 2.6.x branch of CXF needs to be Java 5 compatible) and run "mvn clean install" on a project generated from the archetype it fails with a strange error of "Document base /media/work1/opensource/testrest/target/${project.build.finalName" not being available. Note there's no ending "}" in that error message; also my generated project make no reference to a project.build.finalName anywhere. Exact error message w/"mvn clean install": [INFO] Building war: /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT.war [INFO] WEB-INF/web.xml already added, skipping [INFO] [INFO] <<< tomcat6-maven-plugin:2.0:run-war (start-tomcat) @ testrest <<< [INFO] [INFO] --- tomcat6-maven-plugin:2.0:run-war (start-tomcat) @ testrest --- [INFO] Running war on http://localhost:43769/jaxrs-service [INFO] Creating Tomcat server configuration at /media/work1/opensource/testrest/target/tomcat Dec 08, 2012 3:22:25 PM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Dec 08, 2012 3:22:25 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Dec 08, 2012 3:22:25 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /media/work1/opensource/testrest/target/${project.build.finalName does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) at org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo.startContainer(AbstractRunMojo.java:850) at org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo.execute(AbstractRunMojo.java:429) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) The code will work with the Tomcat 7 plugin, albeit with the minor problem described in MTOMCAT-193. Steps to reproduce: 1.) Update the CXF 2.6.x branch of the archetype's pom resource (http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml?view=markup), changing the two references there of org.codehaus.mojo:tomcat-maven-plugin to org.apache.tomcat.maven:tomcat6-maven-plugin:2.0. mvn clean install from the archetype folder to install the new archetype in your local repository. 2.) Create a new project using this archetype. Run "mvn clean install" on the new project and you'll see the above error. Note I see either of two potential errors occurring here: 1.) My archetype pom is incorrect as a result of switching to the new Apache plugin, there's something else I must now configure within the pom. (Please inform me if you know what.) If so, the error message given "${project.build.finalName does not exist or is not a readable directory" should be make more relevant and informative, if possible, about what I'm doing wrong or 2.) There's just an internal bug within the Tomcat6 plugin that needs fixing for this error to go away. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org