Cleanup build files a little bit: remove descriptions of Jenkins-targets. Expose Clover, add Eclipse cleanup

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1391461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-09-28 13:44:36 +00:00
parent 014e6e0c94
commit e261f69df3
2 changed files with 59 additions and 66 deletions

View File

@ -27,9 +27,7 @@
</target> </target>
<target name="test-help" description="Test runner help"> <target name="test-help" description="Test runner help">
<subant target="test-help" inheritall="false" failonerror="true"> <subant buildpath="lucene" target="test-help" inheritall="false" failonerror="true"/>
<fileset dir="lucene" includes="build.xml" />
</subant>
</target> </target>
<target name="precommit" description="Run basic checks before committing" <target name="precommit" description="Run basic checks before committing"
@ -44,7 +42,7 @@
</sequential> </sequential>
</target> </target>
<target name="pitest" description="Test both Lucene and Solr"> <target name="pitest" description="Run PITest on both Lucene and Solr">
<sequential> <sequential>
<subant target="pitest" inheritall="false" failonerror="false"> <subant target="pitest" inheritall="false" failonerror="false">
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
@ -97,27 +95,24 @@
</target> </target>
<target name="rat-sources" description="Runs rat across all sources and tests"> <target name="rat-sources" description="Runs rat across all sources and tests">
<sequential><subant target="rat-sources" inheritall="false" failonerror="true"> <subant target="rat-sources" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" /> <fileset dir="solr" includes="build.xml" />
</subant></sequential> </subant>
</target> </target>
<target name="resolve" depends="clean-jars" description="Resolves all dependencies"> <target name="resolve" depends="clean-jars" description="Resolves all dependencies">
<sequential><subant target="resolve" inheritall="false" failonerror="true"> <subant target="resolve" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" /> <fileset dir="solr" includes="build.xml" />
</subant></sequential> </subant>
</target> </target>
<target name="compile" description="Compile Lucene and Solr"> <target name="compile" description="Compile Lucene and Solr">
<sequential>
<subant target="compile" inheritall="false" failonerror="true"> <subant target="compile" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" /> <fileset dir="solr" includes="build.xml" />
</subant> </subant>
</sequential>
</target> </target>
<property name="version" value="5.0-SNAPSHOT"/> <property name="version" value="5.0-SNAPSHOT"/>
@ -125,7 +120,7 @@
<property name="maven-version" value="2.2.1"/> <property name="maven-version" value="2.2.1"/>
<target name="get-maven-poms" <target name="get-maven-poms"
description="Copy Maven POMs from dev-tools/maven/ to ${maven-build-dir}/"> description="Copy Maven POMs from dev-tools/maven/ to the working copy root">
<copy todir="${maven-build-dir}" overwrite="true"> <copy todir="${maven-build-dir}" overwrite="true">
<fileset dir="${basedir}/dev-tools/maven"/> <fileset dir="${basedir}/dev-tools/maven"/>
<filterset begintoken="@" endtoken="@"> <filterset begintoken="@" endtoken="@">
@ -136,7 +131,7 @@
</target> </target>
<target name="clean-maven-build" <target name="clean-maven-build"
description="Remove "> description="Clean up Maven POMs in working copy">
<delete failonerror="true" dir="${maven-build-dir}/"/> <delete failonerror="true" dir="${maven-build-dir}/"/>
</target> </target>
@ -144,8 +139,6 @@
description="Generate Maven Artifacts for Lucene and Solr"> description="Generate Maven Artifacts for Lucene and Solr">
<property name="maven.dist.dir" location="dist/maven" /> <property name="maven.dist.dir" location="dist/maven" />
<mkdir dir="${maven.dist.dir}" /> <mkdir dir="${maven.dist.dir}" />
<sequential>
<ant dir="lucene" target="filter-pom-templates"/> <ant dir="lucene" target="filter-pom-templates"/>
<subant target="generate-maven-artifacts" inheritall="false" failonerror="true"> <subant target="generate-maven-artifacts" inheritall="false" failonerror="true">
<property name="maven.dist.dir" location="${maven.dist.dir}" /> <property name="maven.dist.dir" location="${maven.dist.dir}" />
@ -153,10 +146,9 @@
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" /> <fileset dir="solr" includes="build.xml" />
</subant> </subant>
</sequential>
</target> </target>
<target name="validate-maven-dependencies" depends="generate-maven-artifacts" description="Validates maven dependencies, licenses, etc"> <target name="validate-maven-dependencies" depends="generate-maven-artifacts" description="Validates maven dependencies, licenses, etc.">
<subant target="-validate-maven-dependencies" inheritall="false" failonerror="true"> <subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
<property name="filtered.pom.templates.uptodate" value="true"/> <property name="filtered.pom.templates.uptodate" value="true"/>
<fileset dir="lucene" includes="build.xml"/> <fileset dir="lucene" includes="build.xml"/>
@ -165,11 +157,10 @@
</target> </target>
<target name="run-maven-build" depends="get-maven-poms" description="Runs the Maven build using automatically generated POMs"> <target name="run-maven-build" depends="get-maven-poms" description="Runs the Maven build using automatically generated POMs">
<subant target="run-maven-build" inheritall="false" failonerror="true"> <subant buildpath="." genericantfile="extra-targets.xml" target="-run-maven-build" inheritall="false" failonerror="true">
<propertyset> <propertyset>
<propertyref prefix="maven-"/> <propertyref prefix="maven-"/>
</propertyset> </propertyset>
<fileset dir="." includes="extra-targets.xml" />
</subant> </subant>
</target> </target>
@ -196,6 +187,14 @@
</echo> </echo>
</target> </target>
<target name="clean-eclipse" description="Removes all Eclipse configuration files">
<delete dir=".settings" failonerror="true"/>
<delete failonerror="true">
<fileset dir="." includes=".classpath,.project"/>
</delete>
<delete dir="eclipse-build" failonerror="true"/>
</target>
<target name="idea" depends="clean-jars, resolve" description="Setup IntelliJ IDEA configuration"> <target name="idea" depends="clean-jars, resolve" description="Setup IntelliJ IDEA configuration">
<copy todir="."> <copy todir=".">
<fileset dir="dev-tools/idea"/> <fileset dir="dev-tools/idea"/>
@ -217,7 +216,7 @@
<delete dir="idea-build" failonerror="true"/> <delete dir="idea-build" failonerror="true"/>
</target> </target>
<target name="clean" description="Clean Lucene and Solr"> <target name="clean" description="Clean Lucene and Solr build dirs">
<delete dir="dist" /> <delete dir="dist" />
<sequential> <sequential>
<subant target="clean" inheritall="false" failonerror="true"> <subant target="clean" inheritall="false" failonerror="true">
@ -239,18 +238,14 @@
</target> </target>
<target name="ivy-bootstrap" description="Download and install Ivy in the users ant lib dir"> <target name="ivy-bootstrap" description="Download and install Ivy in the users ant lib dir">
<subant target="ivy-bootstrap" inheritall="false" failonerror="true"> <subant buildpath="lucene" target="ivy-boostrap" inheritall="false" failonerror="true"/>
<fileset dir="lucene" includes="build.xml" />
</subant>
</target> </target>
<target name="jar-checksums" description="Recompute SHA1 checksums for all JAR files."> <target name="jar-checksums" description="Recompute SHA1 checksums for all JAR files.">
<sequential>
<subant target="jar-checksums" inheritall="false" failonerror="true"> <subant target="jar-checksums" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" /> <fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" /> <fileset dir="solr" includes="build.xml" />
</subant> </subant>
</sequential>
</target> </target>
<!-- define here, as common-build is not included! --> <!-- define here, as common-build is not included! -->
@ -315,24 +310,12 @@
</sequential> </sequential>
</target> </target>
<target name="check-svn-working-copy"> <target name="check-svn-working-copy" description="Checks the status of the SVN working copy">
<subant target="check-svn-working-copy" inheritall="false" failonerror="true"> <subant buildpath="." genericantfile="extra-targets.xml" target="-check-svn-working-copy" inheritall="false" failonerror="true"/>
<fileset dir="." includes="extra-targets.xml" />
</subant>
</target> </target>
<!-- Calls only generate-clover-reports on Lucene, as Solr's is just a clone with other target; the database itsself is fixed --> <target name="run-clover" description="Runs all tests to measure coverage and generates report (pass &quot;ANT_ARGS=-Xmx1536M&quot; as environment)" depends="clean">
<target name="generate-clover-reports"> <antcall>
<subant target="generate-clover-reports" inheritall="false" failonerror="true">
<fileset dir="." includes="extra-targets.xml" />
</subant>
</target>
<!-- Jenkins tasks -->
<target name="jenkins-hourly" depends="clean,test,validate,-jenkins-documentation-lint,jar-checksums,check-svn-working-copy" description="Runs the Jenkins hourly test runs"/>
<target name="jenkins-clover" description="Runs nightly clover builds on Jenkins">
<antcall target="-jenkins-clover">
<param name="run.clover" value="true"/> <param name="run.clover" value="true"/>
<!-- must be 1, as clover does not like parallel test runs: --> <!-- must be 1, as clover does not like parallel test runs: -->
<param name="tests.jvms" value="1"/> <param name="tests.jvms" value="1"/>
@ -343,12 +326,22 @@
<param name="tests.badapples" value="true"/> <param name="tests.badapples" value="true"/>
<!-- The idea behind Clover is to determine test coverage, so be immune to failing tests: --> <!-- The idea behind Clover is to determine test coverage, so be immune to failing tests: -->
<param name="tests.haltonfailure" value="false"/> <param name="tests.haltonfailure" value="false"/>
<target name="test"/>
<target name="-generate-clover-reports"/>
</antcall> </antcall>
</target> </target>
<target name="-jenkins-clover" depends="clean,test,generate-clover-reports"/>
<target name="jenkins-maven-nightly" depends="clean,remove-maven-artifacts,run-maven-build,generate-maven-artifacts,validate-maven-dependencies" <target name="-generate-clover-reports">
description="Runs the nightly Maven build on Jenkins, including artifact deployment"/> <subant buildpath="." genericantfile="extra-targets.xml" target="-generate-clover-reports" inheritall="false" failonerror="true"/>
</target>
<!-- Jenkins tasks -->
<target name="jenkins-hourly" depends="clean,test,validate,-jenkins-documentation-lint,jar-checksums,check-svn-working-copy"/>
<target name="jenkins-maven-nightly" depends="clean,remove-maven-artifacts,run-maven-build,generate-maven-artifacts,validate-maven-dependencies"/>
<target name="jenkins-clover" depends="run-clover"/>
<!-- we need this extra condition, as we want to match only on "true", not solely if property is set: --> <!-- we need this extra condition, as we want to match only on "true", not solely if property is set: -->
<property name="disable.documentation-lint" value="false" /> <property name="disable.documentation-lint" value="false" />

