Buildix + Maven2 Part 2
Buildix uses ant by default, therefore, we need to install maven into the build server.
Follows the instructions in maven website to install maven to /usr/share/maven-2.0.7
Added $M2_HOME in /etc/profile
M2_HOME=/usr/share/maven-2.0.7
PATH="$PATH:$M2_HOME/bin"
make sure mvn -version is working and you would be ready to go!!
If you have a lot of projects and a very large scale project, we may need to increase cruise control heap sizes by modifying the following:
/usr/share/cruisecontrol/bin/cruisecontrol.sh
By default, if you create a new project using the "create_project" script, it will update the cruisecontrol.xml with Ant configuration. For maven2, we need to change the template from ant to maven.
Replace /usr/local/buildix/lib/cruisecontrol.fragment with the following codes:
<project name="@MY_PROJECT@" buildafterfailed="false">
<labelincrementer defaultLabel="${project.name}-1" separator="-"/>
<listeners>
<currentbuildstatuslistener file="/var/spool/cruisecontrol/logs/@MY_PROJECT@/currentbuildstatus.txt"/>
</listeners>
<modificationset quietperiod="30">
<svn RepositoryLocation="http://localhost/svn/@MY_PROJECT@/trunk/@MY_PROJECT@" username="cruise" password="cruise" />
</modificationset>
<bootstrappers>
<svnbootstrapper localWorkingCopy="/var/spool/cruisecontrol/tools"/>
<svnbootstrapper localWorkingCopy="/var/spool/cruisecontrol/@MY_PROJECT@" />
</bootstrappers>
<schedule interval="60">
<maven2 mvnscript="/usr/share/maven-2.0.7/bin/mvn" pomfile="/var/spool/cruisecontrol/@MY_PROJECT@/pom.xml" goal="clean install deploy" />
</schedule>
<log dir="logs/@MY_PROJECT@">
<merge dir="@MY_PROJECT@/target/surefire-reports" />
</log>
<publishers>
<onfailure>
<email mailhost="192.168.X.X" buildresultsurl="http://buildix_hostname/cruisecontrol/buildresults/@MY_PROJECT@?tab=buildResults" returnaddress="DevelopmentTeam@host.com">
<always address="DevelopmentTeam@host.com" />
</email>
</onfailure>
</publishers>
</project>
</cruisecontrol>
you are now ready to create a maven2 project in Buildix

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home