forked from eXist-db/existdb-saml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Switch from Ant build to Maven and add GitHub Actions CI
- Loading branch information
1 parent
9c43d19
commit 7a06c68
Showing
18 changed files
with
199 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
build/ | ||
.* | ||
target/ | ||
!.gitignore |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
content/clean-reqids.xql → ...in/xar-resources-filtered/clean-reqids.xq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
content/scheduler.xql → src/main/xar-resources-filtered/scheduler.xq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
xquery version "3.1"; | ||
|
||
import module namespace sm = "http://exist-db.org/xquery/securitymanager"; | ||
import module namespace xmldb = "http://exist-db.org/xquery/xmldb"; | ||
|
||
(: the target collection into which the app is deployed :) | ||
declare variable $target external; | ||
|
||
declare variable $saml-request-ids-collection-name := "saml-request-ids"; | ||
declare variable $saml-request-ids-collection-path := $target || "/" || $saml-request-ids-collection-name; | ||
|
||
let $_ := | ||
if (fn:not(xmldb:collection-available($saml-request-ids-collection-path))) | ||
then | ||
xmldb:create-collection($target, $saml-request-ids-collection-name) | ||
else() | ||
return | ||
sm:chmod(xs:anyURI($saml-request-ids-collection-path), "rwx------") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>${project.basedir}</directory> | ||
<includes> | ||
<include>README.md</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.basedir}</directory> | ||
<includes> | ||
<include>LICENSE</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
|
||
</package> |