Skip to content

Commit 70a329c

Browse files
committed
chore(build): parameterize deploy repositories
Adds two build parameters - `publishing.repository.snapshots`: Snapshot repo to deploy to - `publishing.repository.releases`: Releases repo to deploy to Both default to their current values, Sonatype. This small inert change allows a fork to easily publish to a different repository without resorting to a code change. Signed-off-by: Sam Gammon <[email protected]> Signed-off-by: Sam Gammon <[email protected]>
1 parent bf0885d commit 70a329c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pom.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<otherVariant.version>1.0-HEAD-android-SNAPSHOT</otherVariant.version>
4646
<otherVariant.jvmEnvironment>android</otherVariant.jvmEnvironment>
4747
<otherVariant.jvmEnvironmentVariantName>android</otherVariant.jvmEnvironmentVariantName>
48+
<publishing.repository.snapshots>https://oss.sonatype.org/content/repositories/snapshots/</publishing.repository.snapshots>
49+
<publishing.repository.releases>https://oss.sonatype.org/service/local/staging/deploy/maven2/</publishing.repository.releases>
4850
</properties>
4951
<issueManagement>
5052
<system>GitHub Issues</system>
@@ -430,12 +432,12 @@
430432
<snapshotRepository>
431433
<id>sonatype-nexus-snapshots</id>
432434
<name>Sonatype Nexus Snapshots</name>
433-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
435+
<url>${publishing.repository.snapshots}</url>
434436
</snapshotRepository>
435437
<repository>
436438
<id>sonatype-nexus-staging</id>
437439
<name>Nexus Release Repository</name>
438-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
440+
<url>${publishing.repository.releases}</url>
439441
</repository>
440442
<site>
441443
<id>guava-site</id>

0 commit comments

Comments
 (0)