You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2013/09/14 13:19:33 UTC
svn commit: r1523214 - in /lucene/dev/trunk: extra-targets.xml
lucene/common-build.xml solr/common-build.xml
Author: uschindler
Date: Sat Sep 14 11:19:33 2013
New Revision: 1523214
URL: http://svn.apache.org/r1523214
Log:
LUCENE-5213: Use <groovy/> instead <script/> ant task
Modified:
lucene/dev/trunk/extra-targets.xml
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/solr/common-build.xml
Modified: lucene/dev/trunk/extra-targets.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/extra-targets.xml?rev=1523214&r1=1523213&r2=1523214&view=diff
==============================================================================
--- lucene/dev/trunk/extra-targets.xml (original)
+++ lucene/dev/trunk/extra-targets.xml Sat Sep 14 11:19:33 2013
@@ -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"
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1523214&r1=1523213&r2=1523214&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Sat Sep 14 11:19:33 2013
@@ -2064,6 +2064,9 @@ ${tests-output}/junit4-*.suites - pe
<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>
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1523214&r1=1523213&r2=1523214&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Sat Sep 14 11:19:33 2013
@@ -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">