From 034b10d15dc542ae432802cdffd2bdb4c7932dd0 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Mon, 21 Aug 2023 15:38:14 -0400 Subject: [PATCH] Switch from Ant build to Maven and add GitHub Actions CI --- .github/workflows/ci.yml | 28 +++++ .gitignore | 3 +- VERSION.txt | 1 - build.properties.xml | 12 -- build.xml | 36 ------ expath-pkg.xml.tmpl | 6 - pom.xml | 104 ++++++++++++++++++ repo.xml.tmpl | 13 --- .../main/xar-resources/clean-reqids.xq | 0 .../main/xar-resources/collection.xconf | 0 .../main/xar-resources/index.html | 0 .../xar-resources/modules}/config-exsaml.xml | 0 .../main/xar-resources/modules}/exsaml.xqm | 0 .../main/xar-resources/post-install.xq | 0 .../main/xar-resources/scheduler.xq | 0 xar-assembly.xml | 43 ++++++++ 16 files changed, 176 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 VERSION.txt delete mode 100644 build.properties.xml delete mode 100644 build.xml delete mode 100644 expath-pkg.xml.tmpl create mode 100644 pom.xml delete mode 100644 repo.xml.tmpl rename content/clean-reqids.xql => src/main/xar-resources/clean-reqids.xq (100%) rename collection.xconf => src/main/xar-resources/collection.xconf (100%) rename index.html => src/main/xar-resources/index.html (100%) rename {content => src/main/xar-resources/modules}/config-exsaml.xml (100%) rename {content => src/main/xar-resources/modules}/exsaml.xqm (100%) rename post-install.xql => src/main/xar-resources/post-install.xq (100%) rename content/scheduler.xql => src/main/xar-resources/scheduler.xq (100%) create mode 100644 xar-assembly.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3060067 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index 42d15f4..e06bcfb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -build/ -.* +target/ !.gitignore diff --git a/VERSION.txt b/VERSION.txt deleted file mode 100644 index 266146b..0000000 --- a/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -1.6.3 diff --git a/build.properties.xml b/build.properties.xml deleted file mode 100644 index 4ecc28a..0000000 --- a/build.properties.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - existdb-saml - SAML implementation for existdb - 1.6.3 - http://exist-db.org/xquery/exsaml - beta - rwxr-xr-x - https://exist-db.org/ - - diff --git a/build.xml b/build.xml deleted file mode 100644 index 95aede0..0000000 --- a/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/expath-pkg.xml.tmpl b/expath-pkg.xml.tmpl deleted file mode 100644 index a67f499..0000000 --- a/expath-pkg.xml.tmpl +++ /dev/null @@ -1,6 +0,0 @@ - - - @name@ - - - diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..611cb40 --- /dev/null +++ b/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + + org.exist-db + exist-apps-parent + 1.12.0 + + + + org.exist-db.apps + existdb-saml-xquery + 1.7.0-SNAPSHOT + + + eXist-db SAML XQuery + SAML v2.0 Implementation in XQuery + https://github.com/eXist-db/existdb-saml + + + https://github.com/eXist-db/existdb-saml.git + scm:git:https://github.com/eXist-db/existdb-saml.git + scm:git:https://github.com/eXist-db/existdb-saml.git + + + + UTF-8 + UTF-8 + + + http://exist-db.org/apps/exsaml + + 6.0.1 + + + + + + src/main/xar-resources + false + + + src/main/xar-resources-filtered + true + + + + + + src/test/resources + false + + + src/test/resources-filtered + true + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + ro.kuberam.maven.plugins + kuberam-expath-plugin + + + create-xar + package + + make-xar + + + xar-assembly.xml + ${package-final-name} + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + true + + + + org.apache.maven.plugins + maven-release-plugin + + forked-path + + true + @{project.version} + + + + + + diff --git a/repo.xml.tmpl b/repo.xml.tmpl deleted file mode 100644 index 07ba920..0000000 --- a/repo.xml.tmpl +++ /dev/null @@ -1,13 +0,0 @@ - - - @description@ - @website@ - @status@ - LGPL 2.1 - true - library - existdb-saml - - post-install.xql - - diff --git a/content/clean-reqids.xql b/src/main/xar-resources/clean-reqids.xq similarity index 100% rename from content/clean-reqids.xql rename to src/main/xar-resources/clean-reqids.xq diff --git a/collection.xconf b/src/main/xar-resources/collection.xconf similarity index 100% rename from collection.xconf rename to src/main/xar-resources/collection.xconf diff --git a/index.html b/src/main/xar-resources/index.html similarity index 100% rename from index.html rename to src/main/xar-resources/index.html diff --git a/content/config-exsaml.xml b/src/main/xar-resources/modules/config-exsaml.xml similarity index 100% rename from content/config-exsaml.xml rename to src/main/xar-resources/modules/config-exsaml.xml diff --git a/content/exsaml.xqm b/src/main/xar-resources/modules/exsaml.xqm similarity index 100% rename from content/exsaml.xqm rename to src/main/xar-resources/modules/exsaml.xqm diff --git a/post-install.xql b/src/main/xar-resources/post-install.xq similarity index 100% rename from post-install.xql rename to src/main/xar-resources/post-install.xq diff --git a/content/scheduler.xql b/src/main/xar-resources/scheduler.xq similarity index 100% rename from content/scheduler.xql rename to src/main/xar-resources/scheduler.xq diff --git a/xar-assembly.xml b/xar-assembly.xml new file mode 100644 index 0000000..5bfd1a1 --- /dev/null +++ b/xar-assembly.xml @@ -0,0 +1,43 @@ + + + ${package-title} + ${project.organization.name} + ${project.description} + ${project.url} + GNU LGPL 2.1 + true + + library + + stable + + ${project.artifactId} + + + + + ${package-abbrev} + + post-install.xq + + + + + ${project.build.outputDirectory} + + + ${basedir} + + README.md + + + + ${project.basedir}/.. + + LICENSE + + + + +