From 2ddda6b452ce1b0652192b0a00d820e82f5ba4d5 Mon Sep 17 00:00:00 2001
From: sukidayou <77531556+sukidayou@users.noreply.github.com>
Date: Fri, 27 Dec 2024 15:31:46 +0800
Subject: [PATCH] feat: improve pom.xml, CI scripts (#7)
---
.github/workflows/maven-ci.yml | 52 ++++++++++
maven-settings.xml | 22 +++++
pom.xml | 167 ++++++++++++++++++++++++++++++++-
3 files changed, 240 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/maven-ci.yml
create mode 100644 maven-settings.xml
diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml
new file mode 100644
index 0000000..bb078f9
--- /dev/null
+++ b/.github/workflows/maven-ci.yml
@@ -0,0 +1,52 @@
+name: build
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: '0'
+
+ - name: Start MongoDB
+ uses: supercharge/mongodb-github-action@1.11.0
+ with:
+ mongodb-version: 4.2
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ server-id: ossrh
+ server-username: OSSRH_JIRA_USERNAME
+ server-password: OSSRH_JIRA_PASSWORD
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: GPG_PASSPHRASE
+
+ - name: Build with Maven
+ run: mvn clean test cobertura:cobertura
+
+ - name: Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: 20
+
+ - name: Semantic Release
+ run: |
+ npm install -g @conveyal/maven-semantic-release semantic-release
+ semantic-release --prepare @conveyal/maven-semantic-release --publish @semantic-release/github,@conveyal/maven-semantic-release --verify-conditions @semantic-release/github,@conveyal/maven-semantic-release --verify-release @conveyal/maven-semantic-release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
+ OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
\ No newline at end of file
diff --git a/maven-settings.xml b/maven-settings.xml
new file mode 100644
index 0000000..9600d94
--- /dev/null
+++ b/maven-settings.xml
@@ -0,0 +1,22 @@
+
+
+
+ ossrh
+ ${OSSRH_JIRA_USERNAME}
+ ${OSSRH_JIRA_PASSWORD}
+
+
+
+
+ ossrh
+
+ true
+
+
+ gpg
+ ${GPG_KEY_NAME}
+ ${GPG_PASSPHRASE}
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 37e3cad..4d9db06 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,14 +4,179 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.jim
+ org.casbin
jcasbin-mongo-adapter
1.0-SNAPSHOT
+ Mongo Adapter for JCasbin
+ Load policy from Mongo supported database or save policy to it
+ https://github.com/jcasbin/jcasbin-mongo-adapter
+ 2018
+
+
+ Github
+ https://github.com/jcasbin/jcasbin-mongo-adapter/issues
+
+
+
+ org.sonatype.oss
+ oss-parent
+ 7
+
+
+
+ The Apache Software License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+
+
+
+ https://github.com/jcasbin/jcasbin-mongo-adapter
+ git@github.com:jcasbin/jcasbin-mongo-adapter.git
+ https://github.com/hsluoyz
+
+
+
+ Yang Luo
+ hsluoyz@qq.com
+ https://github.com/hsluoyz
+
+
+
+ UTF-8
8
8
+
+
+
+ ossrh
+ https://central.sonatype.com
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+ org.eluder.coveralls
+ coveralls-maven-plugin
+ 4.3.0
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.7.6.201602180812
+
+
+ prepare-agent
+
+ prepare-agent
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.4
+
+ 11
+ false
+
+ -Xdoclint:none
+
+
+ notnull
+ a
+ Not null
+
+
+ default
+ a
+ Default:
+
+
+
+
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.5.0
+ true
+
+ ossrh
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.8
+ 1.8
+
+
+
+ org.codehaus.mojo
+ cobertura-maven-plugin
+ 2.7
+
+
+ html
+ xml
+
+
+
+
+
+
org.projectlombok