Skip to content

Commit

Permalink
ci : abondon de gradle pour la ci au profit de maven
Browse files Browse the repository at this point in the history
Refs: #6
  • Loading branch information
mbarre committed Oct 13, 2021
1 parent dd439f5 commit 7f2de96
Show file tree
Hide file tree
Showing 8 changed files with 294 additions and 68 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/gradle-build.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/gradle-publish.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.Java }}
distribution: 'adopt'
- name: Build with Maven
run: mvn -B -Dgh_login=${{secrets.OPT_CI_LOGIN}} -Dgh_pwd=${{secrets.OPT_CI_TOKEN}} package -s settings.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build/
*.iml
*.log
out/
target
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ git fetch --tag

Pousser les modifications sur la repo Github
```shell
git push github_remote main
git push github_remote master
git push --tags github_remote
```
124 changes: 124 additions & 0 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nc.opt.core</groupId>
<artifactId>opt-logging</artifactId>
<name>opt-logging</name>
<version>2.1.1-SNAPSHOT</version>
<description>Librairie OPT de gestion des logs pour les applications du socle.</description>
<inceptionYear>2017</inceptionYear>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration />
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>github</id>
<name>GitHub OPT-NC Apache Maven Packages</name>
<url>https://maven.pkg.github.com/opt-nc/opt-logging</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.3.5.RELEASE</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<artifactId>spring-boot-test</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<artifactId>spring-boot-test-autoconfigure</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<artifactId>json-path</artifactId>
<groupId>com.jayway.jsonpath</groupId>
</exclusion>
<exclusion>
<artifactId>jakarta.xml.bind-api</artifactId>
<groupId>jakarta.xml.bind</groupId>
</exclusion>
<exclusion>
<artifactId>assertj-core</artifactId>
<groupId>org.assertj</groupId>
</exclusion>
<exclusion>
<artifactId>hamcrest</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
<exclusion>
<artifactId>junit-vintage-engine</artifactId>
<groupId>org.junit.vintage</groupId>
</exclusion>
<exclusion>
<artifactId>mockito-core</artifactId>
<groupId>org.mockito</groupId>
</exclusion>
<exclusion>
<artifactId>mockito-junit-jupiter</artifactId>
<groupId>org.mockito</groupId>
</exclusion>
<exclusion>
<artifactId>jsonassert</artifactId>
<groupId>org.skyscreamer</groupId>
</exclusion>
<exclusion>
<artifactId>spring-test</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>xmlunit-core</artifactId>
<groupId>org.xmlunit</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/opt-nc/opt-logging</url>
</repository>
</distributionManagement>
<properties>
<spring-boot-starter-test.version>2.3.5.RELEASE</spring-boot-starter-test.version>
<jol-core.version>0.15</jol-core.version>
<junit-jupiter.version>5.6.2</junit-jupiter.version>
<java.version>8</java.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<logback-classic.version>1.2.3</logback-classic.version>
<logstash-logback-encoder.version>6.6</logstash-logback-encoder.version>
<spring-context.version>5.3.6</spring-context.version>
<jacoco-maven-plugin.version>0.7.7.201606060606</jacoco-maven-plugin.version>
</properties>
</project>
125 changes: 125 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nc.opt.core</groupId>
<artifactId>opt-logging</artifactId>
<version>2.1.1-SNAPSHOT</version>
<name>opt-logging</name>
<description>Librairie OPT de gestion des logs pour les applications du socle.</description>
<inceptionYear>2017</inceptionYear>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<!-- Dependencies versions -->
<logstash-logback-encoder.version>6.6</logstash-logback-encoder.version>
<spring-context.version>5.3.6</spring-context.version>
<jol-core.version>0.15</jol-core.version>
<logback-classic.version>1.2.3</logback-classic.version>
<junit-jupiter.version>5.6.2</junit-jupiter.version>
<spring-boot-starter-test.version>2.3.5.RELEASE</spring-boot-starter-test.version>

<!-- Plugins versions -->
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
<maven-failsafe-plugin>2.22.0</maven-failsafe-plugin>
</properties>

<repositories>
<repository>
<id>github</id>
<name>GitHub OPT-NC Apache Maven Packages</name>
<url>https://maven.pkg.github.com/opt-nc/opt-logging</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder.version}</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-context.version}</version>
</dependency>

<dependency>
<groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId>
<version>${jol-core.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot-starter-test.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin}</version>
</plugin>

</plugins>
</build>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/opt-nc/opt-logging</url>
</repository>
</distributionManagement>

</project>
21 changes: 21 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<settings>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<name>GitHub OPT Apache Maven Packages</name>
<url>https://maven.pkg.github.com/opt-nc</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>${gh_login}</username>
<password>${gh_pwd}</password>
</server>
</servers>
</settings>

0 comments on commit 7f2de96

Please sign in to comment.