Mahadev Shinde
Mahadev Shinde

Reputation: 119

maven tomcat plugin configuration

Requirement is to deploy application at tomcat root using maven plugin.

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
    <url>http://www.myhost.com:8080/manager</url>
    <server>tomcat6</server>
    <path>/</path>
    <contextFile>src/main/tomcatconf/context.xml</contextFile>
    <mode>context</mode>        
</configuration>

Above is deploying application at root but the problem is application using images, javascript and other pdf files (of large size) from a folder "static" which is stored outside application. c:\static\

Please suggest for configuration required in pom.xml to access images like below. http://www.myhost.com:8080/static/image.js http://www.myhost.com:8080/static/about.pdf

Upvotes: 0

Views: 1032

Answers (1)

Masudul
Masudul

Reputation: 21961

You can get embedded tomcat7 plugin like this:

  <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0</version>
  </plugin> 

Upvotes: 1

Related Questions