eGovFrameSvr 서버 2.0.0에는 jdk1.5가 포함되어 있고, hudson의 세팅은 여기에 맞춰져 있습니다. 그래서 jdk1.6이상으로 맞춰진 프로젝트는 컴파일 되지 않는 이슈가 있습니다.


[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 10 source files to C:\eGovFrameSvr\hudson\jobs\ok.egov\workspace\target\classes
[HUDSON] Archiving C:\eGovFrameSvr\hudson\jobs\ok.egov\workspace\pom.xml to C:\eGovFrameSvr\hudson\jobs\ok.egov\modules\ok$egov\builds\2013-07-01_15-22-31\archive\ok\egov\1.0.0\pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files
  -cp <path>                 Specify where to find user class files
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -d <directory>             Specify where to place generated class files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 31 seconds
[INFO] Finished at: Mon Jul 01 15:24:06 KST 2013
[INFO] Final Memory: 17M/31M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data
channel stopped
Finished: FAILURE


이를 해결하려면 허드슨 관리에서 JDK의 버전을 1.6 이상으로 맞춰 줘야 합니다. 메인 페이지에서 Hudson 관리 > Configure System > JDK 섹션으로 이동합니다.




수정 후에는 이상없이 빌드될 것입니다.



지속적인 통합 빌드에서 crontab 처럼 주기적으로 빌드가 돌게 할 수 있습니다. 아래는 10분 주기로 실행하도록 한 결과입니다. trend 링크를 누르면 다음과 같이 그래프로도 확인이 가능합니다.

빌드의 실행 시점은 다음과 같이 정할 수 있습니다. 우측의 ? 아이콘을 클릭하면 해당항목에 대한 설명이 보이게 됩니다. 빌드에는 분 시간 일 월 요일 5가지 설정을 하게 됩니다. 매 10분마다 설정하려면 0,10,20,30,40,50 처럼 공백없이 분을 나열하고 이후 4항목을 * * * * 로 채우면 됩니다.

빌드 로그가 많이 남을까봐 Discard Old Builds처럼 옛날 빌드기록을 삭제할 수 있습니다. 7일간 최대 200개의 빌드기록을 보관한다는 의미입니다.


소스코드를 가져오는 방법은 다음과 같습니다. CVSROOT를 적어주면 됩니다. 아이디와 패스워드가 노출되는데, 인트라넷용이라는 전제가 있습니다. 또한 빌드전용 CVS아이디를 만들어 주는 것도 괜찮을 것입니다.

간략하게 hudson의 설정에 대해서 살펴보았습니다.





+ Recent posts