hotnet 发表于 2018-1-8 17:02:27

【持续集成】GIT+jenkins+snoar——jenkins发布php、maven项目

#手动安装maven  

# tar xf apache-maven-3.3.9-bin.tar.gz  

#放到/usr/local下  

# mv apache-maven-3.3.9 /usr/local/  
#设置环境变量
  
# export PATH="$PATH:/usr/local/apache-maven-3.3.9/bin"
  
#添加到环境变量文件
  
# echo 'export PATH="$PATH:/usr/local/apache-maven-3.3.9/bin"' >> /etc/profile
  
#查看mvn版本
  
# mvn -v
  
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
  
Maven home: /usr/local/apache-maven-3.3.9
  
Java version: 1.8.0_131, vendor: Oracle Corporation
  
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.el7_3.x86_64/jre
  
Default locale: en_US, platform encoding: UTF-8
  
OS name: "linux", version: "3.10.0-327.36.3.el7.x86_64", arch: "amd64", family: "unix"
# vim /usr/local/apache-maven-3.3.9/conf/settings.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <mirrors>
  <mirror>
  <id>faxuan</id>
  <mirrorOf>*</mirrorOf>
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  </mirror>
  </mirrors>
  <profiles>
  <profile>
  <id>default</id>
  <repositories>
  <repository>
  <id>public</id>
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  <releases>
  <enabled>true</enabled>
  </releases>
  <snapshots>
  <enabled>true</enabled>
  </snapshots>
  </repository>
  </repositories>
  </profile>
  </profiles>
  <activeProfiles>
  <activeProfile>default</activeProfile>
  </activeProfiles>
  </settings
页: [1]
查看完整版本: 【持续集成】GIT+jenkins+snoar——jenkins发布php、maven项目