【问题标题】:Moving web-inf/lib jars to Tomcat/myownlib during deployment在部署期间将 web-inf/lib jar 移动到 Tomcat/myownlib
【发布时间】:2015-10-09 06:58:32
【问题描述】:

在此先感谢... 我有 7 个 webapps 并希望将所有相应的 WEB-INF/lib 移动到 Tomcat/myownlib。我知道可以通过手动复制它们并在 catalina.properties 中配置路径来轻松完成。它工作正常。但期待它应该完成在部署期间,当战争被取消存档或任何建议也欢迎自动进行。

【问题讨论】:

    标签: java tomcat tomcat7 tomcat8 maven-tomcat-plugin


    【解决方案1】:

    在 tomcat undeploy 期间无法自动执行此操作。 tomcat中没有指令或进程。

    但您已将问题标记为“maven-tomcat-plugin”部署之前的步骤,将所有库复制到共享的 tomcat 文件夹并重新启动 tomcat。

    重要!复制库后需要重新启动 tomcat。共享库仅在启动时加载。

    例子:

    <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <executions>
        <execution>
        <phase>package</phase>
        <goals>
          <goal>run</goal>
        </goals>
        <configuration>
          <tasks>
            <move file="from file" tofile="to file"/>
          </tasks>
        </configuration>
        </execution>
      </executions>
    </plugin>
    

    【讨论】:

      猜你喜欢
      • 2022-08-16
      • 1970-01-01
      • 2011-03-24
      • 1970-01-01
      • 1970-01-01
      • 2011-01-31
      • 1970-01-01
      • 2015-09-17
      • 1970-01-01
      相关资源
      最近更新 更多