mirror of https://github.com/apache/lucene.git
LUCENE-5322: Clean up / simplify Maven-related Ant targets
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1538144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ec4720f4c2
commit
9990a2eab9
18
build.xml
18
build.xml
|
@ -136,8 +136,10 @@
|
|||
<property name="version" value="5.0-SNAPSHOT"/>
|
||||
<property name="maven-build-dir" value="maven-build"/>
|
||||
<property name="maven-version" value="2.2.1"/>
|
||||
|
||||
<target name="get-maven-poms" depends="resolve"
|
||||
|
||||
<property name="maven.dependencies.filters.file" location="lucene/build/maven.dependencies.filters.properties"/>
|
||||
|
||||
<target name="get-maven-poms" depends="resolve"
|
||||
description="Copy Maven POMs from dev-tools/maven/ to maven-build/">
|
||||
<ant dir="lucene" target="-get-maven-poms" inheritall="false"/>
|
||||
</target>
|
||||
|
@ -147,14 +149,17 @@
|
|||
<delete failonerror="true" dir="${maven-build-dir}/"/>
|
||||
</target>
|
||||
|
||||
<target name="generate-maven-artifacts"
|
||||
<target name="generate-maven-artifacts" depends="resolve"
|
||||
description="Generate Maven Artifacts for Lucene and Solr">
|
||||
<property name="maven.dist.dir" location="dist/maven" />
|
||||
<mkdir dir="${maven.dist.dir}" />
|
||||
<ant dir="lucene" target="filter-pom-templates"/>
|
||||
<subant target="generate-maven-artifacts" inheritall="false" failonerror="true">
|
||||
<ant dir="lucene" inheritall="false">
|
||||
<target name="-unpack-lucene-tgz"/>
|
||||
<target name="-filter-pom-templates"/>
|
||||
</ant>
|
||||
<ant dir="solr" target="-unpack-solr-tgz" inheritall="false"/>
|
||||
<subant target="-dist-maven" inheritall="false" failonerror="true">
|
||||
<property name="maven.dist.dir" location="${maven.dist.dir}" />
|
||||
<property name="filtered.pom.templates.uptodate" value="true"/>
|
||||
<fileset dir="lucene" includes="build.xml" />
|
||||
<fileset dir="solr" includes="build.xml" />
|
||||
</subant>
|
||||
|
@ -163,7 +168,6 @@
|
|||
<target name="validate-maven-dependencies" depends="generate-maven-artifacts"
|
||||
description="Validates maven dependencies, licenses, etc.">
|
||||
<subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
|
||||
<property name="filtered.pom.templates.uptodate" value="true"/>
|
||||
<fileset dir="lucene" includes="build.xml"/>
|
||||
<fileset dir="solr" includes="build.xml"/>
|
||||
</subant>
|
||||
|
|
|
@ -254,6 +254,9 @@ Build
|
|||
transitive dependency resolution for all depended-on artifacts by putting
|
||||
an exclusion for each transitive dependency in the <dependencyManagement>
|
||||
section of the grandparent POM. (Steve Rowe)
|
||||
|
||||
* LUCENE-5322: Clean up / simplify Maven-related Ant targets.
|
||||
(Steve Rowe)
|
||||
|
||||
Tests
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@
|
|||
|
||||
<target name="build-artifacts-and-tests" depends="default,compile-test" />
|
||||
|
||||
<target name="dist-maven">
|
||||
<forall-analyzers target="dist-maven"/>
|
||||
<target name="-dist-maven">
|
||||
<forall-analyzers target="-dist-maven"/>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies">
|
||||
|
|
|
@ -512,19 +512,26 @@
|
|||
|
||||
</target>
|
||||
|
||||
<!-- install-maven-tasks is *not* a useless dependency. do not remove -->
|
||||
<target name="generate-maven-artifacts" depends="install-maven-tasks">
|
||||
<target name="-dist-maven" depends="install-maven-tasks">
|
||||
<sequential>
|
||||
<subant target="dist-maven" failonerror="true" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
|
||||
<subant target="-dist-maven" failonerror="true" inheritall="false">
|
||||
<fileset dir="${common.dir}/core" includes="build.xml"/>
|
||||
<fileset dir="${common.dir}/test-framework" includes="build.xml"/>
|
||||
</subant>
|
||||
|
||||
<modules-crawl target="dist-maven"/>
|
||||
<modules-crawl target="-dist-maven"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="generate-maven-artifacts" depends="-unpack-lucene-tgz">
|
||||
<sequential>
|
||||
<ant dir=".." target="resolve" inheritall="false"/>
|
||||
<antcall target="-filter-pom-templates" inheritall="false"/>
|
||||
<antcall target="-dist-maven" inheritall="false"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
|
||||
<sequential>
|
||||
<subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
|
||||
|
|
|
@ -22,5 +22,5 @@
|
|||
|
||||
<import file="../module-build.xml"/>
|
||||
|
||||
<target name="dist-maven" depends="dist-maven-src-java"/>
|
||||
<target name="-dist-maven" depends="-dist-maven-src-java"/>
|
||||
</project>
|
||||
|
|
|
@ -1381,10 +1381,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
classpathref="maven-ant-tasks.classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven"
|
||||
depends="filter-pom-templates, install-maven-tasks, m2-deploy-lucene-parent-pom, -unpack-lucene-tgz, dist-maven-common"/>
|
||||
<target name="dist-maven-common"
|
||||
depends="jar-src, javadocs, install-maven-tasks, filter-pom-templates">
|
||||
<target name="-dist-maven" depends="install-maven-tasks, jar-src, javadocs">
|
||||
<sequential>
|
||||
<property name="top.level.dir" location="${common.dir}/.."/>
|
||||
<pathconvert property="pom.xml">
|
||||
|
@ -1407,10 +1404,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven-src-java"
|
||||
depends="filter-pom-templates, install-maven-tasks, m2-deploy-lucene-parent-pom, -unpack-lucene-tgz, dist-maven-common-src-java"/>
|
||||
<target name="dist-maven-common-src-java"
|
||||
depends="-unpack-lucene-tgz, jar-src, javadocs, install-maven-tasks, filter-pom-templates">
|
||||
<target name="-dist-maven-src-java" depends="install-maven-tasks, jar-src, javadocs">
|
||||
<sequential>
|
||||
<property name="top.level.dir" location="${common.dir}/.."/>
|
||||
<pathconvert property="pom.xml">
|
||||
|
@ -1433,7 +1427,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies.init" depends="filter-pom-templates">
|
||||
<target name="-validate-maven-dependencies.init" depends="-filter-pom-templates">
|
||||
<!-- find the correct pom.xml path and assigns it to property pom.xml -->
|
||||
<property name="top.level.dir" location="${common.dir}/.."/>
|
||||
<pathconvert property="maven.pom.xml">
|
||||
|
@ -1492,10 +1486,8 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
|
|||
</target>
|
||||
|
||||
<property name="maven.dependencies.filters.file" location="${common.build.dir}/maven.dependencies.filters.properties"/>
|
||||
<available file="${maven.dependencies.filters.file}" property="maven.dependencies.filters.file.exists"/>
|
||||
|
||||
<target name="-get-maven-dependencies" depends="compile-tools,resolve,load-custom-tasks"
|
||||
unless="maven.dependencies.filters.file.exists">
|
||||
<target name="-get-maven-dependencies" depends="compile-tools,load-custom-tasks">
|
||||
<ant dir="${common.dir}/.." target="-append-all-modules-dependencies-properties" inheritall="false"/>
|
||||
<get-maven-dependencies-macro
|
||||
dir="${common.dir}/.."
|
||||
|
@ -1518,7 +1510,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="filter-pom-templates" depends="-get-maven-dependencies" unless="filtered.pom.templates.uptodate">
|
||||
<target name="-filter-pom-templates" depends="-get-maven-dependencies">
|
||||
<mkdir dir="${filtered.pom.templates.dir}"/>
|
||||
<copy todir="${common.dir}/build/poms" overwrite="true" encoding="UTF-8" filtering="on">
|
||||
<fileset dir="${common.dir}/../dev-tools/maven"/>
|
||||
|
@ -1530,19 +1522,6 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
|
|||
</filterset>
|
||||
<globmapper from="*.template" to="*"/>
|
||||
</copy>
|
||||
<property name="filtered.pom.templates.uptodate" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="m2-deploy-lucene-parent-pom" depends="filter-pom-templates,m2-deploy-grandparent-pom"
|
||||
unless="deployed.lucene.parent.pom.uptodate">
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
|
||||
<property name="deployed.lucene.parent.pom.uptodate" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="m2-deploy-grandparent-pom" depends="filter-pom-templates"
|
||||
unless="deployed.grandparent.pom.uptodate">
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
|
||||
<property name="deployed.grandparent.pom.uptodate" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="stage-maven-artifacts">
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven" depends="dist-maven-src-java"/>
|
||||
<target name="-dist-maven" depends="-dist-maven-src-java"/>
|
||||
|
||||
<macrodef name="createLevAutomaton">
|
||||
<attribute name="n"/>
|
||||
|
|
|
@ -603,26 +603,26 @@
|
|||
<contrib-crawl target="-ecj-javadoc-lint"/>
|
||||
</target>
|
||||
|
||||
<!-- install-maven-tasks and define-lucene-javadoc-url are *not* a useless dependencies. Do not remove! -->
|
||||
<target name="generate-maven-artifacts" depends="install-maven-tasks,define-lucene-javadoc-url">
|
||||
<target name="-dist-maven" depends="install-maven-tasks">
|
||||
<sequential>
|
||||
<subant target="dist-maven" inheritall="false" >
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
|
||||
<subant target="-dist-maven" inheritall="false" >
|
||||
<fileset dir="core" includes="build.xml"/>
|
||||
<fileset dir="solrj" includes="build.xml"/>
|
||||
<fileset dir="test-framework" includes="build.xml"/>
|
||||
<fileset dir="webapp" includes="build.xml"/>
|
||||
</subant>
|
||||
<contrib-crawl target="dist-maven"/>
|
||||
<contrib-crawl target="-dist-maven"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<!-- only used by validate below, it needs the lucene artifacts installed: can we do this better?! -->
|
||||
<target name="-generate-lucene-maven-artifacts">
|
||||
<subant target="generate-maven-artifacts" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<fileset dir="${common.dir}" includes="build.xml"/>
|
||||
</subant>
|
||||
|
||||
<!-- define-lucene-javadoc-url is *not* a useless dependencies. Do not remove! -->
|
||||
<target name="generate-maven-artifacts" depends="define-lucene-javadoc-url,-unpack-solr-tgz">
|
||||
<sequential>
|
||||
<ant dir=".." target="resolve" inheritall="false"/>
|
||||
<antcall target="-filter-pom-templates" inheritall="false"/>
|
||||
<antcall target="-dist-maven" inheritall="false"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
|
||||
|
|
|
@ -334,18 +334,6 @@
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="m2-deploy-solr-parent-pom" depends="filter-pom-templates"
|
||||
unless="deployed.solr.parent.pom.uptodate">
|
||||
<m2-deploy pom.xml="${filtered.pom.templates.dir}/solr/pom.xml"/> <!-- Solr parent POM -->
|
||||
<property name="deployed.solr.parent.pom.uptodate" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven"
|
||||
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, -unpack-solr-tgz, dist-maven-common"/>
|
||||
|
||||
<target name="dist-maven-src-java"
|
||||
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, -unpack-solr-tgz, dist-maven-common-src-java"/>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
|
||||
<m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
|
||||
<additional-filters>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven" depends="dist-maven-src-java"/>
|
||||
<target name="-dist-maven" depends="-dist-maven-src-java"/>
|
||||
|
||||
<target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
|
||||
<sequential>
|
||||
|
|
|
@ -70,5 +70,5 @@
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="dist-maven" depends="dist-maven-src-java"/>
|
||||
<target name="-dist-maven" depends="-dist-maven-src-java"/>
|
||||
</project>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</target>
|
||||
|
||||
<!-- nothing to do -->
|
||||
<target name="dist-maven"/>
|
||||
<target name="-dist-maven"/>
|
||||
|
||||
<!-- nothing to do -->
|
||||
<target name="-validate-maven-dependencies"/>
|
||||
|
|
Loading…
Reference in New Issue