Skip to content

Commit

Permalink
Merge pull request #1 from TEIC/feature/add-mvn-build-action
Browse files Browse the repository at this point in the history
github actions for mvn build
  • Loading branch information
anneferger authored Aug 31, 2021
2 parents 407bf40 + e8ddfcf commit 5b4cdf3
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "edirom", "username": "vifebot", "password": "${GITHUB_TOKEN}"},{"id": "teic", "username": "vifebot", "password": "${GITHUB_TOKEN}"}]'
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B package --file pom.xml
- name: Upload Maven build artifact
uses: actions/upload-artifact@v2
with:
name: ege-validator-0.3.jar
path: /home/runner/work/ege-validator/ege-validator/target/ege-validator-0.3.jar
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
!eadsgml.dcl
!*.ent
!*.xsd
!*.yml

47 changes: 35 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>


Expand Down Expand Up @@ -101,17 +102,15 @@
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>

<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId><version>2.3</version>
Expand Down Expand Up @@ -168,4 +167,28 @@
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>central</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
<repository>
<id>edirom</id>
<name>Edirom</name>
<url>https://maven.pkg.github.com/Edirom/*</url>
</repository>
<repository>
<id>teic</id>
<name>TEIC</name>
<url>https://maven.pkg.github.com/TEIC/*</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub TEIC Apache Maven Packages</name>
<url>https://maven.pkg.github.com/teic/ege-validator</url>
</repository>
</distributionManagement>
</project>

0 comments on commit 5b4cdf3

Please sign in to comment.