Tool Preparation: Jenkins 1.65 official website https://jenkins.io/index.html maven 3 Jdk 1.7 eclpse 4.6 Start: Prepare a Maven project: According to this, you can http://www.cnblogs. Com/leioolei/p/3361633.html, it should be noted that there may not be able to find the "further configuration available", this time the "Dynamic Web module" ticked off, and then exit and then enter it. Wonderful. When you're done, upload svn.
installation of Jenkins:I want to use the jenkins2.7, but the plugin always fails to install, the final download version 1.65 version of the War,war benefit is put in Tomcat directly can be used. Can be based on this step by step: http://www.cnblogs.com/sunzhenchao/archive/2013/01/30/2883289.html SVN Chinese directory does not recognize the problem, In confirming that Tomcat has set the encoding format, I am using the upgrade plugin in Jenkins to the latest version of the way to solve (frustration automatic download failure, directly manually download the plug-in, and then manually upload the installation in the console successfully) to perform the build, error, maven compilation problem, Need to add in Maven's Setting.xml file
<profile>
<id>jdk-1.7</id>
<activation>
<activebydefault>true</ activebydefault>
<jdk>1.7</jdk>
</activation>
<properties>
< Maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</ Maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</profile>
Increase in the pom.xml of your project
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
< artifactid>maven-compiler-plugin</artifactid>
<version>3.1</version>
< configuration>
<source>1.7</source>
<target>1.7</target>
<encoding >UTF-8</encoding>
</configuration>
</plugin>
</plugins>
During the build process, you may also report encoding exceptions that need to be added to your project's Pom.xml
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Automatically publish to Tomcat, need to install plug-ins, not very good, search in the plugin aplication server, should be able to find, need to configure Tomcat Tomcat-users.xml, open comments:
<role rolename= "Manager-gui"/>
<role rolename= "Manager-script"/> <role
rolename= " Manager-jmx "/>
<role rolename=" Manager-status "/>
<user username=" Tomcat "password=" Tomcat " roles= "Manager-gui,manager-script,manager-jmx,manager-status"/>
There is also a need to make sure that the root of the manger in your Tomcat has the original project first Jenkins configured successfully, as a souvenir:
Started by user anonymous Building in workspace C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace Updating https:// 101.201.148.185/svn/sandbox/mice/micerp at revision ' 2016-08-01t12:15:38.694 +0800 ' d src\main\java\log4j.properties D Src\main\java\hanlp.properties a src\main\resources\hanlp.properties a src\main\resources\log4j.pr Operties at Revision 543 parsing POMs [workspace] $ e:\jdk\jdk1.7.0_80/bin/java-cp C:\Users\Administrator\.jenkins\plug Ins\maven-plugin\web-inf\lib\maven31-agent-1.5.jar; E:\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar; E:\apache-maven-3.3.9/conf/logging Jenkins.maven3.agent.Maven31Main E:\apache-maven-3.3.9 E:\Web\ Apache-tomcat-7.0.65-jenkins\webapps\jenkins\web-inf\lib\remoting-2.59.jar C:\Users\Administrator\.jenkins\ Plugins\maven-plugin\web-inf\lib\maven31-interceptor-1.5.jar C:\Users\Administrator\.jenkins\plugins\ Maven-plugin\web-inf\lib\maven3-interceptor-commons-1.5.jar 53612 <===[jenkins REMOTING CAPACITY]===≫channel started executing Maven:-b-f C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace\pom.xml install [INFO]
Scanning for projects ...
[INFO] [INFO]------------------------------------------------------------------------[INFO] Building micerp Maven Webapp 0.0.1-snapshot [INFO]------------------------------------------------------------------------[INFO] [INFO]--- Maven-resources-plugin:2.6:resources (default-resources) @ micerp---[INFO] Using ' UTF-8 ' encoding to copy filtered Resou
RCEs. [INFO] Copying resources [INFO] [INFO]---maven-compiler-plugin:3.1:compile (default-compile) @ micerp---[info] nothing to Compile-all classes is up to date [info] [INFO]---maven-resources-plugin:2.6:testresources (default-testresources)
@ micerp---[INFO] Using ' UTF-8 ' encoding to copy filtered resources. [INFO] Copying 0 Resource [INFO] [INFO]---maven-compiler-plugin:3.1:testcompile (default-testcompile) @ micerp---[info] Nothing to Compile-all classes is up to date [info] [INFO]---maven-surefire-plugin:2.1 2.4:test (default-test) @ micerp---[JENKINS] Recording test results [INFO] [INFO]---maven-war-plugin:2.2:war (default -war) @ micerp---[info] packaging WebApp [INFO] Assembling WebApp [Micerp] in [C:\Users\Administrator\.jenkins\jobs\Mice RP\WORKSPACE\TARGET\MICERP] [INFO] processing War project [INFO] Copying webapp resources [C:\Users\Administrator\. Jenkins\jobs\micerp\workspace\src\main\webapp] [INFO] WebApp assembled in [383 msecs] [INFO] Building war:c:\users\
Administrator\.jenkins\jobs\micerp\workspace\target\micerp.war [INFO] Web-inf\web.xml already added, skipping [info] [INFO]---maven-install-plugin:2.4:install (default-install) @ micerp---[info] installing C:\Users\Administrator\. Jenkins\jobs\micerp\workspace\target\micerp.war to C:\Users\Administrator\.m2\repository\com\mice\rp\MiceRp\ 0.0.1-snapshot\micerp-0.0.1-snapshot.war [INFO] Installing C: \users\administrator\.jenkins\jobs\micerp\workspace\pom.xml to C:\Users\Administrator\.m2\repository\com\mice\ Rp\micerp\0.0.1-snapshot\micerp-0.0.1-snapshot.pom [INFO]------------------------------------------------------ ------------------[INFO] BUILD SUCCESS [INFO]-------------------------------------------------------------------- ----[INFO] Total time:9.294 s [info] finished at:2016-08-01t12:16:06+08:00 [INFO] Final memory:18m/156m [INFO]------- -----------------------------------------------------------------[JENKINS] archiving C:\Users\Administrator\. Jenkins\jobs\micerp\workspace\pom.xml to Com.mice.rp/micerp/0.0.1-snapshot/micerp-0.0.1-snapshot.pom [JENKINS] Archiving C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace\target\MiceRp.war to Com.mice.rp/micerp/0.0.1- Snapshot/micerp-0.0.1-snapshot.war Channel stopped deploying C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace \target\micerp.war to Container Tomcat 7.x Remote redeploying [C:\Users\Administrator\.jenkinS\jobs\micerp\workspace\target\micerp.war] undeploying [C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace\ Target\micerp.war] deploying [C:\Users\Administrator\.jenkins\jobs\MiceRp\workspace\target\MiceRp.war] Finished: SUCCESS
Original address: http://blog.csdn.net/yueritian/article/details/52084575