Skip to content

Commit

Permalink
Switch from Ant build to Maven and add GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Aug 25, 2023
1 parent 9c43d19 commit 034b10d
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 70 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on: [push, pull_request]
jobs:
build:
name: Build and Test (${{ matrix.os }} / OpenJDK ${{ matrix.jdk }})
strategy:
fail-fast: true
matrix:
jdk: ['8']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven Build
run: mvn clean package -DskipTests
- name: Test
run: mvn verify
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
build/
.*
target/
!.gitignore
1 change: 0 additions & 1 deletion VERSION.txt

This file was deleted.

12 changes: 0 additions & 12 deletions build.properties.xml

This file was deleted.

36 changes: 0 additions & 36 deletions build.xml

This file was deleted.

6 changes: 0 additions & 6 deletions expath-pkg.xml.tmpl

This file was deleted.

104 changes: 104 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0"?>
<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>org.exist-db</groupId>
<artifactId>exist-apps-parent</artifactId>
<version>1.12.0</version>
<relativePath/>
</parent>

<groupId>org.exist-db.apps</groupId>
<artifactId>existdb-saml-xquery</artifactId>
<version>1.7.0-SNAPSHOT</version>


<name>eXist-db SAML XQuery</name>
<description>SAML v2.0 Implementation in XQuery</description>
<url>https://github.com/eXist-db/existdb-saml</url>

<scm>
<url>https://github.com/eXist-db/existdb-saml.git</url>
<connection>scm:git:https://github.com/eXist-db/existdb-saml.git</connection>
<developerConnection>scm:git:https://github.com/eXist-db/existdb-saml.git</developerConnection>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- used in the EXPath Package Descriptor -->
<package-name>http://exist-db.org/apps/exsaml</package-name>

<exist.version>6.0.1</exist.version>
</properties>

<build>
<resources>
<resource>
<directory>src/main/xar-resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/xar-resources-filtered</directory>
<filtering>true</filtering>
</resource>
</resources>

<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/resources-filtered</directory>
<filtering>true</filtering>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>

<plugin>
<groupId>ro.kuberam.maven.plugins</groupId>
<artifactId>kuberam-expath-plugin</artifactId>
<executions>
<execution>
<id>create-xar</id>
<phase>package</phase>
<goals>
<goal>make-xar</goal>
</goals>
<configuration>
<descriptor>xar-assembly.xml</descriptor>
<finalName>${package-final-name}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<useAgent>true</useAgent>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<mavenExecutorId>forked-path </mavenExecutorId>
<!-- avoid a bug with GPG plugin hanging http://jira.codehaus.org/browse/MGPG-9 -->
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</build>

</project>
13 changes: 0 additions & 13 deletions repo.xml.tmpl

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions xar-assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg" name="${package-name}" abbrev="${package-abbrev}" version="${project.version}"
spec="1.0">
<title>${package-title}</title>
<author id="eXist-db">${project.organization.name}</author>
<description>${project.description}</description>
<website>${project.url}</website>
<license>GNU LGPL 2.1</license>
<copyright>true</copyright>

<type>library</type>

<status>stable</status>

<tag>${project.artifactId}</tag>

<dependency processor="http://exist-db.org" semver-min="${exist.version}"/>
<dependency package="http://expath.org/ns/crypto" semver-min="6.0.1"/>

<target>${package-abbrev}</target>

<finish>post-install.xq</finish>

<!-- includes everything in target, README.md, and LICENSE -->
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
</fileSet>
<fileSet>
<directory>${basedir}</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/..</directory>
<includes>
<include>LICENSE</include>
</includes>
</fileSet>
</fileSets>

</package>

0 comments on commit 034b10d

Please sign in to comment.