Merge pull request #12642 from elastic/maven/distribution-groupid

[build] mvn install renames artifacts when copying
This commit is contained in:
David Pilato 2015-08-04 16:26:38 +02:00
commit 38b1ed302f
11 changed files with 57 additions and 31 deletions

View File

@ -143,9 +143,9 @@
<!-- TODO: doesn't belong here, but we will figure it out -->
<target name="start-foreground" depends="stop-external-cluster">
<delete dir="${integ.scratch}"/>
<unzip src="${project.build.directory}/releases/elasticsearch-${project.version}.zip" dest="${integ.scratch}"/>
<unzip src="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip" dest="${integ.scratch}"/>
<local name="home"/>
<property name="home" location="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
<property name="home" location="${integ.scratch}/${project.artifactId}-${elasticsearch.version}"/>
<run-script script="${home}/bin/elasticsearch" spawn="false"
args="${integ.args} -Des.path.repo=${home}/repo">
<nested>
@ -185,7 +185,7 @@
<target name="setup-workspace-zip" depends="stop-external-cluster" unless="${shouldskip}">
<sequential>
<delete dir="${integ.scratch}"/>
<unzip src="${project.build.directory}/releases/elasticsearch-${project.version}.zip"
<unzip src="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"
dest="${integ.scratch}"/>
</sequential>
</target>
@ -200,7 +200,7 @@
<target name="setup-workspace-tar" depends="stop-external-cluster" unless="${shouldskip}">
<sequential>
<delete dir="${integ.scratch}"/>
<untar src="${project.build.directory}/releases/elasticsearch-${project.version}.tar.gz"
<untar src="${project.build.directory}/releases/${project.artifactId}-${project.version}.tar.gz"
dest="${integ.scratch}"
compression="gzip"/>
</sequential>
@ -217,7 +217,7 @@
<delete dir="${integ.scratch}"/>
<mkdir dir="${integ.scratch}/deb-extracted"/>
<local name="debfile"/>
<property name="debfile" location="${project.build.directory}/releases/elasticsearch-${project.version}.deb"/>
<property name="debfile" location="${project.build.directory}/releases/${project.artifactId}-${project.version}.deb"/>
<!-- print some basic package info -->
<exec executable="dpkg-deb" failonerror="true" taskname="deb-info">
<arg value="-I"/>
@ -244,7 +244,7 @@
<local name="rpm.file"/>
<local name="rpm.database"/>
<local name="rpm.extracted"/>
<property name="rpm.file" location="${project.build.directory}/releases/elasticsearch-${project.version}.rpm"/>
<property name="rpm.file" location="${project.build.directory}/releases/${project.artifactId}-${project.version}.rpm"/>
<property name="rpm.database" location="${integ.scratch}/rpm-database"/>
<property name="rpm.extracted" location="${integ.scratch}/rpm-extracted"/>
<mkdir dir="${rpm.database}"/>

View File

@ -9,8 +9,14 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-deb</artifactId>
<groupId>org.elasticsearch.distribution.deb</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch DEB Distribution</name>
<!--
We should use deb packaging here because we don't want to publish any jar.
But if you do this, then maven lifecycle does not execute any test (nor compile any test)
-->
<!--packaging>deb</packaging-->
<properties>
<deb.sign>false</deb.sign>
@ -19,8 +25,8 @@
<dependencies>
<dependency>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-fully-loaded</artifactId>
<groupId>org.elasticsearch.distribution.fully-loaded</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>pom</type>
</dependency>
@ -90,7 +96,6 @@
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md -->
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.4</version>
<configuration>
<!-- By default it should generates target/${artifactId}_${version}.deb but we get elasticsearch_2.0.0~SNAPSHOT_all.deb -->
<deb>${project.build.directory}/releases/elasticsearch-${project.version}.deb</deb>
@ -253,6 +258,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>

View File

@ -9,7 +9,8 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-fully-loaded</artifactId>
<groupId>org.elasticsearch.distribution.fully-loaded</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch with all optional dependencies</name>
<packaging>pom</packaging>

