Skip to content

Commit

Permalink
Merge branch '18-reset-version-and-update-group-id-for-github-deploym…
Browse files Browse the repository at this point in the history
…ent' into 'main'

Resolve "Reset version and update group ID for GitHub deployment"

Closes #18

Closes #21

See merge request sbmt/sbmt-pointing!7
  • Loading branch information
joshsteeleAPL committed Sep 27, 2024
2 parents 924e9f2 + 04fd33f commit b0cb558
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 99 deletions.
10 changes: 8 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-16">
<classpathentry kind="src" output="target/test-classes" path="test">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/maven-central-deploy-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish package to the Maven Central Repository
on:
release:
types: [created]
workflow_dispatch:

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Publish package
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
41 changes: 41 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build and verify with Maven only
run: mvn -B verify --file pom.xml
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

# 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


2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
variables:
JAVA_HOME: "/opt/openjdk17" # Sets Java version to run (see /opt for details)
# Sets the artifact cache to a local directory within build area
MAVEN_CLI_OPTS: "-Dmaven.repo.local=../.m2/repository --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN"
MAVEN_CLI_OPTS: "-Dmaven.repo.local=../.m2/repository --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -P internal"

#Workflow rules that filters across the entire pipeline. Cleaner than -o ci.skip since there won't be a "skipped" pipeline.
workflow:
Expand Down
1 change: 1 addition & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
encoding/src=UTF-8
encoding/test=UTF-8
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -13,4 +13,4 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=16
org.eclipse.jdt.core.compiler.source=17
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License
MIT License

Copyright 2024 Johns Hopkins University Applied Physics Laboratory, LLC

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# sbmt-pointing

![GitHub last commit](https://img.shields.io/github/last-commit/NASA-Planetary-Science/sbmt-pointing)

sbmt-pointing is a low level library for the overall [SBMT family of libraries](https://github.com/orgs/NASA-Planetary-Science/teams/sbmt/repositories). It contains classes that help translate pointing information (for example from Picante) into data that can be used by SBMT.


## Usage

sbmt-pointing is intended as a dependency for other libraries in the SBMT family. You can either clone this library by itself, or use the [Eclipse project team set file](https://github.com/orgs/NASA-Planetary-Science/teams/sbmt/repositories/sbmt-client/teamProjectSet.psf) located in the [sbmt-client](https://github.com/orgs/NASA-Planetary-Science/teams/sbmt/repositories/sbmt-client) to pull down the entire family of libraries into an Eclipse workspace.
sbmt-pointing is intended as a dependency for other libraries in the SBMT family. You can either clone this library by itself, or use the [Eclipse project team set file](https://github.com/orgs/NASA-Planetary-Science/teams/sbmt/repositories/sbmt-overview/teamProjectSet.psf) located in the [sbmt-overview](https://github.com/orgs/NASA-Planetary-Science/teams/sbmt/repositories/sbmt-overview) to pull down the entire family of libraries into an Eclipse workspace.

sbmt-core is available as a jar at [Maven Central](https://central.sonatype.com/artifact/edu.jhuapl.ses/sbmt-pointing). The dependency listing is:
sbmt-pointing is available as a jar at [Maven Central](https://central.sonatype.com/artifact/edu.jhuapl.ses/sbmt-pointing). The dependency listing is:

```
<dependency>
Expand Down
210 changes: 134 additions & 76 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,77 +1,135 @@
<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>
<groupId>edu.jhuapl.ses.srn.sbmt</groupId>
<artifactId>sbmt-pointing</artifactId>
<version>1.0.7</version>
<name>sbmt-pointing</name>
<description>SBMT Pointing library</description>
<packaging>jar</packaging>
<organization>
<name>Johns Hopkins University Applied Physics Lab</name>
<url>https://www.jhuapl.edu</url>
</organization>
<distributionManagement>
<repository>
<id>central</id>
<name>surfshop-releases</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>central</id>
<name>surfshop-snapshots</name>
<url>http://surfshop.jhuapl.edu:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.82</version>
</dependency>
<dependency>
<groupId>edu.jhuapl.ses.sbmt</groupId>
<artifactId>sbmt-pipeline</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>edu.jhuapl.ses.srn.sbmt</groupId>
<artifactId>sbmt-core</artifactId>
<version>1.1.4-b1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>16</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<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>
<artifactId>sbmt-pointing</artifactId>
<version>1.0.0</version>
<name>sbmt-pointing</name>
<description>SBMT Pointing library</description>
<packaging>jar</packaging>

<parent>
<groupId>edu.jhuapl.ses.sbmt</groupId>
<artifactId>sbmt-overview</artifactId>
<version>1.0.0</version>
</parent>

<url>https://github.com/NASA-Planetary-Science/sbmt-pointing</url>

<scm>
<connection>
scm:git:https://github.com/NASA-Planetary-Science/sbmt-pointing.git</connection>
<url>
https://github.com/NASA-Planetary-Science/sbmt-pointing.git</url>
<developerConnection>
scm:git:https://github.com/NASA-Planetary-Science/sbmt-pointing.git</developerConnection>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<profiles>
<profile>
<id>internal</id>
<distributionManagement>
<repository>
<id>central</id>
<name>surfshop-releases</name>
<url>
http://surfshop.jhuapl.edu:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>central</id>
<name>surfshop-snapshots</name>
<url>
http://surfshop.jhuapl.edu:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>github-build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
<dependency>
<groupId>edu.jhuapl.ses.sbmt</groupId>
<artifactId>sbmt-pipeline</artifactId>
</dependency>
<dependency>
<groupId>edu.jhuapl.ses.sbmt</groupId>
<artifactId>sbmt-core</artifactId>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion src/edu/jhuapl/sbmt/pointing/io/InfoFileReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import edu.jhuapl.sbmt.core.io.BasicFileReader;


public class InfoFileReader extends BasicFileReader implements PointingFileReader
public class InfoFileReader extends BasicFileReader<IOException> implements PointingFileReader
{
public static final float DEFAULT_PDS_NA = -1.e32f;
public static final String FRUSTUM1 = "FRUSTUM1";
Expand Down
Loading

0 comments on commit b0cb558

Please sign in to comment.