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 2014/08/10 14:35:17 UTC
svn commit: r1617102 - in /lucene/dev/trunk: extra-targets.xml
solr/common-build.xml
Author: uschindler
Date: Sun Aug 10 12:35:17 2014
New Revision: 1617102
URL: http://svn.apache.org/r1617102
Log:
Minor improvements to other groovy scripts. Fix bug with missing <local/>
Modified:
lucene/dev/trunk/extra-targets.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=1617102&r1=1617101&r2=1617102&view=diff
==============================================================================
--- lucene/dev/trunk/extra-targets.xml (original)
+++ lucene/dev/trunk/extra-targets.xml Sun Aug 10 12:35:17 2014
@@ -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}"/>
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1617102&r1=1617101&r2=1617102&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Sun Aug 10 12:35:17 2014
@@ -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>