I. Installation and Deployment Jenkins
1. Download Jenkins.war (http://jenkins-ci.org/)
2. Create a new Tomcat server, configure the Port config information, and point the project address to the Jenkins.war file
3. Start the Tomcat server, open the Access address http://127.0.0.1:8000 with the browser after successful startup, and see if Jenkins is successfully deployed (for example).
Ii. configuring Jenkins and Maven dependencies
1, Jenkins needs to rely on the JDK, if the server does not install the JDK need to install the JDK first, because we want to build with Maven, we need to install Maven first. (Modify/etc/profile, add jdk, maven path, and source refresh)
1. Jenkins menu root directory-System administration-System Settings page Configure JDK and Maven dependencies, click Add JDK, add Maven button to configure JDK and Maven path.
2, if you need to be able to configure the mail notification, when the project build failed, Jenkins will automatically send error report to the notification mailbox, note that since the sending of mail to the notification mailbox is the first to configure the sending mailbox (using SMTP authentication input send mailbox user name and password) it is best to test the mailbox, save the current settings after passing.
Iii. Building a Web project
1. New project, select Maven Project
2, the source control bar input The SVN address of the project (Jenkins has inherited SVN so no more server install SVN)
(Note: The first time requires SVN user name, password authorization, after the system automatically saved to change user information)
3, after the configuration selection
①
Building triggers |
Build whenever a SNAPSHOT dependency is built |
Ii
③ Configuring email Notification mailbox
Save it.
The newly created project test has been added, and the project has been built with the click of the Build Link button.
Iv. issues
When a Web project is built, MAVEN will look for a web/web-inf/web.xml (Web project default) file if your project's Web. XML does not need to be added to Pom.xml in this path plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webXml>war\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
War\web-inf\web.xml is the path to your XML.
At this point, Jenkins can basically build a Web project.
Jenkins+svn+maven project build under Linux