• jenkins构建一个maven项目[五]


    标签(linux): jenkins

    笔者Q:972581034 交流群:605799367。有任何疑问可与笔者或加群交流

    构建一个maven项目,即为构建java项目。模拟实验之前先把实验代码推送到 gitlab,jenkins要与gitlab建立deploy keys。

    开始构建

    配置保留构建数量

    配置gitlab地址

    maven地址,这里如果没有安装maven会有报错提示。先点保存。

    安装maven

    如果是手动安装,解压到指定目录后配置环境变量,并在web界面指定MAVEN_HOME即可,需要与jenkins安装在一台服务器。
    按同样的方式可以安装jdk

    执行构建,这里报错了,由于是国外yum源连接不。

    修改为阿里的!

    [root@nexus.rap.jenkins.maven conf]# pwd
    /application/maven/conf
    [root@nexus.rap.jenkins.maven conf]# cat 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>yoho8</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>
    

    配置邮件通知

    http://blog.csdn.net/fullbug/article/details/53024562

  • 相关阅读:
    修改linux资源限制
    Windows 建立链接
    Java & ant环境变量配置
    Linux 配置IP
    Spring-MVC 访问静态资源
    Maven 安装与配置
    OIM同步OID(OID-Connector 9.0.4.12)
    Connector|OIM向IBM TDS推送账号(LDAP3)
    TopFreeTheme精选免费模板【20130704】
    30+简约和平铺的WordPress复古主题
  • 原文地址:https://www.cnblogs.com/Csir/p/7447187.html
Copyright © 2020-2023  润新知