Skip to content
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
12 changes: 1 addition & 11 deletions .github/workflows/publish-maven-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ jobs:
env:
CONTRAST_GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}


- name: Maven Release (dry-run)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
cd maven-plugin/ && ./mvnw -DdryRun=true --batch-mode release:prepare release:perform -Dusername=$GITHUB_ACTOR -Dpassword=$GITHUB_TOKEN


- name: Maven Release
env:
Expand All @@ -76,7 +66,7 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
cd maven-plugin/ && ./mvnw --settings release-settings.xml --batch-mode release:prepare release:perform -Dusername=$GITHUB_ACTOR -Dpassword=$GITHUB_TOKEN
cd maven-plugin/ && ./mvnw --settings release-settings.xml deploy -Prelease

# Remove gpg keys so they're never reused between runs without being reimported
- name: Cleanup GPG Key
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,14 @@ jobs:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}


- name: Maven Release (dry-run)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
cd sdk/ && ./mvnw -DdryRun=true --batch-mode release:prepare release:perform -Dusername=$GITHUB_ACTOR -Dpassword=$GITHUB_TOKEN


- name: Maven Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
cd sdk/ && ./mvnw --settings release-settings.xml --batch-mode release:prepare release:perform -Dusername=$GITHUB_ACTOR -Dpassword=$GITHUB_TOKEN
cd sdk/ && ./mvnw --settings release-settings.xml deploy -Prelease

# Remove gpg keys so they're never reused between runs without being reimported
- name: Cleanup GPG Key
Expand Down
7 changes: 7 additions & 0 deletions maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@ this:
```shell
source unset-contrast.env
```

### Releasing
Releases are done via Sonatype's Central Release Plugin to Maven Central.
* Update the version in `pom.xml` to the desired release version.
* Run the release action in github off of the main branch (or other branch in dropdown)
* Log in to Sonatype to approve release.
* Tag the release in git: eg `git tag -a contrast-maven-plugin-1.2.3` and `git push --tags`
52 changes: 6 additions & 46 deletions maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.contrastsecurity</groupId>
<artifactId>contrast-maven-plugin</artifactId>
<version>2.13.4-SNAPSHOT</version>
<version>2.13.4</version>
<packaging>maven-plugin</packaging>

<name>Contrast Maven Plugin</name>
Expand Down Expand Up @@ -35,18 +35,10 @@
</licenses>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<id>central</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<site>
<id>github</id>
<url>scm:git:https://github.com/Contrast-Security-OSS/contrast-sdk-java.git</url>
</site>
</distributionManagement>

<scm>
Expand Down Expand Up @@ -250,24 +242,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
Expand Down Expand Up @@ -372,10 +346,6 @@
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
Expand All @@ -388,10 +358,6 @@
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.11.2</version>
Expand Down Expand Up @@ -440,11 +406,6 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down Expand Up @@ -670,13 +631,12 @@
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions maven-plugin/release-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<servers>
<server>
<id>ossrh</id>
<id>central</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>ossrh</id>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Expand All @@ -26,7 +26,7 @@
</profiles>

<activeProfiles>
<activeProfile>ossrh</activeProfile>
<activeProfile>central</activeProfile>
</activeProfiles>

</settings>
7 changes: 7 additions & 0 deletions sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ apply the formatting before committing changes using the Maven plugin:
```shell
./mvnw spotless:apply
```

### Releasing
Releases are done via Sonatype's Central Release Plugin to Maven Central.
* Update the version in `pom.xml` to the desired release version.
* Run the release action in github off of the main branch (or other branch in dropdown)
* Log in to Sonatype to approve release.
* Tag the release in git: eg `git tag -a contrast-sdk-java-1.2.3` and `git push --tags`
76 changes: 6 additions & 70 deletions sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.contrastsecurity</groupId>
<artifactId>contrast-sdk-java</artifactId>
<version>3.4.4-SNAPSHOT</version>
<version>3.4.4</version>

<name>Contrast Java SDK</name>
<description>Java SDK for using Contrast Security APIs</description>
Expand Down Expand Up @@ -32,12 +32,8 @@
</licenses>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<id>central</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
Expand Down Expand Up @@ -117,30 +113,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requirePluginVersions />
<requireSameVersions>
<plugins>
<plugin>org.apache.maven.plugins:maven-surefire-plugin</plugin>
<plugin>org.apache.maven.plugins:maven-failsafe-plugin</plugin>
<plugin>org.apache.maven.plugins:maven-surefire-report-plugin</plugin>
</plugins>
</requireSameVersions>
<requireReleaseDeps />
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
Expand Down Expand Up @@ -235,24 +207,6 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
Expand All @@ -272,10 +226,6 @@
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
Expand Down Expand Up @@ -312,18 +262,10 @@
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.11.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
Expand Down Expand Up @@ -370,11 +312,6 @@
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down Expand Up @@ -459,13 +396,12 @@
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions sdk/release-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<servers>
<server>
<id>ossrh</id>
<id>central</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>ossrh</id>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Expand All @@ -26,7 +26,7 @@
</profiles>

<activeProfiles>
<activeProfile>ossrh</activeProfile>
<activeProfile>central</activeProfile>
</activeProfiles>

</settings>
Loading