View File

@ -31,7 +31,7 @@
This target is in a separate file, as it needs to include common-build.xml, This target is in a separate file, as it needs to include common-build.xml,
but must run from top-level! but must run from top-level!
--> -->
<target name="generate-clover-reports" depends="clover"> <target name="-generate-clover-reports" depends="clover">
<fail unless="run.clover">Clover not enabled!</fail> <fail unless="run.clover">Clover not enabled!</fail>
<mkdir dir="${clover.report.dir}"/> <mkdir dir="${clover.report.dir}"/>
<fileset dir="." id="clover.test.result.files"> <fileset dir="." id="clover.test.result.files">
@ -51,7 +51,7 @@
<echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo> <echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo>
</target> </target>
<target name="run-maven-build" depends="install-maven-tasks"> <target name="-run-maven-build" depends="install-maven-tasks">
<mvn xmlns="antlib:org.apache.maven.artifact.ant" pom="${maven-build-dir}/pom.xml" <mvn xmlns="antlib:org.apache.maven.artifact.ant" pom="${maven-build-dir}/pom.xml"
mavenVersion="${maven-version}" failonerror="true" fork="true"> mavenVersion="${maven-version}" failonerror="true" fork="true">
<arg value="-fae"/> <arg value="-fae"/>
@ -59,7 +59,7 @@
</mvn> </mvn>
</target> </target>
<target xmlns:ivy="antlib:org.apache.ivy.ant" name="check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy"> <target xmlns:ivy="antlib:org.apache.ivy.ant" name="-check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
<ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="1.7.5-v1" <ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="1.7.5-v1"
inline="true" conf="default" type="jar" transitive="true" pathid="svnkit.classpath"/> inline="true" conf="default" type="jar" transitive="true" pathid="svnkit.classpath"/>
<script language="groovy" taskname="svn"> <script language="groovy" taskname="svn">