Apache Lucene open-source search software
LUCENE-5213: Use <groovy/> instead <script/> ant task
Uwe Schindler5329cbdd3d68
diff --git a/extra-targets.xml b/extra-targets.xmlindex 266790131f8..9ac1e058dcc 100644--- a/extra-targets.xml+++ b/extra-targets.xml@@ -79,11 +79,7 @@<local name="svn.checkprops.failed"/><local name="svn.unversioned.failed"/><local name="svn.changed.failed"/>- <script language="groovy" taskname="svn">- <classpath>- <path refid="groovy.classpath"/>- <path refid="svnkit.classpath"/>- </classpath><![CDATA[+ <groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[import org.tmatesoft.svn.core.*;import org.tmatesoft.svn.core.wc.*;@@ -99,7 +95,7 @@Set missingProps = new TreeSet(), unversioned = new TreeSet(), changed = new TreeSet();- self.log('Getting all versioned and unversioned files...');+ task.log('Getting all versioned and unversioned files...');statusClient.doStatus(basedir, SVNRevision.WORKING, SVNDepth.fromRecurse(true), false, true, false, false, {status ->SVNStatusType nodeStatus = status.getNodeStatus();@@ -114,12 +110,12 @@}} as ISVNStatusHandler, null);- self.log('Filtering files with existing svn:eol-style...');+ task.log('Filtering files with existing svn:eol-style...');wcClient.doGetProperty(basedir, 'svn:eol-style', SVNRevision.WORKING, SVNRevision.WORKING, true, {file, prop -> missingProps.remove(convertRelative(file));} as ISVNPropertyHandler);- self.log('Filtering files with binary svn:mime-type...');+ task.log('Filtering files with binary svn:mime-type...');wcClient.doGetProperty(basedir, 'svn:mime-type', SVNRevision.WORKING, SVNRevision.WORKING, true, {file, prop ->prop = SVNPropertyValue.getPropertyAsString(prop.getValue());@@ -134,7 +130,7 @@project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));project.setProperty('svn.changed.failed', convertSet2String(changed));- ]]></script>+ ]]></groovy><fail if="svn.checkprops.failed"message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/><fail if="svn.unversioned.failed"diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 0a1461615ab..f1c2c0ff401 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -2064,6 +2064,9 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites<target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-configure"><ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.1.5"inline="true" conf="default" type="jar" transitive="true" pathid="groovy.classpath"/>+ <taskdef name="groovy"+ classname="org.codehaus.groovy.ant.Groovy"+ classpathref="groovy.classpath"/><property name="groovy.loaded" value="true"/></target>diff --git a/solr/common-build.xml b/solr/common-build.xmlindex 1e427c5d15b..11e03304f35 100644--- a/solr/common-build.xml+++ b/solr/common-build.xml@@ -283,7 +283,7 @@</macrodef><target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">- <script language="groovy" classpathref="groovy.classpath"><![CDATA[+ <groovy><![CDATA[String url, version = project.getProperty('version');if (version.contains('-SNAPSHOT')) {url = new File(project.getProperty('common.dir'), 'build' + File.separator + 'docs').toURI().toASCIIString();@@ -292,9 +292,9 @@version = version.replace('.', '_');url = 'http://lucene.apache.org/core/' + version + '/';}- self.log('Using the following URL to refer to Lucene Javadocs: ' + url);+ task.log('Using the following URL to refer to Lucene Javadocs: ' + url);project.setProperty('lucene.javadoc.url', url);- ]]></script>+ ]]></groovy></target><target name="jar-src">