Skip to content

Commit

Permalink
Merge pull request #1 from Apaq/add-build-script
Browse files Browse the repository at this point in the history
Adds build script.
  • Loading branch information
michaelkrog authored Sep 22, 2023
2 parents 4c0830f + 4d455a6 commit 2c1ac0d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 16 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Maven Package

on:
release:
types: [created]

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
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
24 changes: 24 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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: [ master ]
pull_request:
branches: [ master ]

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
43 changes: 27 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,41 @@
<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>

<parent>
<groupId>dk.apaq</groupId>
<artifactId>parent</artifactId>
<version>1.2.5</version>
</parent>

<groupId>dk.apaq</groupId>
<artifactId>rest-patch</artifactId>
<version>1.0.3-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>


<distributionManagement>
<repository>
<id>github</id>
<name>Github Packages</name>
<url>https://maven.pkg.github.com/Apaq/rest-patch</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.3</version>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>apache-beanutils</groupId>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand All @@ -43,29 +53,30 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>


<scm>
<connection>scm:git:https://github.com/michaelkrog/rest-patch.git</connection>
<developerConnection>scm:git:[email protected]:michaelkrog/rest-patch.git</developerConnection>
<url>https://github.com/michaelkrog/rest-patch</url>
<connection>scm:git:https://github.com/apaq/rest-patch.git</connection>
<developerConnection>scm:git:[email protected]:apaq/rest-patch.git</developerConnection>
<url>https://github.com/apaq/rest-patch</url>
<tag>HEAD</tag>
</scm>
</project>

0 comments on commit 2c1ac0d

Please sign in to comment.