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 2012/09/26 15:58:55 UTC
svn commit: r1390493 - in /lucene/dev/branches/lucene_solr_4_0: ./ build.xml
lucene/ lucene/benchmark/ lucene/benchmark/build.xml lucene/build.xml
lucene/common-build.xml lucene/site/ lucene/site/changes/changes2html.pl
solr/ solr/build.xml
Author: uschindler
Date: Wed Sep 26 13:58:55 2012
New Revision: 1390493
URL: http://svn.apache.org/viewvc?rev=1390493&view=rev
Log:
LUCENE-4434: Make changes-to-html not depend on wget or curl, fix some unicode bugs with PERL, add -Dperl.exe property
LUCENE-4436: When building source distribution, changes-to-html uses wrong script and wrong CHANGES.txt
LUCENE-4432: Make top-level default ant task print -projecthelp
Modified:
lucene/dev/branches/lucene_solr_4_0/ (props changed)
lucene/dev/branches/lucene_solr_4_0/build.xml
lucene/dev/branches/lucene_solr_4_0/lucene/ (props changed)
lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/ (props changed)
lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/build.xml
lucene/dev/branches/lucene_solr_4_0/lucene/build.xml (contents, props changed)
lucene/dev/branches/lucene_solr_4_0/lucene/common-build.xml (contents, props changed)
lucene/dev/branches/lucene_solr_4_0/lucene/site/ (props changed)
lucene/dev/branches/lucene_solr_4_0/lucene/site/changes/changes2html.pl
lucene/dev/branches/lucene_solr_4_0/solr/ (props changed)
lucene/dev/branches/lucene_solr_4_0/solr/build.xml (contents, props changed)
Modified: lucene/dev/branches/lucene_solr_4_0/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/build.xml?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/build.xml (original)
+++ lucene/dev/branches/lucene_solr_4_0/build.xml Wed Sep 26 13:58:55 2012
@@ -17,7 +17,15 @@
limitations under the License.
-->
-<project name="lucene-solr" default="test" basedir=".">
+<project name="lucene-solr" default="-projecthelp" basedir=".">
+ <target name="-projecthelp">
+ <java fork="false" classname="org.apache.tools.ant.Main" taskname="-">
+ <arg value="-projecthelp"/>
+ <arg value="-f"/>
+ <arg value="${ant.file}"/>
+ </java>
+ </target>
+
<target name="test-help" description="Test runner help">
<subant target="test-help" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
@@ -54,7 +62,7 @@
</sequential>
</target>
- <target name="documentation-lint">
+ <target name="documentation-lint" description="Validates the generated documentation (HTML errors, broken links,...)">
<sequential>
<subant target="documentation-lint" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
Modified: lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/build.xml?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/build.xml (original)
+++ lucene/dev/branches/lucene_solr_4_0/lucene/benchmark/build.xml Wed Sep 26 13:58:55 2012
@@ -220,7 +220,8 @@
</java>
<echo>Benchmark output is in file: ${collation.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
- <exec executable="perl" output="${collation.jira.output.file}" failonerror="true">
+ <exec executable="${perl.exe}" output="${collation.jira.output.file}" failonerror="true">
+ <arg value="-CSD"/>
<arg value="scripts/collation.bm2jira.pl"/>
<arg value="${collation.output.file}"/>
</exec>
@@ -246,7 +247,8 @@
</java>
<echo>Benchmark output is in file: ${shingle.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
- <exec executable="perl" output="${shingle.jira.output.file}" failonerror="true">
+ <exec executable="${perl.exe}" output="${shingle.jira.output.file}" failonerror="true">
+ <arg value="-CSD"/>
<arg value="scripts/shingle.bm2jira.pl"/>
<arg value="${shingle.output.file}"/>
</exec>
Modified: lucene/dev/branches/lucene_solr_4_0/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/lucene/build.xml?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/lucene/build.xml (original)
+++ lucene/dev/branches/lucene_solr_4_0/lucene/build.xml Wed Sep 26 13:58:55 2012
@@ -406,8 +406,9 @@
<!-- Exclude clover license files incompatible with the ASL -->
<delete dir="${svn.export.dir}/tools/clover"/>
- <build-changes changes.src.dir="${svn.export.dir}/site/changes"
- changes.target.dir="${svn.export.dir}/docs/changes"/>
+ <build-changes changes.src.file="${svn.export.dir}/CHANGES.txt"
+ changes.target.dir="${svn.export.dir}/docs/changes"
+ changes.product="LUCENE"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir="${svn.export.dir}"/>
</tar>
@@ -498,7 +499,7 @@
</target>
<target name="changes-to-html">
- <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+ <build-changes changes.product="LUCENE"/>
</target>
<target name="pitest-modules" depends="compile-test">
Modified: lucene/dev/branches/lucene_solr_4_0/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/lucene/common-build.xml?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/lucene/common-build.xml (original)
+++ lucene/dev/branches/lucene_solr_4_0/lucene/common-build.xml Wed Sep 26 13:58:55 2012
@@ -208,6 +208,7 @@
-->
<property name="svnversion.exe" value="svnversion" />
<property name="svn.exe" value="svn" />
+ <property name="perl.exe" value="perl" />
<property name="hg.exe" value="hg" />
<property name="moman.url" value="https://bitbucket.org/jpbarrette/moman" />
@@ -1350,7 +1351,8 @@ ${tests-output}/junit4-*.suites - pe
<sequential>
<property name="output.build.xml" location="${build.dir}/stage_maven_build.xml"/>
<property name="dev-tools.scripts.dir" value="../dev-tools/scripts"/>
- <exec dir="." executable="perl" failonerror="true" outputproperty="stage.maven.script.output">
+ <exec dir="." executable="${perl.exe}" failonerror="true" outputproperty="stage.maven.script.output">
+ <arg value="-CSD"/>
<arg value="${dev-tools.scripts.dir}/write.stage.maven.build.xml.pl"/>
<arg value="${maven.dist.dir}"/> <!-- Maven distribution artifacts directory -->
<arg value="${output.build.xml}"/> <!-- Ant build file to be written -->
@@ -1839,16 +1841,23 @@ ${tests-output}/junit4-*.suites - pe
compile changes.txt into an html file
-->
<macrodef name="build-changes">
- <attribute name="changes.src.dir" default="${changes.src.dir}"/>
+ <attribute name="changes.product"/>
+ <attribute name="changes.src.file" default="CHANGES.txt"/>
<attribute name="changes.target.dir" default="${changes.target.dir}"/>
<sequential>
<mkdir dir="@{changes.target.dir}"/>
- <exec executable="perl" input="CHANGES.txt" output="@{changes.target.dir}/Changes.html"
+ <get src="https://issues.apache.org/jira/rest/api/2/project/@{changes.product}"
+ dest="@{changes.target.dir}/jiraVersionList.json" httpusecaches="false"/>
+ <exec executable="${perl.exe}" input="@{changes.src.file}" output="@{changes.target.dir}/Changes.html"
failonerror="true" logError="true">
- <arg value="@{changes.src.dir}/changes2html.pl"/>
+ <arg value="-CSD"/>
+ <arg value="${changes.src.dir}/changes2html.pl"/>
+ <arg value="@{changes.product}"/>
+ <arg value="@{changes.target.dir}/jiraVersionList.json"/>
</exec>
+ <delete file="@{changes.target.dir}/jiraVersionList.json"/>
<copy todir="@{changes.target.dir}">
- <fileset dir="@{changes.src.dir}" includes="*.css"/>
+ <fileset dir="${changes.src.dir}" includes="*.css"/>
</copy>
</sequential>
</macrodef>
Modified: lucene/dev/branches/lucene_solr_4_0/lucene/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/lucene/site/changes/changes2html.pl?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/lucene/site/changes/changes2html.pl (original)
+++ lucene/dev/branches/lucene_solr_4_0/lucene/site/changes/changes2html.pl Wed Sep 26 13:58:55 2012
@@ -41,17 +41,10 @@ my $first_relid = undef;
my $second_relid = undef;
my @releases = ();
-my @lines = <>; # Get all input at once
+my @lines = <STDIN>; # Get all input at once
-my $product = '';
-for my $line (@lines) {
- ($product) = $line =~ /(Solr|Lucene)/i;
- if ($product) {
- $product = uc($product);
- last;
- }
-}
-my %release_dates = &setup_release_dates;
+my $product = $ARGV[0];
+my %release_dates = &setup_release_dates($ARGV[1]);
my $in_major_component_versions_section = 0;
@@ -804,6 +797,7 @@ sub get_release_date {
#
sub setup_release_dates {
my %release_dates;
+ my $file = shift;
if (uc($product) eq 'LUCENE') {
%release_dates
= ( '0.01' => '2000-03-30', '0.04' => '2000-04-19',
@@ -826,9 +820,7 @@ sub setup_release_dates {
'3.0.0' => '2009-11-25');
}
- print STDERR "Retrieving $project_info_url/$product ...\n";
- my $project_info_json = get_url_contents("$project_info_url/$product");
-
+ my $project_info_json = readFile($file);
my $project_info = json2perl($project_info_json);
for my $version (@{$project_info->{versions}}) {
if ($version->{releaseDate}) {
@@ -844,20 +836,13 @@ sub setup_release_dates {
return %release_dates;
}
-#
-# returns contents of the passed in url
-#
-sub get_url_contents {
- my $url = shift;
- my $tryWget = `wget --no-check-certificate -O - $url`;
- if ($? eq 0) {
- return $tryWget;
- }
- my $tryCurl = `curl $url`;
- if ($? eq 0) {
- return $tryCurl;
- }
- die "could not retrieve $url with either wget or curl!";
+sub readFile {
+ my $file = shift;
+ open(F, '<'.$file) || die "could not open $file: $!";
+ local $/ = undef;
+ my $project_info_json = <F>;
+ close(F);
+ return $project_info_json;
}
#
Modified: lucene/dev/branches/lucene_solr_4_0/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/solr/build.xml?rev=1390493&r1=1390492&r2=1390493&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/solr/build.xml (original)
+++ lucene/dev/branches/lucene_solr_4_0/solr/build.xml Wed Sep 26 13:58:55 2012
@@ -369,8 +369,9 @@
<!-- Exclude clover license files incompatible with the ASL -->
<delete dir="${svn.export.dir}/lucene/tools/clover"/>
- <build-changes changes.src.dir="${svn.export.dir}/lucene/site/changes"
- changes.target.dir="${svn.export.dir}/solr/docs/changes"/>
+ <build-changes changes.src.file="${svn.export.dir}/solr/CHANGES.txt"
+ changes.target.dir="${svn.export.dir}/solr/docs/changes"
+ changes.product="SOLR"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir="${svn.export.dir}"
@@ -498,7 +499,7 @@
</target>
<target name="changes-to-html">
- <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+ <build-changes changes.product="SOLR"/>
</target>
<target name="sign-artifacts">