【问题标题】:maven tomcat plugin configurationmaven tomcat插件配置
【发布时间】:2013-06-21 11:19:40
【问题描述】:

要求是使用maven插件在tomcat根目录下部署应用程序。

<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>

上面是在根目录下部署应用程序,但问题是应用程序使用存储在应用程序外部的“静态”文件夹中的图像、javascript 和其他 pdf 文件(大尺寸)。 c:\static\

请建议 pom.xml 中所需的配置以访问如下图像。 http://www.myhost.com:8080/static/image.js http://www.myhost.com:8080/static/about.pdf

【问题讨论】:

    标签: java maven tomcat


    【解决方案1】:

    你可以像这样获得嵌入式tomcat7插件:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-19
      • 2013-11-21
      • 2017-07-22
      • 2011-06-23
      • 2015-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多