mirror of
https://github.com/apache/lucene.git
synced 2025-02-20 17:07:09 +00:00
LUCENE-5213: Use <groovy/> instead <script/> ant task
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1523214 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
36d7c6b38d
commit
5329cbdd3d
@ -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"
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user