Commit f24255d8 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '4-automate-artifact-deployment' into 'master'

Resolve "Automate artifact deployment"

Closes #4

See merge request !4
parents c9944890 0685e62c
<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">
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USER}</username>
<password>${env.OSSRH_PASS}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
stages:
- compile
- deploy
run tests in branches:
stage: compile
image: maven:3-jdk-8
script:
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn test -B
except:
- master
publish artifacts:
stage: compile
image: maven:3-jdk-8
script:
- echo "${GPG_KEY_SECRET}" | base64 --decode | gpg --allow-secret-key-import --import
- gpg --list-keys
- mvn clean deploy --settings .ci-maven-settings.xml -B -U
only:
- master
......@@ -37,6 +37,9 @@
<log4j.version>1.2.17</log4j.version>
<junit.version>4.12</junit.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<aspectj.version>1.7.2</aspectj.version>
<jackson.version>2.7.7</jackson.version>
<spring.version>4.3.2.RELEASE</spring.version>
......@@ -61,16 +64,41 @@
<build>
<plugins>
<!-- do not deploy artifacts by default -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<!-- do not deploy artifacts by default -->
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>${skip.deploy.artifact}</skip>
</configuration>
</plugin>
<!--buildnumber-maven-plugin-->
</plugin> -->
<!--buildnumber-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
......@@ -90,7 +118,7 @@
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<!--maven-compiler-plugin-->
<!--maven-compiler-plugin -->
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
......@@ -103,7 +131,7 @@
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<!--maven-surefire-plugin-->
<!--maven-surefire-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
......
......@@ -48,8 +48,6 @@
</issueManagement>
<properties>
<deploy-plugin.version>2.8.2</deploy-plugin.version>
</properties>
<modules>
......@@ -77,7 +75,7 @@
</execution>
</executions>
<configuration>
<check/>
<check />
<formats>
<format>html</format>
</formats>
......@@ -89,11 +87,6 @@
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
......@@ -104,7 +97,7 @@
<tagNameFormat>application-blocks-@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!--cobertura-maven-plugin-->
<!--cobertura-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment