Skip to content

Commit

Permalink
4.0.0 release (#4)
Browse files Browse the repository at this point in the history
* maven central prep (#2)

* Maven central prep (#3)

* maven central prep

* fix javadoc and format
  • Loading branch information
bischoffz authored Sep 8, 2023
1 parent 010a93b commit 0adbc00
Show file tree
Hide file tree
Showing 80 changed files with 1,729 additions and 1,754 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/create_release_on_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 Release

on:
push:
tags:
- 'v*'
branches: ["main"]

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build
run: mvn clean install -Prelease --file pom.xml
- name: Get Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Make Release
uses: ncipollo/release-action@v1
with:
artifacts: "target/util-${{ env.version }}.jar,target/util-${{ env.version }}-sources.jar,target/util-${{ env.version }}-javadoc.jar"
prerelease: ${{ endsWith(env.version, 'SNAPSHOT') || contains(env.version, '-RC') }}
name: "v${{ env.version }}"
tag: "v${{ env.version }}"
generateReleaseNotes: true
37 changes: 37 additions & 0 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Util
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean package --file 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
40 changes: 40 additions & 0 deletions .github/workflows/update_dependant_projects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create Release

on:
push:
branches: ["main"]

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout GCM
uses: actions/checkout@v3
with:
repository: HHS/ASPR-8
path: gcm

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Get Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
cd gcm
git checkout dev
git checkout -b update-util-version
cd gcm
sed -i "0,/<util.version>.*<\/util.version>/s//<util.version>${VERSION}<\/util.version>/g" pom.xml
git add pom.xml
git commit -m "update util version"
gh pr create --head --fill
gh pr merge --auto
174 changes: 136 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,71 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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</groupId>
<artifactId>util</artifactId>
<version>${revision}</version>
<version>4.0.0</version>
<packaging>jar</packaging>
<name>util</name>

<name>Modeling Utils</name>
<description>A suite of utility methods that are useful for simulation frameworks.</description>
<url>https://github.com/HHS/ASPR-ms-util</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>Shawn Hatch</name>
<email>[email protected]</email>
<organization>Leidos</organization>
<organizationUrl>https://www.leidos.com</organizationUrl>
</developer>
<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-util.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/ASPR-ms-util.git</developerConnection>
<url>https://github.com/HHS/ASPR-ms-util/tree/main</url>
</scm>

<!-- Properties -->
<properties>
<!-- basic project properties -->
<revision>4.0.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<!-- 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>

<!-- dependencies -->
<junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
<!-- dependency versions-->
<commons-math3.version>3.6.1</commons-math3.version>
<jcip-annotations.version>1.0</jcip-annotations.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>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
Expand All @@ -52,37 +88,18 @@
<version>${junit-jupiter-engine.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<!-- Configure Build -->
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<updatePomFile>true</updatePomFile>
</configuration>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Runs unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -94,12 +111,58 @@
</configuration>
</plugin>

<!-- Jacoco Coverage Check -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.0</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.0</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.0</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<!-- Attaches source jar to project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -117,4 +180,39 @@
</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>
<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>
10 changes: 5 additions & 5 deletions src/main/java/util/annotations/UnitTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

public enum UnitTag {
/*
* The test should be run as a manual test
* The test should be run as a manual test
*/
MANUAL,

/*
* The test is covered by another test in the same unit test
* The test is covered by another test in the same unit test
*/
LOCAL_PROXY,

/*
* The test is covered by other test(s) for other classes. This is used for
* classes that are not expected to be directly exposed to a client of GCM
* and where the class is used exclusively by GCM.
* classes that are not expected to be directly exposed to a client of GCM and
* where the class is used exclusively by GCM.
*/
CLASS_PROXY,

/*
* The test is not yet fully implemented
* The test is not yet fully implemented
*/
INCOMPLETE//
}
5 changes: 2 additions & 3 deletions src/main/java/util/annotations/UnitTestConstructor.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import java.lang.annotation.Target;

/**
* Annotation for JUnit test methods that are testing public source constructors.
*
*
* Annotation for JUnit test methods that are testing public source
* constructors.
*/

@Documented
Expand Down
Loading

0 comments on commit 0adbc00

Please sign in to comment.