28 maven-2 maven-plugin tomcat7
我只想仔细检查,是否有人发现或正在使用Tomcat 7插件?如果没有,是否有人有兴趣帮我启动并运行?
我想要另一种快速替代Glassfish,JBoss AS 6.0对于快速模型仍然有点沉重.
沃尔特
ray*_*.ng 41
它对我有用,如下所示.
我的setting.xml
<server>
<id>local_tomcat</id>
<username>ray</username>
<password>password</password>
</server>
Run Code Online (Sandbox Code Playgroud)
我的插件配置
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<server>local_tomcat</server>
<url>http://localhost:8080/manager/text</url>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我的tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user password="password" roles="manager-gui, manager-script" username="ray"/>
Run Code Online (Sandbox Code Playgroud)
Mah*_*leh 13
我使用Apache 的官方Tomcat7 Maven插件如下:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<path>/${project.artifactId}</path>
<port>8080</port>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
并运行它: mvn tomcat7:run
小智 7
使用maven货物,您可以通过以下方式配置您的项目:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<type>installed</type>
<home>${catalina.home}</home>
</container>
<configuration>
<type>existing</type>
<home>${catalina.home}</home>
</configuration>
<deployer>
<type>installed</type>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
不要忘记配置你的catalina.home财产
您可以使用以下方式部署它:
mvn cargo:deploy
Run Code Online (Sandbox Code Playgroud)
有一个由Tom Tomcat团队开发的Tomcat Maven插件 7插件.
目前,您必须签出源并将其安装到本地存储库.之后你可以在你的pom的插件部分使用它:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<executions>
<execution>
<id>start-tomcat</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<path>/</path>
<serverXml>src/main/tomcatconf/server.xml</serverXml>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
连续三天出现此错误后,这是我的解决方案:
您用于连接的用户至少需要角色管理器脚本.在/conf/tomcat-users.xml中
<role rolename="manager-script"/>
<user username="test" password="test" roles="manager-script"/>
Run Code Online (Sandbox Code Playgroud)
在您的pom.xml中,包含以下插件
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<url>http://server.url:8080/manager/text</url>
<path>/YourApp</path>
<username>test</username>
<password>test</password>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
与我在互联网上发现的相反,您不需要编辑您的maven setting.xml.tomcat7-maven-plugin可以直接在配置标记中配置
url-tag的一个词:我测试了后缀
其中只有/经理/文字有效
我的版本:
| 归档时间: |
|
| 查看次数: |
44751 次 |
| 最近记录: |