现在 项目的基本环境是:eclipse (Version: Indigo Service Release 2)+ JDK 1.6+CVS+Maven(3.1.0)+Nexus+Jenkins
eclipse 用于 开发 java 程序的 IDE。
JDK 用于提供java 程序的基本类库和运行环境。
CVS 提供程序代码的版本控制。
Maven 用于提供java web 项目依赖包的管理。
Nexus 用于对外网访问的meven 私服。
Jenkins 用于持续构建。
以上学习可以在 maven 系统的blog 里找到。今天 学习Jenkins,首先得感谢 http://www.cnblogs.com/zz0412/p/jenkins01.html 的作者 给我的帮助,
也可以参见这篇Jenkins 的blog ,还有 http://www.cnblogs.com/zz0412/p/jenkins02.html 。
主要是用于配置CVS 源码管理的 项目 servletTest 一定要上传到 CVS 的服务器上。
Root POM 项目名称/pom.xml .然后,点击保存就可以了。 其他的都不需要设置。
点击 左边的 立即构建
红 的1 表示第一次没有构建 成功。蓝色2 表是 构建成功。
看一下 2的内容 吧。
然后 到左边 控制台输出
Success控制台输出 Started by user anonymous Building in workspace C:\Documents and Settings\Administrator\.jenkins\workspace\test Using locally configured password for connection to :pserver:[email protected]:/CVSstore cvs update -d -P -r HEAD -D 30 Aug 2013 15:23:21 +0800 servletTest cvs server: Updating servletTest cvs server: Updating servletTest/.settings cvs server: Updating servletTest/WebContent cvs server: Updating servletTest/WebContent/META-INF cvs server: Updating servletTest/WebContent/WEB-INF cvs server: Updating servletTest/WebContent/WEB-INF/lib cvs server: Updating servletTest/src cvs server: Updating servletTest/src/main cvs server: Updating servletTest/src/main/java cvs server: Updating servletTest/src/main/java/com cvs server: Updating servletTest/src/main/java/com/picc cvs server: Updating servletTest/src/main/java/com/picc/action cvs server: Updating servletTest/src/main/java/com/picc/domain cvs server: Updating servletTest/src/main/java/com/picc/unit cvs server: Updating servletTest/src/main/resources cvs server: Updating servletTest/src/main/webapp cvs server: Updating servletTest/src/main/webapp/WEB-INF cvs server: Updating servletTest/target Using locally configured password for connection to :pserver:[email protected]:/CVSstore cvs rlog -S -d30 Aug 2013 15:20:40 +0800<30 Aug 2013 15:23:21 +0800 servletTest cvs rlog: Logging servletTest cvs rlog: Logging servletTest/.settings cvs rlog: Logging servletTest/WebContent cvs rlog: Logging servletTest/WebContent/META-INF cvs rlog: Logging servletTest/WebContent/WEB-INF cvs rlog: Logging servletTest/WebContent/WEB-INF/lib cvs rlog: Logging servletTest/src cvs rlog: Logging servletTest/src/main cvs rlog: Logging servletTest/src/main/java cvs rlog: Logging servletTest/src/main/java/com cvs rlog: Logging servletTest/src/main/java/com/picc cvs rlog: Logging servletTest/src/main/java/com/picc/action cvs rlog: Logging servletTest/src/main/java/com/picc/domain cvs rlog: Logging servletTest/src/main/java/com/picc/unit cvs rlog: Logging servletTest/src/main/resources cvs rlog: Logging servletTest/src/main/webapp cvs rlog: Logging servletTest/src/main/webapp/WEB-INF cvs rlog: Logging servletTest/target Parsing POMs Discovered a new module com.soliucheng.me:servletTest servletTest Maven Webapp Modules changed, recalculating dependency graph [servletTest] $ "C:\Program Files\Java\jdk1.6.0_10/bin/java" -cp "C:\Documents and Settings\Administrator\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.4.jar;D:\maven\apache-maven-3.1.0-bin\apache-maven-3.1.0\boot\plexus-classworlds-2.4.2.jar;D:\maven\apache-maven-3.1.0-bin\apache-maven-3.1.0/conf/logging" jenkins.maven3.agent.Maven31Main D:\maven\apache-maven-3.1.0-bin\apache-maven-3.1.0 "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\jenkins\WEB-INF\lib\remoting-2.32.jar" "C:\Documents and Settings\Administrator\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.4.jar" "C:\Documents and Settings\Administrator\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.4.jar" 3391 <===[JENKINS REMOTING CAPACITY]===>channel started log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. Executing Maven: -B -f C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\pom.xml install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.soliucheng.me:servletTest:war:0.0.1-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 79, column 14 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building servletTest Maven Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ servletTest --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ servletTest --- [INFO] Compiling 3 source files to C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ servletTest --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ servletTest --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ servletTest --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-war-plugin:2.2:war (default-war) @ servletTest --- [INFO] Packaging webapp [INFO] Assembling webapp [servletTest] in [C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\target\servletTest] [INFO] Processing war project [INFO] Copying webapp resources [C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\src\main\webapp] [INFO] Webapp assembled in [188 msecs] [INFO] Building war: C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\target\servletTest.war [INFO] WEB-INF\web.xml already added, skipping [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ servletTest --- [INFO] Installing C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\target\servletTest.war to D:\maven\.m2\repository\com\soliucheng\me\servletTest\0.0.1-SNAPSHOT\servletTest-0.0.1-SNAPSHOT.war [INFO] Installing C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\pom.xml to D:\maven\.m2\repository\com\soliucheng\me\servletTest\0.0.1-SNAPSHOT\servletTest-0.0.1-SNAPSHOT.pom [JENKINS] Archiving C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\pom.xml to C:\Documents and Settings\Administrator\.jenkins\jobs\test\modules\com.soliucheng.me$servletTest\builds\2013-08-30_15-23-24\archive\com.soliucheng.me\servletTest\0.0.1-SNAPSHOT\servletTest-0.0.1-SNAPSHOT.pom [JENKINS] Archiving C:\Documents and Settings\Administrator\.jenkins\workspace\test\servletTest\target\servletTest.war to C:\Documents and Settings\Administrator\.jenkins\jobs\test\modules\com.soliucheng.me$servletTest\builds\2013-08-30_15-23-24\archive\com.soliucheng.me\servletTest\0.0.1-SNAPSHOT\servletTest-0.0.1-SNAPSHOT.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.829s [INFO] Finished at: Fri Aug 30 15:23:42 CST 2013 [INFO] Final Memory: 8M/15M [INFO] ------------------------------------------------------------------------ channel stopped Finished: SUCCESS