Skip to content

Commit

Permalink
* reverted to publishing artifacts in mvn-repo branch
Browse files Browse the repository at this point in the history
* version numbers are now in properties
* repo owner/name are now in properties
  • Loading branch information
Sdaas committed May 23, 2022
1 parent 6325750 commit 191cdbb
Showing 1 changed file with 70 additions and 13 deletions.
83 changes: 70 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@
<packaging>jar</packaging>

<properties>
<!-- refering to the id in the ~/.m2/settings.xml file -->
<project.scm.id>github</project.scm.id>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<kafka-clients.version>2.8.1</kafka-clients.version>
<jackson.version>2.13.3</jackson.version>
<json-path.version>2.7.0</json-path.version>
<karate.version>1.2.0</karate.version>
<junit.version>5.4.0</junit.version>
<testcontainers.version>1.15.3</testcontainers.version>

<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
<site-maven-plugin>0.12</site-maven-plugin>
<github.global.server>github</github.global.server>

<!-- used for deploying the packages to github -->
<repo.owner>sdaas</repo.owner>
<repo.name>karate-kafka</repo.name>


</properties>

<dependencies>
Expand Down Expand Up @@ -69,17 +79,29 @@
</dependencies>

<scm>
<connection>scm:git:https://github.com/Sdaas/karate-kafka.git</connection>
<url>https://github.com/Sdaas/karate-kafka</url>
<developerConnection>scm:git:https://github.com/Sdaas/karate-kafka.git</developerConnection>
<tag>v0.3.0</tag>
</scm>

<connection>scm:git:https://github.com/${repo.owner}/${repo.name}.git</connection>
<url>https://github.com/${repo.owner}/${repo.name}</url>
<developerConnection>scm:git:https://github.com/${repo.owner}/${repo.name}.git</developerConnection>
<tag>HEAD</tag>
</scm>

<!-- Use this if publishing to github packages. Note that github packages requires an authenticated user
even to download the artifact, so please make sure you understand the consequences
<distributionManagement>
<repository>
<id>github</id>
<name>sdaas</name>
<url>https://maven.pkg.github.com/sdaas/karate-kafka</url>
<name>${repo.owner}</name>
<url>https://maven.pkg.github.com/${repo.owner}/${repo.name}</url>
</repository>
</distributionManagement>
-->

<!-- The artifacts will be available in the mvn-repo branch -->
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>

Expand All @@ -97,7 +119,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>${maven-surefire-plugin.version}</version>
</plugin>

<plugin>
Expand All @@ -113,15 +135,50 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>${maven-release-plugin.version}</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>

<!-- deploy artifacts to a temporary location inside my target directory -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<altDeploymentRepository>
internal.repo::default::file://${project.build.directory}/mvn-repo
</altDeploymentRepository>
</configuration>
</plugin>

<!-- Note: This is NOT the Apache maven site plugin. This is from Github.com. Look at the groupId -->
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<merge>true</merge>
<noJekyll>true</noJekyll> <!-- no webpage related processing-->
<outputDirectory>${project.build.directory}/mvn-repo
</outputDirectory>
<branch>refs/heads/mvn-repo</branch>
<includes>
<include>**/*</include>
</includes>
<repositoryOwner>${repo.owner}</repositoryOwner>
<repositoryName>${repo.name}</repositoryName>
<server>github</server>
</configuration>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>

</plugins>
Expand Down

0 comments on commit 191cdbb

Please sign in to comment.