UBUNTU上continuum持续构建(一)
UBUNTU下continuum持续构建(一)
UBUNTU下continuum持续构建(一)
1、使用MAVEN2来管理搭建测试项目
athena
在UBUNTU下安装MAVEN2
apt-get install maven2
检查MVN是否安装成功
root@kiko:/usr/tmp/athena# mvn -version
Maven version: 2.0.8
Java version: 1.5.0_15
OS name: "linux" version: "2.6.24-19-server" arch: "i386" Family: "unix"
配置MAVEN2服务器
cd ~/.m2
拷贝服务器配置文件settings.xml到该目录下:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<!--这是服务器一-->
<profile>
<id>MirrorRepository</id>
<repositories>
<repository>
<id>central</id>
<url>
http://192.168.50.90:8081/artifactory/repo
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>
http://192.168.50.90:8081/artifactory/repo
</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>
http://192.168.50.90:8081/artifactory/plugins-releases
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>
http://192.168.50.90:8081/artifactory/plugins-snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>MirrorRepository</activeProfile>
</activeProfiles>
</settings>
再在项目中执行mvn clean ;mvn install就是在服务器上取jar包了
2、安装continuum服务器
首页: http://continuum.apache.org/index.html
下载页面: http://continuum.apache.org/download.html
文件: apache-continuum-1.1.tar.gz
解开压缩
tar zxvf apache-continuum-1.1.tar.gz
移动到工作目录
mv continuum-1.1 /usr/local/
第一次运行continuum
$ cd cd /usr/local/continuum-1.1/bin/linux-x86-32/
$ ./run.sh start
访问:
http://localhost:8080/continuum
看 usr/local/continuum-1.1/logs/*.log, ,第一次运行会失败,这是正常的,因为continuum的自带的数据库没有建好,第一次运行会自动创建库。
第二次运行continuum
停止:/usr/local/continuum-1.1/bin/linux-x86-32/run.sh stop
启动:/usr/local/continuum-1.1/bin/linux-x86-32/run.sh start
日志:tail -f /usr/local/continuum-1.1/logs/continuum.log
看/usr/local/continuum-1.1/logs/*.log, 看到部署了application continuum的信息,默认端口8080。
访问:
http://localhost:8080/continuum
修改配置信息
/usr/local/continuum-1.1/bin/linux-x86-32/run.sh stop
cd /usr/local/continuum-1.1/apps/
修改配置文件application.xml
cd continuum/conf/
vi application.xml
文件清单,修改端口为8090 :
<application>
<services>
<service>
<id>jetty</id>
<configuration>
<webapps>
<webapp>
<file>${plexus.home}/lib/continuum-webapp-1.1.war</file>
<services>
<service>
<id>jetty</id>
<configuration>
<webapps>
<webapp>
<file>${plexus.home}/lib/continuum-webapp-1.1.war</file>
<context>/continuum</context>
<extraction-path>${plexus.home}/webapp</extraction-path>
<standardWebappClassloader>true</standardWebappClassloader>
<listeners>
<http-listener>
<port>8090</port>
</http-listener>
</listeners>
</webapp>
</webapps>
</configuration>
</service>
</services>
</application>
重启服务器,登陆后,设置admin用户名和密码
配置工作目录
Working Directory:
/home/root/work
Build Output Directory :
/home/root/build
Deployment Repository Directory :
/home/root/deploy
Base URL :
http://192.168.50.90:8090/continuum
UBUNTU下continuum持续构建(一)
1、使用MAVEN2来管理搭建测试项目
athena
在UBUNTU下安装MAVEN2
apt-get install maven2
检查MVN是否安装成功
root@kiko:/usr/tmp/athena# mvn -version
Maven version: 2.0.8
Java version: 1.5.0_15
OS name: "linux" version: "2.6.24-19-server" arch: "i386" Family: "unix"
配置MAVEN2服务器
cd ~/.m2
拷贝服务器配置文件settings.xml到该目录下:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<!--这是服务器一-->
<profile>
<id>MirrorRepository</id>
<repositories>
<repository>
<id>central</id>
<url>
http://192.168.50.90:8081/artifactory/repo
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>
http://192.168.50.90:8081/artifactory/repo
</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>
http://192.168.50.90:8081/artifactory/plugins-releases
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>
http://192.168.50.90:8081/artifactory/plugins-snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>MirrorRepository</activeProfile>
</activeProfiles>
</settings>
再在项目中执行mvn clean ;mvn install就是在服务器上取jar包了
2、安装continuum服务器
首页: http://continuum.apache.org/index.html
下载页面: http://continuum.apache.org/download.html
文件: apache-continuum-1.1.tar.gz
解开压缩
tar zxvf apache-continuum-1.1.tar.gz
移动到工作目录
mv continuum-1.1 /usr/local/
第一次运行continuum
$ cd cd /usr/local/continuum-1.1/bin/linux-x86-32/
$ ./run.sh start
访问:
http://localhost:8080/continuum
看 usr/local/continuum-1.1/logs/*.log, ,第一次运行会失败,这是正常的,因为continuum的自带的数据库没有建好,第一次运行会自动创建库。
第二次运行continuum
停止:/usr/local/continuum-1.1/bin/linux-x86-32/run.sh stop
启动:/usr/local/continuum-1.1/bin/linux-x86-32/run.sh start
日志:tail -f /usr/local/continuum-1.1/logs/continuum.log
看/usr/local/continuum-1.1/logs/*.log, 看到部署了application continuum的信息,默认端口8080。
访问:
http://localhost:8080/continuum
修改配置信息
/usr/local/continuum-1.1/bin/linux-x86-32/run.sh stop
cd /usr/local/continuum-1.1/apps/
修改配置文件application.xml
cd continuum/conf/
vi application.xml
文件清单,修改端口为8090 :
<application>
<services>
<service>
<id>jetty</id>
<configuration>
<webapps>
<webapp>
<file>${plexus.home}/lib/continuum-webapp-1.1.war</file>
<services>
<service>
<id>jetty</id>
<configuration>
<webapps>
<webapp>
<file>${plexus.home}/lib/continuum-webapp-1.1.war</file>
<context>/continuum</context>
<extraction-path>${plexus.home}/webapp</extraction-path>
<standardWebappClassloader>true</standardWebappClassloader>
<listeners>
<http-listener>
<port>8090</port>
</http-listener>
</listeners>
</webapp>
</webapps>
</configuration>
</service>
</services>
</application>
重启服务器,登陆后,设置admin用户名和密码
配置工作目录
Working Directory:
/home/root/work
Build Output Directory :
/home/root/build
Deployment Repository Directory :
/home/root/deploy
Base URL :
http://192.168.50.90:8090/continuum