1 Deployment Jenkins
Jenkins deployment is simple, just create a new application, deploy the Jenkins War package, and then assign the right permissions.
1.1 Creating Applications
Establish a new Nginx application: jenkins.com
1.2 Department War package
Upload Jenkins.war to/jenkins.com, extract and assign permissions:
JAR–XVF Jenkins.war
Chown-radmin:admin jenkins.com/
1.3 Restart Service
Start Tomcat service: Tomcat restart
Restart Nginx Service: Nginx-s Reload
2 Configuration Jenkins
2.1 Global Configuration
The home directory for JDK and MAVEN needs to be developed in the global configuration:
If MAVEN is not installed, you can upload maven to apache-maven-2.2.1 and modify the folder permissions:
Chown-r Admin:admin APACHE-MAVEN-2.2.1/
2.2 project configuration
Create a new job on the Jenkins homepage, type maven build. Then configure the project's SVN address and root Pom.xml path:
After you enter the SVN address, you may be prompted not to configure the SVN authentication method:
Click the Red section of enter credential to configure the SVN authentication method. Select User name/password authentication method, enter username and password.
2.3 Start building
Back to Jenkins home page, click on the right side of the project to start building immediately, test if there are any errors. The first time you build a jar package that needs to download Maven can be slow and need to be patient.
4 Plug-in configuration
4.1 Installing Plug-ins
First in the System configuration-> Management plug-in, install the required plug-ins, such as PMD, Checkstyle, FindBugs and so on.
4.2 Configuration FindBugs
First add the configuration in root pom.xml and submit it to SVN:
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
</plugins>
</reporting>
Then add the FindBugs target to the goal of the project:
Rebuild once to view the FindBugs report:
4.3 other plugins
PMD, Checkstyle and other plug-in installation and configuration methods ibid. Please refer to the root pom.xml configuration.
Maven goal set to: Pmd:pmdcheckstyle:checkstyle
reference materials
1 FindBugs
Https://wiki.jenkins-ci.org/display/JENKINS/FindBugs+Plugin
2 PMD
http://maven.apache.org/plugins/maven-pmd-plugin/