GitHub packages (#357)

* changes to enable publishing to both github packages and sonatype
This commit is contained in:
Mark Iantorno 2020-09-25 16:49:03 -04:00 committed by GitHub
parent 90c923720a
commit 6936ed731c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 22 deletions

View File

@ -0,0 +1,5 @@
CI/CD:
* Restructured pom files
* Added profiles for deploying to both GitHub packages, and SonatypeOSS

93
pom.xml
View File

@ -13,7 +13,9 @@
each other. It is fine to bump the point version of this POM without affecting each other. It is fine to bump the point version of this POM without affecting
HAPI FHIR. HAPI FHIR.
--> -->
<artifactId>org.hl7.fhir.core</artifactId>
<version>5.1.15-SNAPSHOT</version> <version>5.1.15-SNAPSHOT</version>
<packaging>pom</packaging>
<properties> <properties>
<hapi_fhir_version>5.1.0</hapi_fhir_version> <hapi_fhir_version>5.1.0</hapi_fhir_version>
@ -23,9 +25,6 @@
<jacoco_version>0.8.5</jacoco_version> <jacoco_version>0.8.5</jacoco_version>
</properties> </properties>
<artifactId>org.hl7.fhir.core</artifactId>
<packaging>pom</packaging>
<name>HL7 Core Artifacts</name> <name>HL7 Core Artifacts</name>
<organization> <organization>
@ -47,13 +46,6 @@
<module>org.hl7.fhir.report</module> <module>org.hl7.fhir.report</module>
</modules> </modules>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories> <repositories>
<repository> <repository>
<snapshots> <snapshots>
@ -318,17 +310,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
@ -338,7 +319,23 @@
<profiles> <profiles>
<profile> <profile>
<id>deploy</id> <id>github-repo</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>deployToGitHub</name>
</property>
</activation>
<distributionManagement>
<snapshotRepository>
<id>github</id>
<url>https://maven.pkg.github.com/hapifhir/org.hl7.fhir.core</url>
</snapshotRepository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/hapifhir/org.hl7.fhir.core</url>
</repository>
</distributionManagement>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -362,5 +359,57 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>ossrh-repo</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>deployToSonatype</name>
</property>
</activation>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>