Solution to project deployment failure of hudson

Source: Internet
Author: User

Cause:
During the process of building a continuous integration service, you can perform online operations step by step, but you cannot hot deploy the project to Tomcat!
After debugging, I summarized the solution:

Key points for hot Hudson deployment:

(1)


The WAR/EAR files path must point to the war file compiled by Hudson,
Path: D: \ DevelopTools \ HUDSON_HOME \ jobs \ Customer Relationship Management System \ workspace \ target \ mini-web.war
 
(2)
The project here must be a maven project, and the hot deployment plug-in of maven-tomcat-plugin needs to be configured in pom. xml.

<FinalName> mini-web </finalName>
<Plugin>
<GroupId> org. codehaus. mojo </groupId>
<ArtifactId> tomcat-maven-plugin </artifactId>
<Version> 1.1 </version>
<Configuration>
<Url> http: // localhost: 8080/manager </url>
<Username> admin </username>
<Password> admin </password>
<Path>/mini-web </path>
</Configuration>
<Executions>
<Execution>
<Id> tomcat-deploy </id>
<Phase> deploy </phase>
<Goals> <goal> deploy </goal> </goals>
</Execution>
</Executions>
</Plugin>

(3)
Hot deployment is implemented through Tomcat manager Management, so the user must have the corresponding permissions, In the tomcat-users.xml permission configuration as follows
<Role rolename = "manager"/>
<Role rolename = "tomcat"/>
<Role rolename = "admin"/>
<User username = "admin" password = "admin" roles = "tomcat, manager, admin"/>

(4)
You need to add Goals and options: clean install tomcat: redeploy in the build integration configuration of the project.
That is to say, first clean, then install, and then deploy and release after the installation is successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.