Skip to content

Commit

Permalink
Step 1 - extend maven config for release
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanSST committed Nov 26, 2019
1 parent e761b41 commit a3a3252
Show file tree
Hide file tree
Showing 2 changed files with 174 additions and 117 deletions.
250 changes: 133 additions & 117 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
* Copyright 2018 Baloise Group
*
Expand All @@ -15,131 +15,147 @@
* limitations under the License.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<organization>
<name>Baloise Group</name>
<url>https://www.baloise.com</url>
</organization>
<organization>
<name>Baloise Group</name>
<url>https://www.baloise.com</url>
</organization>

<groupId>ch.baloise.corellia</groupId>
<artifactId>api</artifactId>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>ch.baloise.corellia</groupId>
<artifactId>api</artifactId>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/baloise/corellia</url>
</ciManagement>
<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/baloise/corellia</url>
</ciManagement>

<name>corellia-main</name>
<url>https://github.com/baloise/corellia</url>
<name>corellia-main</name>
<url>https://github.com/baloise/corellia</url>

<scm>
<url>https://github.com/baloise/corellia.git</url>
<connection>scm:git:https://github.com/baloise/corellia.git</connection>
<developerConnection>scm:git:https://github.com/baloise/corellia.git</developerConnection>
<tag>HEAD</tag>
</scm>
<scm>
<url>https://github.com/baloise/corellia.git</url>
<connection>scm:git:https://github.com/baloise/corellia.git</connection>
<developerConnection>scm:git:https://github.com/baloise/corellia.git</developerConnection>
<tag>HEAD</tag>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<swagger.version>2.0.7</swagger.version>
<jackson.version>2.10.0.pr1</jackson.version>
<javax.ws.rs-api.version>2.1</javax.ws.rs-api.version>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Baloise Apache Maven Packages</name>
<url>https://maven.pkg.github.com/baloise/repository-template-java</url>
</repository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<swagger.version>2.0.7</swagger.version>
<jackson.version>2.10.0.pr1</jackson.version>
<javax.ws.rs-api.version>2.1</javax.ws.rs-api.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>gen-openapi</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>ch.baloise.corellia.api.doc.OpenApi3DocGenerator</mainClass>
</configuration>
</execution>
<execution>
<id>gen-swagger</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>ch.baloise.corellia.api.doc.OpenApi2DocGenerator</mainClass>
</configuration>
</execution>
</executions>

</plugin>
</plugins>
</build>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>gen-openapi</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>ch.baloise.corellia.api.doc.OpenApi3DocGenerator</mainClass>
</configuration>
</execution>
<execution>
<id>gen-swagger</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>ch.baloise.corellia.api.doc.OpenApi2DocGenerator</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
<scope>compile</scope>
<version>${swagger.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs-api.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
<dependencies>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
<scope>compile</scope>
<version>${swagger.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs-api.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
41 changes: 41 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<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">

<!-- based on: https://stackoverflow.com/questions/57711558/deploy-to-github-package-registry-from-github-action -->

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>github</id>
<name>GitHub Baloise Apache Maven Packages</name>
<url>https://maven.pkg.github.com/baloise</url>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>

0 comments on commit a3a3252

Please sign in to comment.