将项目文件夹并行部署到tomcat和本地repo中

时间:2015-08-17 13:44:56

标签: java maven tomcat

是否可以同时将项目部署到maven本地存储库和tomcat?

目前,我正在使用这种方法将我的应用程序部署到tomcat。但我需要同时将其部署到本地仓库(mvn install)。

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <url>http://localhost:8080/manager/text</url>
        <server>TomcatServer</server>
        <path>/myapp</path>
    </configuration>
</plugin>

如何通过eclipse或命令行进行此配置?

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ spring-rest ---
[INFO] Packaging webapp
[INFO] Assembling webapp [spring-rest] in [/home/trever/workspace/spring-rest/target/spring-rest]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/trever/workspace/spring-rest/src/main/webapp]
[INFO] Webapp assembled in [842 msecs]
[INFO] Building war: /home/trever/workspace/spring-rest/target/spring-rest.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) @ spring-rest <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ spring-rest ---
[INFO] Deploying war to http://localhost:8080/spring-rest  
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fspring-rest
Uploaded: http://localhost:8080/manager/text/deploy?path=%2Fspring-rest (14407 KB at 100748.0 KB/sec)

[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Deployed application at context path /spring-rest
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.269s
[INFO] Finished at: Mon Aug 17 19:29:03 IST 2015
[INFO] Final Memory: 13M/201M
[INFO] ------------------------------------------------------------------------

0 个答案:

没有答案