gpt4 book ai didi

jakarta-ee - 如何使用 tomcat7-maven-plugin 部署到远程服务器

转载 作者:行者123 更新时间:2023-11-28 21:49:46 27 4
gpt4 key购买 nike

我想使用 tomcat7-maven-plugin 将 war 文件从我的本地机器部署到远程服务器,这是我目前的配置:

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<server>pb</server>
<url>http://mydomain.com:8080/manager/html</url>
</configuration>
</plugin>

我需要更多配置吗?我使用什么命令进行部署?

最佳答案

我必须将以下内容添加到 settings.xml:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">


<servers>
<server>
<id>pb</id>
<username>myuser</username>
<password>mypass</password>
</server>
</servers>

</settings>

并使用命令mvn tomcat7:deploy

关于jakarta-ee - 如何使用 tomcat7-maven-plugin 部署到远程服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11274968/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com