Pass build.properties files down to Maven (fixes bug with ASF Jenkins after restructuring the Jenkins config to use property files)

Clean property handling: it reads now consistently everywhere solely ~/lucene.build.properties, ~/build.properties, /lucene/build.properties (in this order)
Excludes were fixed

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1622666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-09-05 09:42:17 +00:00
parent b3015867f6
commit 8f5259b4ff
5 changed files with 13 additions and 14 deletions

View File

@ -18,11 +18,11 @@
-->
<project name="lucene-solr" default="-projecthelp" basedir=".">
<!-- Look for property definition in various *build.properties files -->
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
<property file="${user.home}/lucene.build.properties"/>
<property file="${user.home}/build.properties"/>
<property file="${basedir}/build.properties"/>
<property file="lucene/build.properties"/><!-- hack for Lucene users, clones Lucene's common-build.xml -->
<property file="lucene/build.properties"/><!-- ${common.dir} -->
<!-- include version number from property file (includes "version.*" properties) -->
<loadproperties srcFile="lucene/version.properties"/>

View File

@ -69,15 +69,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<lucene.version>${project.version}</lucene.version>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>

View File

@ -239,7 +239,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<version>2.17</version>
<configuration>
<runOrder>random</runOrder>
<reportFormat>plain</reportFormat>

View File

@ -74,10 +74,19 @@
</target>
<target name="-run-maven-build" depends="install-maven-tasks">
<!-- we load all user properties from files again using a prefix, to only pass those down, not all of Ant: -->
<property file="${user.home}/lucene.build.properties" prefix="m2userprop."/>
<property file="${user.home}/build.properties" prefix="m2userprop."/>
<property file="${common.dir}/build.properties" prefix="m2userprop."/>
<mvn xmlns="antlib:org.apache.maven.artifact.ant" pom="${maven-build-dir}/pom.xml"
mavenVersion="${maven-version}" failonerror="true" fork="true">
<arg value="-fae"/>
<arg value="install"/>
<syspropertyset>
<propertyref prefix="m2userprop."/>
<mapper type="glob" from="m2userprop.*" to="*"/>
</syspropertyset>
<!-- order is important: later ones override previous ones (against common Ant behaviour): -->
<syspropertyset>
<propertyref builtin="commandline"/>
</syspropertyset>

View File

@ -32,7 +32,6 @@
(and without typing -D each time it compiles it -->
<property file="${user.home}/lucene.build.properties"/>
<property file="${user.home}/build.properties"/>
<property file="${basedir}/build.properties"/>
<property file="${common.dir}/build.properties"/>
<property name="dev-tools.dir" location="${common.dir}/../dev-tools"/>