Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Minor improvements to other groovy scripts. Fix bug with missing <local/>

Uwe Schindler6254a72b5c35
diff --git a/extra-targets.xml b/extra-targets.xml
index 2c76ebd9617..7fecf15b924 100644
--- a/extra-targets.xml
+++ b/extra-targets.xml
@@ -101,6 +101,7 @@
inline="true" conf="default" transitive="true" pathid="svnkit.classpath"/>
<local name="svn.checkprops.failed"/>
<local name="svn.unversioned.failed"/>
+ <local name="svn.keywords.failed"/>
<local name="svn.changed.failed"/>
<groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[
import org.tmatesoft.svn.core.*;
@@ -111,7 +112,7 @@
SVNStatusClient statusClient = manager.getStatusClient();
SVNWCClient wcClient = manager.getWCClient();
- File basedir = new File(project.getProperty('basedir')).getAbsoluteFile();
+ File basedir = new File(properties['basedir']).getAbsoluteFile();
int baseLen = basedir.toString().length();
// do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
@@ -173,13 +174,15 @@
file, prop -> withKeywords.add(convertRelative(file));
} as ISVNPropertyHandler);
- def convertSet2String = {
- set -> set ? ('* ' + set.join(project.getProperty('line.separator') + '* ')) : null
+ def setProjectPropertyFromSet(prop, set) {
+ if (set) {
+ properties[prop] = '* ' + set.join(properties['line.separator'] + '* ');
+ }
};
- project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));
- project.setProperty('svn.keywords.failed', convertSet2String(withKeywords));
- project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));
- project.setProperty('svn.changed.failed', convertSet2String(changed));
+ setProjectPropertyFromSet('svn.checkprops.failed', missingProps);
+ setProjectPropertyFromSet('svn.keywords.failed', withKeywords);
+ setProjectPropertyFromSet('svn.unversioned.failed', unversioned);
+ setProjectPropertyFromSet('svn.changed.failed', changed);
]]></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}"/>
diff --git a/solr/common-build.xml b/solr/common-build.xml
index c8c2a8c30a9..3655ca5b2aa 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -320,16 +320,16 @@
<target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">
<groovy><![CDATA[
- String url, version = project.getProperty('version');
+ String url, version = properties['version'];
if (version.contains('-SNAPSHOT')) {
- url = new File(project.getProperty('common.dir'), 'build' + File.separator + 'docs').toURI().toASCIIString();
+ url = new File(properties['common.dir'], 'build' + File.separator + 'docs').toURI().toASCIIString();
if (!(url =~ /\/$/)) url += '/';
} else {
version = version.replace('.', '_');
url = 'http://lucene.apache.org/core/' + version + '/';
}
task.log('Using the following URL to refer to Lucene Javadocs: ' + url);
- project.setProperty('lucene.javadoc.url', url);
+ properties['lucene.javadoc.url'] = url;
]]></groovy>
</target>