Skip to content
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

Configure distributionManagement properly #34

Merged
merged 1 commit into from
Sep 15, 2019
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
5 changes: 3 additions & 2 deletions .travis/deploy-to-maven-repositories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ echo 'Deploying artifacts'
# Generate source and javadocs, sign binaries, deploy to Sonatype using credentials from env.

echo 'Deploying to Sonatype OSSRH (also used for Central integration)'
mvn deploy -P build-extras,sign,code-signing-credentials,sonatype-ossrh-deploy \
mvn deploy -P build-extras,sign,code-signing-credentials,sonatype-ossrh-deployment \
--settings .travis/.mvn/sonatype-ossrh-settings.xml
echo 'Deployed to Sonatype OSSRH'

echo 'Deploying to GitHub Package Registry'
mvn deploy -P build-extras,sign,code-signing-credentials \
--settings .travis/.mvn/github-package-registry-settings.xml
--settings .travis/.mvn/github-package-registry-settings.xml \
-DaltDeploymentRepository=github-package-registry::default::https://maven.pkg.github.com/JarvisCraft/padla
echo 'Deployed to GiHub Package Registry'

echo 'Deployed artifacts'
55 changes: 22 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
</modules>
<packaging>pom</packaging>

<!-- Primary repository -->
<distributionManagement>
<repository>
<id>maven-central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<snapshotRepository>
<id>sonatype-ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down Expand Up @@ -230,18 +242,7 @@
</dependencyManagement>

<profiles>
<!-- Maven-central deployment-related profiles -->
<profile>
<id>sonatype-ossrh-deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<!-- Deployment-related profiles -->
<profile>
<id>sign</id>
<build>
Expand Down Expand Up @@ -295,27 +296,15 @@
</profile>

<profile>
<id>sonatype-deployment</id>
<distributionManagement>
<repository>
<id>maven-central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<snapshotRepository>
<id>sonatype-ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>

<profile>
<id>github-package-registry-deployment</id>
<distributionManagement>
<repository>
<id>github-package-registry</id>
<url>https://maven.pkg.github.com/JarvisCraft/padla</url>
</repository>
</distributionManagement>
<id>sonatype-ossrh-deployment</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>