Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven central prep #1

Merged
merged 9 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/dev-pre-mavencentral.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Development Build Pre Maven Central

on:
push:
branches: [ "dev" ]
paths:
- '**.xml'
- '**.java'
pull_request:
branches: [ "dev", "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout TASKit
uses: actions/checkout@v3
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build TASKit Core
run: mvn clean install --file core/pom.xml
- name: Build TASKit Protobuf
run: mvn clean install --file protobuf/pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
53 changes: 53 additions & 0 deletions .github/workflows/taskit-core/create_release_on_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Create TASKit Core Release

on:
push:
tags:
- 'TASKit: Core v*'
branches: ["main"]
paths:
- 'core/**.xml'
- 'core/**.java'

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout TASKit
uses: actions/checkout@v3
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build TASKit Core
run: mvn clean install -Prelease --file core/pom.xml
- name: Get Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file core/pom.xml)" >> "$GITHUB_ENV"
- name: Make Release
uses: ncipollo/release-action@v1
with:
artifacts: "core/target/core-${{ env.version }}.jar,core/target/core-${{ env.version }}-sources.jar,core/target/core-${{ env.version }}-javadoc.jar"
prerelease: ${{ endsWith(env.version, '-SNAPSHOT') || contains(env.version, '-RC') }}
name: "TASKit: Core v${{ env.version }}"
tag: "TASKit: Core v${{ env.version }}"
generateReleaseNotes: true
53 changes: 53 additions & 0 deletions .github/workflows/taskit-protobuf/create_release_on_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Create TASKit Protobuf Release

on:
push:
tags:
- 'TASKit: Protobuf v*'
branches: ["main"]
paths:
- 'protobuf/**.xml'
- 'protobuf/**.java'

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout TASKit
uses: actions/checkout@v3
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build TASKit Protobuf
run: mvn clean install -Prelease --file protobuf/pom.xml
- name: Get Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file protobuf/pom.xml)" >> "$GITHUB_ENV"
- name: Make Release
uses: ncipollo/release-action@v1
with:
artifacts: "protobuf/target/protobuf-${{ env.version }}.jar,protobuf/target/protobuf-${{ env.version }}-sources.jar,protobuf/target/protobuf-${{ env.version }}-javadoc.jar"
prerelease: ${{ endsWith(env.version, '-SNAPSHOT') || contains(env.version, '-RC') }}
name: "TASKit: Protobuf v${{ env.version }}"
tag: "TASKit: Protobuf v${{ env.version }}"
generateReleaseNotes: true
131 changes: 101 additions & 30 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,46 @@
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>

<!-- Artifact -->
<groupId>gov.hhs.aspr.ms.taskit</groupId>
<artifactId>core</artifactId>
<version>${revision}</version>
<packaging>jar</packaging>
<name>taskit :: core</name>

<name>Translation and Serialization Toolkit: Core</name>
<description>The core components of 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.</description>
<url>https://github.com/HHS/aspr-ms-taskit</url>

<!-- License Information -->
<licenses>
<license>
<name>GNU GENERAL PUBLIC LICENSE v3</name>
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
</license>
</licenses>

<!-- Developers -->
<developers>
<developer>
<name>Zachary Bischoff</name>
<organization>Leidos</organization>
<email>[email protected]</email>
<organizationUrl>https://www.leidos.com</organizationUrl>
</developer>
</developers>

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

<!-- Properties -->
<properties>
<!-- Revision -->
<revision>2.4.0-SNAPSHOT</revision>

<!-- basic project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -19,39 +51,35 @@
<!-- plugin versions -->
<flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>

<!-- dependency versions -->
<util.version>4.0.0-SNAPSHOT</util.version>
<junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
<jacoco-maven-plugin.version>0.8.9</jacoco-maven-plugin.version>
</properties>

<!-- Dependencies -->
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>gov.hhs.aspr.ms</groupId>
<artifactId>util</artifactId>
<version>${util.version}</version>
<scope>provided</scope>
</dependency>

<!-- unit test dependencies -->
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<scope>test</scope>
</dependency>

<!-- Junit dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand All @@ -66,6 +94,7 @@
</dependency>
</dependencies>

<!-- Configure Build -->
<build>
<plugins>
<!-- used with the ${revision} for versioning, creates a pom that has the version replaced with the value of ${revision} -->
Expand Down Expand Up @@ -96,7 +125,7 @@
</executions>
</plugin>

<!-- runs unit tests -->
<!-- Runs unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -108,28 +137,7 @@
</configuration>
</plugin>

<!-- runs integration tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>

<!-- attaches the source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Jacoco Coverage Check -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down Expand Up @@ -179,7 +187,70 @@
</execution>
</executions>
</plugin>

<!-- Attachs source jar to project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!--Attaches javadoc jar to project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<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>
<additionalJOption>65536</additionalJOption>
<additionalJOption>-Xmaxwarns</additionalJOption>
<additionalJOption>65536</additionalJOption>
</additionalJOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package gov.hhs.aspr.ms.taskit.core;

/**
* Base interface for TranslationSpecifications (TranslationSpecs)
*
* Package level access
* Base interface for TranslationSpecifications (TranslationSpecs) Package level
* access
*/
interface BaseTranslationSpec {
<T extends TranslationEngine> void init(T translationEngine);
Expand Down
Loading