View File

@ -71,7 +71,6 @@
</dependencies>
<build>
<finalName>elasticsearch-${project.version}</finalName>
<plugins>
<!-- We copy libs for deb and rpm -->
<plugin>
@ -156,6 +155,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- distribution modules don't provide any jar. No need to upload empty jars to maven central -->
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</plugin>
<plugin>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>junit4-maven-plugin</artifactId>

View File

@ -9,14 +9,15 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-rpm</artifactId>
<groupId>org.elasticsearch.distribution.rpm</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch RPM Distribution</name>
<packaging>rpm</packaging>
<dependencies>
<dependency>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-fully-loaded</artifactId>
<groupId>org.elasticsearch.distribution.fully-loaded</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>pom</type>
</dependency>
@ -301,7 +302,6 @@
<type>${project.packaging}</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/releases/</outputDirectory>
<destFileName>elasticsearch-${project.version}.rpm</destFileName>
</artifactItem>
</artifactItems>
</configuration>

View File

@ -9,7 +9,8 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-shaded</artifactId>
<groupId>org.elasticsearch.distribution.shaded</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch Shaded Distribution</name>
<dependencies>
@ -21,13 +22,13 @@
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- see docs, incremental builds dont play well with shading otherwise -->
<configuration>
<skipIfEmpty>false</skipIfEmpty>
<forceCreation>true</forceCreation>
</configuration>
</plugin>

View File

@ -4,10 +4,11 @@
<outputDirectory>/lib</outputDirectory>
<useTransitiveDependencies>true</useTransitiveDependencies>
<useTransitiveFiltering>false</useTransitiveFiltering>
<useProjectArtifact>false</useProjectArtifact>
<excludes>
<!-- don't include our POMs etc that we use internally -->
<!-- otherwise, don't filter here. mark deps properly instead -->
<exclude>org.elasticsearch.distribution:*</exclude>
<exclude>*:pom</exclude>
</excludes>
</dependencySet>
</dependencySets>

View File

@ -9,13 +9,19 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-tar</artifactId>
<groupId>org.elasticsearch.distribution.tar</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch TAR Distribution</name>
<!--
We should use pom packaging here because we don't want to publish any jar.
But if you do this, then maven lifecycle does not execute any test (nor compile any test)
-->
<!--packaging>pom</packaging-->
<dependencies>
<dependency>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-fully-loaded</artifactId>
<groupId>org.elasticsearch.distribution.fully-loaded</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>pom</type>
</dependency>

View File

@ -9,13 +9,19 @@
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>elasticsearch-zip</artifactId>
<groupId>org.elasticsearch.distribution.zip</groupId>
<artifactId>elasticsearch</artifactId>
<name>Elasticsearch ZIP Distribution</name>
<!--
We should use pom packaging here because we don't want to publish any jar.
But if you do this, then maven lifecycle does not execute any test (nor compile any test)
-->
<!--packaging>pom</packaging-->
<dependencies>
<dependency>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-fully-loaded</artifactId>
<groupId>org.elasticsearch.distribution.fully-loaded</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>pom</type>
</dependency>

View File

@ -385,16 +385,14 @@
<skip>${skip.integ.tests}</skip>
<artifactItems>
<artifactItem>
<groupId>org.elasticsearch.distribution</groupId>
<artifactId>elasticsearch-zip</artifactId>
<groupId>org.elasticsearch.distribution.zip</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<!-- these packaging builds sneakily rename their artifacts to look nothing
like their artifact id, so we must duplicate that rename here -->
<destFileName>elasticsearch-${elasticsearch.version}.zip</destFileName>
</artifactItem>
</artifactItems>
<useBaseVersion>true</useBaseVersion>
<outputDirectory>${integ.deps}</outputDirectory>
</configuration>
</execution>

View File

@ -905,7 +905,7 @@
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md -->
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
<version>1.3</version>
<version>1.4</version>
<extensions>true</extensions>
</plugin>
<plugin>