From b8fbb8ac619b2c0c296212165bb648719e9aa3f3 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 31 Aug 2016 09:33:03 +0900 Subject: [PATCH] Provide a diff file to make it easier to deploy JGit snapshot Provide a git diff that can be applied to JGit to make it easier to apply the necessary changes in pom.xml for deployment to the Gerrit Maven repository. Update the instructions to describe how to use it as an alternative to manually updating pom.xml. Change-Id: Ib8b2655abbd49b546e88ccf90def8329e749aa8b --- Documentation/dev-release-deploy-config.txt | 7 ++-- Documentation/dev-release-jgit.txt | 35 +++++++++++------ tools/jgit-snapshot-deploy-pom.diff | 43 +++++++++++++++++++++ 3 files changed, 69 insertions(+), 16 deletions(-) create mode 100644 tools/jgit-snapshot-deploy-pom.diff diff --git a/Documentation/dev-release-deploy-config.txt b/Documentation/dev-release-deploy-config.txt index 921244fc6e..900e95c16f 100644 --- a/Documentation/dev-release-deploy-config.txt +++ b/Documentation/dev-release-deploy-config.txt @@ -143,10 +143,9 @@ deployable to the `gerrit-maven` storage bucket: ---- [NOTE] -In case of JGit the `pom.xml` already contains a distributionManagement -section. Replace the existing distributionManagement section with this snippet -in order to deploy the artifacts only in the gerrit-maven repository. - +In case of JGit the `pom.xml` already contains a `distributionManagement` +section. To deploy the artifacts to the `gerrit-maven` repository, replace +the existing `distributionManagement` section with this snippet. * Add these two snippets to the `pom.xml` to enable the wagon provider: diff --git a/Documentation/dev-release-jgit.txt b/Documentation/dev-release-jgit.txt index f6d4d6892f..1a8b501a3c 100644 --- a/Documentation/dev-release-jgit.txt +++ b/Documentation/dev-release-jgit.txt @@ -1,33 +1,44 @@ -= Making a Release of JGit += Making a Snapshot Release of JGit This step is only necessary if we need to create an unofficial JGit snapshot release and publish it to the link:https://developers.google.com/storage/[Google Cloud Storage]. +[[prepare-environment]] +== Prepare the Maven Environment + +First, make sure you have done the necessary +link:dev-release-deploy-config.html#deploy-configuration-settings-xml[ +configuration in Maven `settings.xml`]. + +To apply the necessary settings in JGit's `pom.xml`, follow the instructions +in link:dev-release-deploy-config.html#deploy-configuration-subprojects[ +Configuration for Subprojects in `pom.xml`], or apply the provided diff by +executing the following command in the JGit workspace: + +---- + git apply /path/to/gerrit/tools/jgit-snapshot-deploy-pom.diff +---- [[prepare-release]] == Prepare the Release -Since JGit has its own release process we do not push any release tags -for JGit. Instead we will use the output of the `git describe` as the -version of the current JGit snapshot. +Since JGit has its own release process we do not push any release tags. Instead +we will use the output of `git describe` as the version of the current JGit +snapshot. + +In the JGit workspace, execute the following command: ---- ./tools/version.sh --release $(git describe) ---- - [[publish-release]] == Publish the Release -* Make sure you have done the configuration needed for deployment: -** link:dev-release-deploy-config.html#deploy-configuration-settings-xml[ -Configuration in Maven `settings.xml`] -** link:dev-release-deploy-config.html#deploy-configuration-subprojects[ -Configuration for Subprojects in `pom.xml`] +To deploy the new snapshot, execute the following command in the JGit +workspace: -* Deploy the new snapshot. From JGit workspace execute: -+ ---- mvn deploy ---- diff --git a/tools/jgit-snapshot-deploy-pom.diff b/tools/jgit-snapshot-deploy-pom.diff new file mode 100644 index 0000000000..01f50e48dd --- /dev/null +++ b/tools/jgit-snapshot-deploy-pom.diff @@ -0,0 +1,43 @@ +diff --git a/pom.xml b/pom.xml +index d256bbb..7e523fd 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -226,6 +226,10 @@ + + + ++ gerrit-maven ++ https://gerrit-maven.commondatastorage.googleapis.com ++ ++ + repo.eclipse.org.cbi-releases + https://repo.eclipse.org/content/repositories/cbi-releases/ + +@@ -236,6 +240,13 @@ + + + ++ ++ ++ com.googlesource.gerrit ++ gs-maven-wagon ++ 3.3 ++ ++ + + + +@@ -649,9 +660,10 @@ + + + +- repo.eclipse.org +- JGit Maven Repository - Releases +- https://repo.eclipse.org/content/repositories/jgit-releases/ ++ gerrit-maven-repository ++ Gerrit Maven Repository ++ gs://gerrit-maven ++ true + + + repo.eclipse.org