Skip to content

Commit

Permalink
- Renamed settings.xml to maven-settings.xml for clarity.
Browse files Browse the repository at this point in the history
- Changed github-packages to github_openaims for clarity.
- Added maven settings to the maven test command in GitHub workflow, to allow maven to pull OpenAIMS packages during testing.
  • Loading branch information
gaellafond committed Jan 13, 2022
1 parent 57ac489 commit 2576b79
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
- 27017

# Run the tests in a Maven Docker container.
container:
container:
image: maven:3.6-alpine
env:
MONGODB_URL: 'mongodb://mongodb:27017'

steps:

# Retrieve the code from Github.
- uses: actions/checkout@v2

- name: Execute tests with Maven.
run: mvn -B clean test
run: mvn -B --settings maven-settings.xml clean test
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
- name: Publish to GitHub Packages.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B -e --settings settings.xml clean test deploy
run: mvn -B -e --settings maven-settings.xml clean test deploy

3 changes: 2 additions & 1 deletion maven-settings-example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<!-- Resolve Open-AIMS dependencies when running tests or building the package -->
<server>
<id>github-packages</id>
<id>github_openaims</id>
<username>${GITHUB_USERNAME}</username>
<password>${GITHUB_TOKEN}</password>
</server>
Expand Down
5 changes: 0 additions & 5 deletions settings.xml → maven-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>github-packages</id>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
<!-- Resolve Open-AIMS dependencies when running tests or building the package -->
<server>
<id>github_openaims</id>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

<distributionManagement>
<repository>
<id>github-packages</id>
<id>github_openaims</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/open-AIMS/ereefs-pojo</url>
</repository>
Expand Down

0 comments on commit 2576b79

Please sign in to comment.