Skip to content

Commit

Permalink
prep for maven central deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bischoffz committed Apr 24, 2024
1 parent 528b993 commit a2532d2
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 67 deletions.
10 changes: 6 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "daily"
target-branch: "dev"
open-pull-requests-limit: 10
groups:
Expand All @@ -23,11 +23,13 @@ updates:
patterns:
- "org.codehaus.mojo:flatten-maven-plugin"
- "org.apache.maven.plugins*"
dependencies:
protobuf-dependencies:
patterns:
- "gov.hhs.aspr.ms.taskit:taskit*"
- "gov.hhs.aspr.ms.gcm:simulation"
- "com.google.protobuf:protoc"
aspr-ms-dependencies:
patterns:
- "gov.hhs.aspr.ms.gcm:simulation"
- "gov.hhs.aspr.ms.taskit*"
test-dependencies:
patterns:
- "org.jacoco*"
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
push:
branches: [ "dev" ]
pull_request:
branches-ignore: ["main"]
branches: [ "dev" ]

jobs:
dev-build:
Expand All @@ -28,26 +28,29 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Get Taskit and GCM Versions
- name: Get GCM Version
run: |
echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: dev

- name: Get Taskit Version
run: |
echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Taskit
if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-taskit
path: taskit
ref: dev

- name: Checkout GCM
# if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: ${{ (endsWith(env.gcm_version, 'SNAPSHOT') && 'dev') || env.gcm_version }}

- name: Get Util Version
# if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
Expand All @@ -67,7 +70,7 @@ jobs:
run: mvn clean install -DskipTests --file util/pom.xml

- name: Build GCM
# if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file gcm/simulation/pom.xml

- name: Build Taskit
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,18 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Get Taskit and GCM Versions
run: |
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: ${{ env.gcm_version }}

- name: Build GCM
run: mvn clean install -DskipTests --file gcm/simulation/pom.xml
- name: Build GCM Taskit
run: mvn clean install -Pjavadoc --file pom.xml
run: mvn clean deploy -Pjavadoc,sign --file pom.xml
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}

- name: Get Version
run: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/release_pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,5 @@ jobs:
echo "Version is a SNAPSHOT version. Update version to proper version."
exit 1
- name: Get GCM Version
run: |
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: ${{ env.gcm_version }}

- name: Build GCM
run: mvn clean install -DskipTests --file gcm/simulation/pom.xml

- name: Build GCM Taskit
run: mvn clean install -Pjavadoc,jacoco --file pom.xml
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ An implementation of [Taskit](https://github.com/HHS/ASPR-ms-taskit) for use wit

Currently there is only 1 supported serialzation format, and that is protobuf. Other formats such as binary will follow in the future.

As of v2.8.0, this project is in Maven Central

## License
Distributed under the GPLv3 License. See [LICENSE](LICENSE) for more information.

Please read the [HHS vulnerability discloure](https://www.hhs.gov/vulnerability-disclosure-policy/index.html).

## Usage
To use this project in your project, simply add the following dependency to your `dependencies` section of your pom.xml file.
```
<dependency>
<groupId>gov.hhs.aspr.ms.gcm.taskit</groupId>
<artifactId>protobuf</artifactId>
<version>2.8.0</version>
</dependency>
```

## Overview
This taskit implementation is built as follows:

Expand Down Expand Up @@ -42,7 +54,7 @@ Just the following classes support serialization
- GCM located [here](https://github.com/HHS/ASPR8)
- Taskit located [here](https://github.com/HHS/ASPR-ms-taskit)

*NOTE that both Taskit and Modeling Util are in maven central, so there is no need to clone and build those repos
*NOTE that Modeling Utils, GCM and Taskit are in maven central, so there is no need to clone and build those repos

### Building
To build this project:
Expand Down
58 changes: 39 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<name>GCM : Taskit</name>
<description>A toolkit that aids in the conversion between two Java objects, primiarly for use with coverting between an input Java object and a application Java object, specifically for use with gcm.</description>
<url>https://github.com/HHS/aspr-ms-gcm-taskit</url>
<url>https://github.com/HHS/ASPR-ms-gcm-taskit</url>

<!-- License Information -->
<licenses>
Expand Down Expand Up @@ -43,14 +43,14 @@

<!-- SCM Information -->
<scm>
<connection>scm:git:git://github.com/HHS/aspr-ms-gcm-taskit.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/aspr-ms-gcm-taskit.git</developerConnection>
<url>https://github.com/HHS/aspr-ms-gcm-taskit/tree/main</url>
<connection>scm:git:git://github.com/HHS/ASPR-ms-gcm-taskit.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/ASPR-ms-gcm-taskit.git</developerConnection>
<url>https://github.com/HHS/ASPR-ms-gcm-taskit/tree/main</url>
</scm>

<!-- Properties -->
<properties>
<revision>2.8.0-SNAPSHOT</revision>
<revision>2.8.0</revision>

<!-- basic project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -62,13 +62,15 @@
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.2</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>0.4.0</central-publishing-maven-plugin.version>

<!-- dependency versions -->
<taskit.version>4.0.0</taskit.version>
<gcm.version>4.2.0-SNAPSHOT</gcm.version>
<gcm.version>4.2.0</gcm.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.10.2</junit-jupiter-engine.version>
</properties>
Expand Down Expand Up @@ -159,6 +161,16 @@
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -248,14 +260,34 @@
</executions>
</plugin>

<!-- for skipping parent install-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<inherited>false</inherited>
</plugin>

<!-- for skipping parent deployment -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<inherited>false</inherited>
</plugin>

<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
<deploymentName>ASPR MS Taskit</deploymentName>
<deploymentName>ASPR MS GCM Taskit</deploymentName>
</configuration>
</plugin>
</plugins>
Expand All @@ -272,18 +304,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>all,-missing</doclint>
<additionalDependencies>
<additionalDependency>
<groupId>gov.hhs.aspr.ms</groupId>
<artifactId>util</artifactId>
<version>${util.version}</version>
</additionalDependency>
<additionalDependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter-engine.version}</version>
</additionalDependency>
</additionalDependencies>
<author>false</author>
<additionalJOptions>
<additionalJOption>-Xmaxerrs</additionalJOption>
Expand Down
12 changes: 9 additions & 3 deletions protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
</parent>

<!-- Artifact -->
<groupId>gov.hhs.aspr.ms.gcm.taskit</groupId>
<artifactId>protobuf</artifactId>
<name>GCM : Taskit: Protobuf</name>
<description>Protobuf Taskit implementation for GCM</description>
<url>https://github.com/HHS/aspr-ms-gcm-taskit</url>
<url>https://github.com/HHS/ASPR-ms-gcm-taskit</url>

<!-- SCM Information -->
<scm>
<connection>scm:git:git://github.com/HHS/ASPR-ms-gcm-taskit.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/ASPR-ms-gcm-taskit.git</developerConnection>
<url>https://github.com/HHS/ASPR-ms-gcm-taskit/tree/main</url>
</scm>

<!-- Properties -->
<properties>
<!-- protobuf specific plugins versions -->
Expand Down Expand Up @@ -95,7 +101,7 @@
<artifactItem>
<groupId>gov.hhs.aspr.ms.taskit</groupId>
<artifactId>protobuf</artifactId>
<version>${taskit-protobuf.version}</version>
<version>${taskit.version}</version>
<overWrite>true</overWrite>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includes>**/*.proto</includes>
Expand Down

0 comments on commit a2532d2

Please sign in to comment.