Creates jar with deps and github actions workflow

This commit is contained in:
Julien Lengrand-Lambert
2020-07-22 22:55:24 +02:00
parent 2897fbc668
commit 013462ab3a
3 changed files with 45 additions and 1 deletions

21
.github/workflows/maven.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B package --file pom.xml
- run: mkdir staging && cp cellar-app/target/*-with-dependencies.jar staging
- uses: actions/upload-artifact@v2
with:
name: Package
path: staging

View File

@@ -30,6 +30,7 @@
<groupId>nl.lengrand</groupId>
<artifactId>cellar-app</artifactId>
<name>${project.artifactId}</name>
<version>1.1-SNAPSHOT</version>
<properties>
<mainClass>nl.lengrand.Main</mainClass>
@@ -89,6 +90,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>nl.lengrand.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@@ -7,7 +7,7 @@
<groupId>nl.lengrand</groupId>
<artifactId>cellar</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>