You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Blaise Gervais <ge...@gmail.com> on 2012/02/01 12:00:40 UTC
[Apache Tomcat Maven plugin] Howto specify the Document base ?
Dear tomcat users,
I try to use the Tomcat Maven
plugin<http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/index.html>'s
"run" goal on a webapp. The webapp is generated by
Enunciate<http://enunciate.codehaus.org/> into
the "*target\${artifactId}-${version}*" folder. So the tomcat plugin
complains because it can't found the expected document base.
How can I change the document base ?
Thanks.
GRAVE: Error starting static Resources
> java.lang.IllegalArgumentException: Document base
> C:\Dev\Sources\xyz\sample\src\main\webapp does not exist or is not a
> readable directory
> at
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
> at
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
--
Gervais Blaise
Mail : gervais.b@gmail.com
Re: [Apache Tomcat Maven plugin] Howto specify the Document base ?
Posted by Olivier Lamy <ol...@apache.org>.
Hello,
See http://tomcat.apache.org/maven-plugin-2.0-beta-1/tomcat7-maven-plugin/run-mojo.html#warSourceDirectory
So you must be able to configure the plugin :
<configuration>
<warSourceDirectory>target/${artifactId}-${version}</warSourceDirectory>
will be better with
<warSourceDirectory>${project.build.outputDirectory}/${artifactId}-${version}</warSourceDirectory>
</configuration>
2012/2/1 Blaise Gervais <ge...@gmail.com>:
> Dear tomcat users,
>
> I try to use the Tomcat Maven
> plugin<http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/index.html>'s
> "run" goal on a webapp. The webapp is generated by
> Enunciate<http://enunciate.codehaus.org/> into
> the "*target\${artifactId}-${version}*" folder. So the tomcat plugin
> complains because it can't found the expected document base.
>
> How can I change the document base ?
>
> Thanks.
>
> GRAVE: Error starting static Resources
>> java.lang.IllegalArgumentException: Document base
>> C:\Dev\Sources\xyz\sample\src\main\webapp does not exist or is not a
>> readable directory
>> at
>> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
>> at
>> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
>> at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
>> at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
>> at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> at java.lang.Thread.run(Thread.java:662)
>
>
> --
> Gervais Blaise
>
> Mail : gervais.b@gmail.com
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org