Move pom.xml files to tools/maven
In preparation for dissolving the various top-level directories that
contain these projects. This was previously attempted in 0ce2fdc1, but
that commit included a change to how the pom.xml files are generated
which was not compatible with Nexus's requirements.
This attempt does the minimal work necessary, and simply moves the
pom.xml files to a new location under tools, pointing our existing
deployment scripts at the new location.
Tested:
* Ran `./tools/maven/api.sh deploy` and sanity checked the resulting
published snapshot pom.xml:
https://oss.sonatype.org/content/repositories/snapshots/com/google/gerrit/gerrit-extension-api/2.16-SNAPSHOT/gerrit-extension-api-2.16-20171010.133016-3.pom
* Ran './tools/version.py 2.3456` and checked that all *_pom.xml files
were modified.
Change-Id: I24e5e3bd8d24dddc44192fb86c3905a79d7c296c
diff --git a/Documentation/dev-release.txt b/Documentation/dev-release.txt
index ddf7e7f..f90390a 100644
--- a/Documentation/dev-release.txt
+++ b/Documentation/dev-release.txt
@@ -79,7 +79,7 @@
Before doing the release build, the `GERRIT_VERSION` in the `version.bzl`
file must be updated, e.g. change it from `$version-SNAPSHOT` to `$version`.
-In addition the version must be updated in a number of pom.xml files.
+In addition the version must be updated in a number of `*_pom.xml` files.
To do this run the `./tools/version.py` script and provide the new
version as parameter, e.g.:
@@ -137,7 +137,7 @@
configuration] for deploying to Maven Central
* Make sure that the version is updated in the `version.bzl` file and in
-the `pom.xml` files as described in the link:#update-versions[Update
+the `*_pom.xml` files as described in the link:#update-versions[Update
Versions and Create Release Tag] section.
* Push the WAR to Maven Central:
@@ -192,7 +192,7 @@
+
Use this URL for further testing of the artifacts in this repository,
e.g. to try building a plugin against the plugin API in this repository
-update the version in the `pom.xml` and configure the repository:
+update the version in the `*_pom.xml` and configure the repository:
+
----
<repositories>
diff --git a/gerrit-acceptance-framework/pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml
similarity index 100%
rename from gerrit-acceptance-framework/pom.xml
rename to tools/maven/gerrit-acceptance-framework_pom.xml
diff --git a/gerrit-extension-api/pom.xml b/tools/maven/gerrit-extension-api_pom.xml
similarity index 100%
rename from gerrit-extension-api/pom.xml
rename to tools/maven/gerrit-extension-api_pom.xml
diff --git a/gerrit-plugin-api/pom.xml b/tools/maven/gerrit-plugin-api_pom.xml
similarity index 100%
rename from gerrit-plugin-api/pom.xml
rename to tools/maven/gerrit-plugin-api_pom.xml
diff --git a/gerrit-plugin-gwtui/pom.xml b/tools/maven/gerrit-plugin-gwtui_pom.xml
similarity index 100%
rename from gerrit-plugin-gwtui/pom.xml
rename to tools/maven/gerrit-plugin-gwtui_pom.xml
diff --git a/gerrit-war/pom.xml b/tools/maven/gerrit-war_pom.xml
similarity index 100%
rename from gerrit-war/pom.xml
rename to tools/maven/gerrit-war_pom.xml
diff --git a/tools/maven/mvn.py b/tools/maven/mvn.py
index f7b5aa8..2e1c1a9 100755
--- a/tools/maven/mvn.py
+++ b/tools/maven/mvn.py
@@ -56,7 +56,7 @@
for spec in args.s:
artifact, packaging_type, src = spec.split(':')
exe = cmd + [
- '-DpomFile=%s' % path.join(root, '%s/pom.xml' % artifact),
+ '-DpomFile=%s' % path.join(root, 'tools', 'maven', '%s_pom.xml' % artifact),
'-Dpackaging=%s' % packaging_type,
'-Dfile=%s' % src,
]
diff --git a/tools/version.py b/tools/version.py
index fed6d5d..72b0134 100755
--- a/tools/version.py
+++ b/tools/version.py
@@ -48,7 +48,7 @@
for project in ['gerrit-acceptance-framework', 'gerrit-extension-api',
'gerrit-plugin-api', 'gerrit-plugin-gwtui',
'gerrit-war']:
- pom = os.path.join(project, 'pom.xml')
+ pom = os.path.join('tools', 'maven', '%s_pom.xml' % project)
replace_in_file(pom, src_pattern)
src_pattern = re.compile(r'^(GERRIT_VERSION = ")([-.\w]+)(")$', re.MULTILINE)