From c61dccd1895db96a58429558b4175d027828b7dd Mon Sep 17 00:00:00 2001 From: David Pilato Date: Tue, 4 Aug 2015 12:30:39 +0200 Subject: [PATCH 1/2] Packaging: mvn install renames artifacts when copying MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR: * renames all distribution artifacts to `elasticsearch` so maven plugins will pick up the correct finalName without needing any hack. * changes the groupId for every single distribution module as we can't have more than one module using the same groupId:artifactId * does not attach anymore empty jar files for tar/zip/... modules as they don't contain any `src/main/java` stuff. When you build it, you end up with: ``` $ tree ~/.m2/repository/org/elasticsearch/distribution distribution ├── deb │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── elasticsearch-distribution │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── fully-loaded │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── rpm │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.sha1 ├── shaded │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 ├── tar │   └── elasticsearch │   ├── 2.0.0-beta1-SNAPSHOT │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1 │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz │   │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.md5 │   │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.sha1 └── zip └── elasticsearch └── 2.0.0-beta1-SNAPSHOT    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.md5    ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.sha1       └── ``` Closes #12536 --- distribution/deb/pom.xml | 14 ++++++++++---- distribution/fully-loaded/pom.xml | 3 ++- distribution/pom.xml | 9 ++++++++- distribution/rpm/pom.xml | 8 ++++---- distribution/shaded/pom.xml | 5 +++-- distribution/src/main/assemblies/common-bin.xml | 3 ++- distribution/tar/pom.xml | 12 +++++++++--- distribution/zip/pom.xml | 12 +++++++++--- pom.xml | 2 +- 9 files changed, 48 insertions(+), 20 deletions(-) diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml index cbe2631cf8a..5706f8f55dc 100644 --- a/distribution/deb/pom.xml +++ b/distribution/deb/pom.xml @@ -9,8 +9,14 @@ 2.0.0-SNAPSHOT - elasticsearch-deb + org.elasticsearch.distribution.deb + elasticsearch Elasticsearch DEB Distribution + + false @@ -19,8 +25,8 @@ - org.elasticsearch.distribution - elasticsearch-fully-loaded + org.elasticsearch.distribution.fully-loaded + elasticsearch ${elasticsearch.version} pom @@ -90,7 +96,6 @@ jdeb org.vafer - 1.4 ${project.build.directory}/releases/elasticsearch-${project.version}.deb @@ -253,6 +258,7 @@ + org.apache.maven.plugins maven-antrun-plugin diff --git a/distribution/fully-loaded/pom.xml b/distribution/fully-loaded/pom.xml index ff3d69a5ab7..91988f187ab 100644 --- a/distribution/fully-loaded/pom.xml +++ b/distribution/fully-loaded/pom.xml @@ -9,7 +9,8 @@ 2.0.0-SNAPSHOT - elasticsearch-fully-loaded + org.elasticsearch.distribution.fully-loaded + elasticsearch Elasticsearch with all optional dependencies pom diff --git a/distribution/pom.xml b/distribution/pom.xml index 082d207855a..81e59786c64 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -71,7 +71,6 @@ - elasticsearch-${project.version} @@ -156,6 +155,14 @@ + + org.apache.maven.plugins + maven-jar-plugin + + + true + + com.carrotsearch.randomizedtesting junit4-maven-plugin diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml index 2e71b8011d9..d48aca8a125 100644 --- a/distribution/rpm/pom.xml +++ b/distribution/rpm/pom.xml @@ -9,14 +9,15 @@ 2.0.0-SNAPSHOT - elasticsearch-rpm + org.elasticsearch.distribution.rpm + elasticsearch Elasticsearch RPM Distribution rpm - org.elasticsearch.distribution - elasticsearch-fully-loaded + org.elasticsearch.distribution.fully-loaded + elasticsearch ${elasticsearch.version} pom @@ -301,7 +302,6 @@ ${project.packaging} true ${project.build.directory}/releases/ - elasticsearch-${project.version}.rpm diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml index 5426572f65d..698b0907d66 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -9,7 +9,8 @@ 2.0.0-SNAPSHOT - elasticsearch-shaded + org.elasticsearch.distribution.shaded + elasticsearch Elasticsearch Shaded Distribution @@ -21,13 +22,13 @@ - ${project.artifactId}-${project.version} org.apache.maven.plugins maven-jar-plugin + false true diff --git a/distribution/src/main/assemblies/common-bin.xml b/distribution/src/main/assemblies/common-bin.xml index 868521b28eb..f95368d3572 100644 --- a/distribution/src/main/assemblies/common-bin.xml +++ b/distribution/src/main/assemblies/common-bin.xml @@ -4,10 +4,11 @@ /lib true false + false - org.elasticsearch.distribution:* + *:pom diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml index 641de8577c2..c0ebae4b760 100644 --- a/distribution/tar/pom.xml +++ b/distribution/tar/pom.xml @@ -9,13 +9,19 @@ 2.0.0-SNAPSHOT - elasticsearch-tar + org.elasticsearch.distribution.tar + elasticsearch Elasticsearch TAR Distribution + + - org.elasticsearch.distribution - elasticsearch-fully-loaded + org.elasticsearch.distribution.fully-loaded + elasticsearch ${elasticsearch.version} pom diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml index b6b784a97fe..5ac05c16360 100644 --- a/distribution/zip/pom.xml +++ b/distribution/zip/pom.xml @@ -9,13 +9,19 @@ 2.0.0-SNAPSHOT - elasticsearch-zip + org.elasticsearch.distribution.zip + elasticsearch Elasticsearch ZIP Distribution + + - org.elasticsearch.distribution - elasticsearch-fully-loaded + org.elasticsearch.distribution.fully-loaded + elasticsearch ${elasticsearch.version} pom diff --git a/pom.xml b/pom.xml index 366eb021b98..1558e1c9903 100644 --- a/pom.xml +++ b/pom.xml @@ -905,7 +905,7 @@ org.vafer jdeb - 1.3 + 1.4 true From f1019ace3b7854878df7bd652fea30005fcf6c00 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 4 Aug 2015 09:59:19 -0400 Subject: [PATCH 2/2] Fix plugins integ dependencies and apply cleanups --- .../src/main/resources/ant/integration-tests.xml | 12 ++++++------ plugins/pom.xml | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index fa454983130..45b8db019e6 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -143,9 +143,9 @@ - + - + @@ -185,7 +185,7 @@ - @@ -200,7 +200,7 @@ - @@ -217,7 +217,7 @@ - + @@ -244,7 +244,7 @@ - + diff --git a/plugins/pom.xml b/plugins/pom.xml index 4bc761b14b5..ef4620b3f30 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -385,16 +385,14 @@ ${skip.integ.tests} - org.elasticsearch.distribution - elasticsearch-zip + org.elasticsearch.distribution.zip + elasticsearch ${elasticsearch.version} zip true - - elasticsearch-${elasticsearch.version}.zip + true ${integ.deps}