Commit 3c050892 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'dev' into 'master'

Dev

See merge request redmic-project/server/template/library-template!1
parents 0cbaa6d2 ad5b018f
Loading
Loading
Loading
Loading
+9 −24
Original line number Diff line number Diff line
include:
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/maven-building-library.yml'
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/license-listing.yml'

stages:
  - build

maven-build:
  stage: build
  image: registry.gitlab.com/redmic-project/docker/maven:latest
  variables:
    MAVEN_OPTS: -Dmaven.repo.local=.m2/repository
  only:
    - branches
  except:
    - master
  cache:
    paths:
      - .m2/repository/
  script:
    - mvn deploy -B
    - "COVERAGE=$(xmllint --html --xpath '//table[@id=\"coveragetable\"]/tfoot//td[@class=\"ctr2\"][1]/text()' target/site/jacoco/index.html)"
    - 'echo "Coverage: ${COVERAGE}"'
  after_script:
    - rm -r .m2/repository/es
  artifacts:
    name: "${CI_PROJECT_NAME}"
    expire_in: '6 months'
    paths:
      - target/*.jar
  - license-list
+19 −65
Original line number Diff line number Diff line
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project 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/maven-4.0.0.xsd">

	<parent>
		<groupId>org.springframework.boot</groupId>
   		<artifactId>spring-boot-starter-parent</artifactId>
    	<version>2.0.0.RELEASE</version>
		<groupId>es.redmic</groupId>
		<artifactId>server-parent</artifactId>
		<version>0.3.0</version>
		<relativePath />
	</parent>

@@ -17,72 +18,25 @@
	<description>template-lib description</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<java.version>1.8</java.version>

		<!-- REDMIC -->

		<!-- OTHERS -->
		
		<!-- Version plugins -->
		<jacoco.version>0.8.1</jacoco.version>

		<!-- Environment variables -->
		<env.MAVEN_REPO_URL>https://artifactory.redmic.net/artifactory</env.MAVEN_REPO_URL>
	</properties>

	<dependencies>

		<!-- Logs -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<distributionManagement>

	<repositories>
		<repository>
			<id>central</id>
			<name>redmic-releases</name>
			<url>${env.MAVEN_REPO_URL}/libs-release-local</url>
			<name>libs-release</name>
			<url>https://artifactory.redmic.net/artifactory/libs-release</url>
		</repository>
		<snapshotRepository>
		<repository>
			<id>snapshots</id>
			<name>redmic-snapshots</name>
			<url>${env.MAVEN_REPO_URL}/libs-snapshot-local</url>
			<uniqueVersion>false</uniqueVersion>
		</snapshotRepository>
	</distributionManagement>
	<build>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<executions>
					<execution>
						<id>pre-unit-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>post-unit-test</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
			<name>libs-snapshot</name>
			<url>https://artifactory.redmic.net/artifactory/libs-snapshot</url>
		</repository>
	</repositories>
</project>