mirror of https://github.com/apache/lucene.git
Better check Maven dependencies without using groovy and remove ANT duplication between Lucene + Solr
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1428229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e94b9ed073
commit
4a8522eb2a
|
@ -36,7 +36,7 @@
|
|||
<attribute name="target" />
|
||||
<sequential>
|
||||
<subant target="@{target}" inheritall="false" failonerror="true">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<fileset dir="${analyzers.dir}" includes="*/build.xml" />
|
||||
</subant>
|
||||
</sequential>
|
||||
|
@ -46,7 +46,6 @@
|
|||
<propertyref regex=".*\.uptodate$$"/>
|
||||
<propertyref regex=".*\.compiled$$"/>
|
||||
<propertyref regex=".*\.loaded$$"/>
|
||||
<propertyref name="maven.version.glob"/>
|
||||
</propertyset>
|
||||
|
||||
<target name="common">
|
||||
|
|
|
@ -483,7 +483,7 @@
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks, -define-maven-version-glob">
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
|
||||
<sequential>
|
||||
<subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
|
|
|
@ -246,7 +246,6 @@
|
|||
<propertyref regex=".*\.uptodate$$"/>
|
||||
<propertyref regex=".*\.compiled$$"/>
|
||||
<propertyref regex=".*\.loaded$$"/>
|
||||
<propertyref name="maven.version.glob"/>
|
||||
<propertyref name="lucene.javadoc.url"/><!-- for Solr -->
|
||||
</propertyset>
|
||||
|
||||
|
@ -1351,16 +1350,10 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-define-maven-version-glob" depends="resolve-groovy" unless="maven.version.glob">
|
||||
<!-- Too stupid, that ANT cannot apply regexes to property values: -->
|
||||
<script language="groovy" classpathref="groovy.classpath"><![CDATA[
|
||||
project.setProperty('maven.version.glob', project.getProperty('version').replaceAll(/\-SNAPSHOT/, '-*'));
|
||||
]]></script>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies">
|
||||
<target name="-validate-maven-dependencies.init">
|
||||
<!-- find the correct pom.xml path and assigns it to property pom.xml -->
|
||||
<property name="top.level.dir" location="${common.dir}/.."/>
|
||||
<pathconvert property="pom.xml">
|
||||
<pathconvert property="maven.pom.xml">
|
||||
<mapper>
|
||||
<chainedmapper>
|
||||
<globmapper from="${top.level.dir}*" to="${filtered.pom.templates.dir}*"/>
|
||||
|
@ -1369,7 +1362,21 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
</mapper>
|
||||
<path location="${ant.file}"/>
|
||||
</pathconvert>
|
||||
<m2-validate-dependencies pom.xml="${pom.xml}" licenseDirectory="${license.dir}">
|
||||
|
||||
<!-- convert ${version} to be a glob pattern, so snapshot versions are allowed: -->
|
||||
<loadresource property="maven.version.glob">
|
||||
<propertyresource name="version"/>
|
||||
<filterchain>
|
||||
<tokenfilter>
|
||||
<filetokenizer/>
|
||||
<replacestring from="-SNAPSHOT" to="-*"/>
|
||||
</tokenfilter>
|
||||
</filterchain>
|
||||
</loadresource>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
|
||||
<m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
|
||||
<excludes>
|
||||
<rsel:name name="**/lucene-*-${maven.version.glob}.jar" handledirsep="true"/>
|
||||
</excludes>
|
||||
|
|
|
@ -589,7 +589,7 @@
|
|||
</subant>
|
||||
</target>
|
||||
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks, -define-maven-version-glob">
|
||||
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
|
||||
<sequential>
|
||||
<subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
|
|
|
@ -306,18 +306,8 @@
|
|||
<target name="dist-maven-src-java"
|
||||
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common-src-java"/>
|
||||
|
||||
<target name="-validate-maven-dependencies">
|
||||
<property name="top.level.dir" location="${common.dir}/.."/>
|
||||
<pathconvert property="pom.xml">
|
||||
<mapper>
|
||||
<chainedmapper>
|
||||
<globmapper from="${top.level.dir}*" to="${filtered.pom.templates.dir}*"/>
|
||||
<globmapper from="*build.xml" to="*pom.xml"/>
|
||||
</chainedmapper>
|
||||
</mapper>
|
||||
<path location="${ant.file}"/>
|
||||
</pathconvert>
|
||||
<m2-validate-dependencies pom.xml="${pom.xml}" licenseDirectory="${license.dir}">
|
||||
<target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
|
||||
<m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
|
||||
<additional-filters>
|
||||
<replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
|
||||
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
|
||||
|
|
Loading…
Reference in New Issue