Jenkins + maven + svn + tomcat for automatic deployment, jenkinsmaven
Jenkins maven svn tomcat installation is skipped and Baidu is required.
1. log on to jenkins and create a maven project.
2. For source code management, select svn and make the following settings:
Repository URL: Path of the Code on svn
Credentials: username and password for logging on to svn
3. Build a trigger
Check Poll Scm, set the calendar to H/5 *****, and check for code updates every 5 minutes.
4. Build settings
Root POM: pom. xml
Goals and options: clean install
5. Set email notification to build the email address that fails to be sent
6. Post-build operations
WAR/EAR files: Path of the war package
Context path: Project path
Containers: tomcat8 used here
Credentials: the username and password used to access tomcat. Locate the tomat-users.xml In the conf file under the tomcat installation directory and add the following two lines of code
Rolename must be manage-script
Tomcat URL: tomcat path, set http: // 127.0.0.1: 8082/
7. The settings are complete, save, and build now. You must start tomcat before building it. Otherwise, the building fails.
Ps:
At the beginning of building an error was reported, some of the information said tomcat-users.xml files need to be set like this
Later I found that this is not the reason. The tomcat URL path is set incorrectly. The original http: // 127.0.0.1: 8082/hello/is to put the project in this directory. Correct settings are shown in, and placed in content path.
Before that, you need to configure jdk and maven in system Settings> global tool configuration.