-
Notifications
You must be signed in to change notification settings - Fork 6
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
Artifact Publishing & Subscription Topic Bug Fix #43
Conversation
Subscription topic override bug fix
GitHub actions artifact publishing
…ease-notes Version Change & Release Notes (2024 Q3 Release)
To use this library in another application, add the GitHub package URLs to the `repositories` section in `pom.xml` of the consumer application or in your local `~/.m2/settings.xml` file. Here is an example implementation of using the GitHub artifact in a consumer application: | ||
|
||
```xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we adding this xml in either the pom.xml or ~/.m2/settings.xml? Then add the following xml in pom.xml or build.gradle to allow the client application find this library? Could we add a bit detail why doing this below would work? What is the difference between adding xml to pom.xml and settings.xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options to authenticate to Github Maven Artifacts are to include the repository along with a read token in the pom.xml
source code itself or in the supplied settings.xml
config supplied to the build process. In general, the default settings.xml
file is found in the user's home directory ~/.m2/settings.xml
but it can also be included as a build argument.
The method that the client application uses to obtain the library jar file is completely up to the client. I have done a few tests with the jpo-geojsonconverter application, and I am leaning toward using a supplemental settings.xml
file to the build process. It would change the maven build from:
mvn clean install -DskipTests
to:
mvn -s settings.xml clean install -DskipTests
The only difference is where the configuration is applied. I still need to do some testing to figure out the best method to implement this with the docker build pipeline while also keeping the access token secret.
## GitHub Artifact Usage | ||
|
||
To use this library in another application, add the GitHub package URLs to the `repositories` section in `pom.xml` of the consumer application or in your local `~/.m2/settings.xml` file. Here is an example implementation of using the GitHub artifact in a consumer application: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub package URLs
referring to the whole xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly, the GitHub package URLs
only refers to the URL where you want to pull the specified package from. This needs to be set properly in the url
field of the xml configuration:
<settings>
<profiles>
<profile>
<repositories>
<repository>
<url>https://maven.pkg.github.com/usdot-jpo-ode/jpo-sdw-depositor</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Artifact Publishing
This update adds a GitHub Action to publish Java artifacts to GitHub's hosted Maven Central repository.
Subscription Topic Bug Fix
This fix modifies the SDW-depositor to use the SDW_SUBSCRIPTION_TOPIC environment variable if it's set, instead of the default value. The changes were tested locally with Docker, and all existing unit tests were verified to pass successfully.