Apache Solr open-source search software
Remove obsolete dev-tools scripts (#2105)
David Smileyd50bdbae832d
diff --git a/dev-tools/scripts/LUCENE-3753.patch.hack.pl b/dev-tools/scripts/LUCENE-3753.patch.hack.pldeleted file mode 100644index aa8860fb418..00000000000--- a/dev-tools/scripts/LUCENE-3753.patch.hack.pl+++ /dev/null@@ -1,111 +0,0 @@-#!/usr/bin/perl-#-# This script can be used to fix up paths that were moved as a result-# of the structural changes committed as part of LUCENE-3753.-#-# Input is on STDIN, output is to STDOUT-#-# Example use:-#-# perl LUCENE-3753.patch.hack.pl <my.pre-LUCENE-3753.patch >my.post-LUCENE-3753.patch-#-#-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.-#--use strict;-use warnings;--my @moves = (-- 'lucene/src/java'- => 'lucene/core/src/java',-- 'lucene/src/test'- => 'lucene/core/src/test',-- 'lucene/src/resources'- => 'lucene/core/src/resources',-- 'lucene/src/site'- => 'lucene/site',-- 'lucene/src/test-framework/java'- => 'lucene/test-framework/src/java',-- 'lucene/src/test-framework/resources'- => 'lucene/test-framework/src/resources',-- 'lucene/src/tools/java'- => 'lucene/tools/src/java',-- 'lucene/src/tools/javadoc'- => 'lucene/tools/javadoc',-- 'lucene/src/tools/prettify'- => 'lucene/tools/prettify',-- 'dev-tools/maven/lucene/src/pom.xml.template'- => 'dev-tools/maven/lucene/core/pom.xml.template',-- 'dev-tools/maven/lucene/src/test-framework/pom.xml.template'- => 'dev-tools/maven/lucene/test-framework/pom.xml.template',-);--my @copies = ();--my $diff;--while (<>) {- if (/^Index/) {- my $next_diff = $_;- &fixup_paths if ($diff);- $diff = $next_diff;- } else {- $diff .= $_;- }-}--&fixup_paths; # Handle the final diff--sub fixup_paths {- for (my $move_pos = 0 ; $move_pos < $#moves ; $move_pos += 2) {- my $source = $moves[$move_pos];- my $target = $moves[$move_pos + 1];- if ($diff =~ /^Index: \Q$source\E/) {- $diff =~ s/^Index: \Q$source\E/Index: $target/;- $diff =~ s/\n--- \Q$source\E/\n--- $target/;- $diff =~ s/\n\+\+\+ \Q$source\E/\n+++ $target/;- $diff =~ s/\nProperty changes on: \Q$source\E/\nProperty changes on: $target/;- last;- }- }- print $diff;-- for (my $copy_pos = 0 ; $copy_pos < $#copies ; $copy_pos += 2) {- my $source = $copies[$copy_pos];- my $target = $copies[$copy_pos + 1];- if ($diff =~ /^Index: \Q$source\E/) {- my $new_diff = $diff;- $new_diff =~ s/^Index: \Q$source\E/Index: $target/;- $new_diff =~ s/\n--- \Q$source\E/\n--- $target/;- $new_diff =~ s/\n\+\+\+ \Q$source\E/\n+++ $target/;- $new_diff =~ s/\nProperty changes on: \Q$source\E/\nProperty changes on: $target/;- print $new_diff;- last;- }- }-}diff --git a/dev-tools/scripts/crawl.maven.release.dist.sh b/dev-tools/scripts/crawl.maven.release.dist.shdeleted file mode 100755index c59d4516582..00000000000--- a/dev-tools/scripts/crawl.maven.release.dist.sh+++ /dev/null@@ -1,68 +0,0 @@-#!/bin/sh-#-# Crawls all Maven release distribution artifacts at the given release RC URL-# and downloads them to ./lucene/ and ./solr/ after first creating these-# two directories in the current directory.-#-#-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.-#--if [ -z "$1" ] ; then- echo "Usage: $0 <RC-URL>"- echo ""- echo "Example: $0 http://s.apache.org/lusolr36rc1"- exit 1;-fi--# Resolve redirects, e.g. from URL shortening, e.g. http://s.apache.org/lusolr36rc1-# Also trim trailing slashes, if any, from the resolved URL.-RC_URL=`(echo "Location: $1" ; wget -l 1 --spider "$1" 2>&1) \- | perl -ne '$url=$1 if (/Location:\s*(\S+)/); END { $url =~ s~/+$~~; print $url; }'`--if [ -d lucene ] ; then- echo "Please remove directory ./lucene/ before running this script."- exit 1;-elif [ -d solr ] ; then- echo "Please remove directory ./solr/ before running this script."- exit 1;-fi--mkdir lucene-cd lucene--# -r : recurse-# -np : "no parents": only download below the given URL-# -l 0 : infinite recursion (no limit on recursive crawling depth)-# -nH : "no Hostname" output directory - use only path elements-# -erobots=off : ignore robots.txt-# --cut-dirs=5: Don't create output directories for the first 5 path elements, e.g.-# /~acct/staging_area/lucene-solr-X.Y.Z-RCM-revNNNNNNN/lucene/maven/org/apache/lucene/...-# 1 2 3 4 5 6 7 8 9-# ^- Dirs start here-wget -r -np -l 0 -nH -erobots=off --cut-dirs=5 \- --reject="*.md5,*.sha1,*.sha512,maven-metadata.xml*,index.html*" "${RC_URL}/lucene/maven/"--cd ..--mkdir solr-cd solr--wget -r -np -l 0 -nH -erobots=off --cut-dirs=5 \- --reject="*.md5,*.sha1,*.sha512,maven-metadata.xml*,index.html*" "${RC_URL}/solr/maven/"--cd ..-diff --git a/dev-tools/scripts/gitignore-gen.sh b/dev-tools/scripts/gitignore-gen.shdeleted file mode 100755index cf703b2148b..00000000000--- a/dev-tools/scripts/gitignore-gen.sh+++ /dev/null@@ -1,21 +0,0 @@-#!/bin/bash--rm -f .gitignore-new--for dir in `find . -path '*.svn*' -prune -o -type d -print | grep -v -e "/build"`; do- ruby -e 'printf("SVN dir: %-70s", ARGV[0])' "$dir" >&2- svn info $dir > /dev/null 2>&1- if [ "$?" -eq "0" ]; then- svn propget "svn:ignore" $dir | ruby -e 'while $stdin.gets; (puts ARGV[0].gsub(/^\./, "") + "/" + $_) unless $_.strip.empty?; end' "$dir" > .temp- if [ -s .temp ]; then- echo " OK" >&2- echo -e "\n\n# $dir" >> .gitignore-new- cat .temp >> .gitignore-new- else- echo " --" >&2- fi- rm .temp- else- echo " NOT svn controlled." >&2- fi-done\ No newline at end of filediff --git a/dev-tools/scripts/write.stage.maven.build.xml.pl b/dev-tools/scripts/write.stage.maven.build.xml.pldeleted file mode 100755index 21f09e83a08..00000000000--- a/dev-tools/scripts/write.stage.maven.build.xml.pl+++ /dev/null@@ -1,180 +0,0 @@-#!/usr/bin/perl-#-# This script is called from lucene/build.xml and solr/build.xml, by target-# stage-maven-artifacts, to populate an internal Maven repository created by-# generate-maven-artifacts with Ant build files, one per POM. The-# stage-maven target is then called from each of these Ant build files.-#-# Command line parameters:-#-# 1. The directory in which to find Maven distribution POMs,-# jars, wars, and signatures.-# 2. The pathname of the Ant build script to be built.-# 3. The pathname of common-build.xml, which will be imported-# in the Ant build script to be built.-# 4. Whether to prompt for credentials, rather than consulting-# settings.xml: boolean, e.g. "true" or "false"-# 5. The ID of the target repository-# 6. The URL to the target repository-#-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.-#--use strict;-use warnings;-use File::Basename;-use File::Find;-use Cwd 'abs_path';-use File::Path qw(make_path);--my $num_artifacts = 0;-my $maven_dist_dir = abs_path($ARGV[0]);-my $output_build_xml_file = $ARGV[1];-my $common_build_xml = $ARGV[2];-my $m2_credentials_prompt = $ARGV[3];-my $m2_repository_id = $ARGV[4];-if ($^O eq 'cygwin') { # Make sure Cygwin Perl can find the output path- $output_build_xml_file = `cygpath -u "$output_build_xml_file"`;- $output_build_xml_file =~ s/\s+$//; # Trim trailing whitespace- $output_build_xml_file =~ s/^\s+//; # Trim leading whitespace-}-my ($output_file, $output_dir) = fileparse($output_build_xml_file);--my @basepaths = ();-my $grandparent_pom = '';-my @parent_poms = ();-sub find_poms;-File::Find::find({follow => 1, wanted => \&find_poms}, $maven_dist_dir);--my $parent_pom_targets = '';-if (@parent_poms) {- $parent_pom_targets = "<parent-poms>\n";- if ($grandparent_pom) {- $parent_pom_targets .= qq! <artifact:pom id="grandparent" file="$grandparent_pom"/>\n!;- }- my $n = 0;- for my $parent_pom (@parent_poms) {- $parent_pom_targets .= qq! <artifact:pom id="parent.$n" file="$parent_pom"/>\n!;- ++$n;- }- $parent_pom_targets .= " </parent-poms>\n";-}--make_path($output_dir);-open my $output_build_xml, ">$output_build_xml_file"- or die "ERROR opening '$ARGV[1]' for writing: $!";--print $output_build_xml qq!<?xml version="1.0"?>-<project xmlns:artifact="antlib:org.apache.maven.artifact.ant">- <import file="${common_build_xml}"/>-- <target name="stage-maven" depends="install-maven-tasks">- <sequential>-!;--my $credentials = '';-if ($m2_credentials_prompt !~ /\A(?s:f(?:alse)?|no?)\z/) {- print $output_build_xml qq!- <input message="Enter $m2_repository_id username: >" addproperty="m2.repository.username"/>- <echo>WARNING: ON SOME PLATFORMS YOUR PASSPHRASE WILL BE ECHOED BACK\!\!\!\!\!</echo>- <input message="Enter $m2_repository_id password: >" addproperty="m2.repository.password">- <handler type="secure"/>- </input>\n!;-- $credentials = q!<credentials>- <authentication username="${m2.repository.username}" password="${m2.repository.password}"/>- </credentials>!;-}--for my $basepath (@basepaths) {- output_deploy_stanza($basepath);-}--print $output_build_xml q!- </sequential>- </target>-</project>-!;--close $output_build_xml;--print "Wrote '$output_build_xml_file' to stage $num_artifacts Maven artifacts.\n";-exit;--sub find_poms {- /^(.*)\.pom\z/s && do {- my $pom_dir = $File::Find::dir;- if ($^O eq 'cygwin') { # Output windows-style paths on Windows- $pom_dir = `cygpath -w "$pom_dir"`;- $pom_dir =~ s/\s+$//; # Trim trailing whitespace- $pom_dir =~ s/^\s+//; # Trim leading whitespace- }- my $basefile = $_;- $basefile =~ s/\.pom\z//;- my $basepath = "$pom_dir/$basefile";- push @basepaths, $basepath;-- if ($basefile =~ /grandparent/) {- $grandparent_pom = "$basepath.pom";- } elsif ($basefile =~ /parent/) {- push @parent_poms, "$basepath.pom";- }- }-}--sub output_deploy_stanza {- my $basepath = shift;- my $pom_file = "$basepath.pom";- my $jar_file = "$basepath.jar";- my $war_file = "$basepath.war";-- if (-f $war_file) {- print $output_build_xml qq!- <m2-deploy pom.xml="${pom_file}" jar.file="${war_file}">- $parent_pom_targets- <artifact-attachments>- <attach file="${pom_file}.asc" type="pom.asc"/>- <attach file="${war_file}.asc" type="war.asc"/>- </artifact-attachments>- $credentials- </m2-deploy>\n!;- } elsif (-f $jar_file) {- print $output_build_xml qq!- <m2-deploy pom.xml="${pom_file}" jar.file="${jar_file}">- $parent_pom_targets- <artifact-attachments>- <attach file="${basepath}-sources.jar" classifier="sources"/>- <attach file="${basepath}-javadoc.jar" classifier="javadoc"/>- <attach file="${pom_file}.asc" type="pom.asc"/>- <attach file="${jar_file}.asc" type="jar.asc"/>- <attach file="${basepath}-sources.jar.asc" classifier="sources" type="jar.asc"/>- <attach file="${basepath}-javadoc.jar.asc" classifier="javadoc" type="jar.asc"/>- </artifact-attachments>- $credentials- </m2-deploy>\n!;- } else {- print $output_build_xml qq!- <m2-deploy pom.xml="${pom_file}">- $parent_pom_targets- <artifact-attachments>- <attach file="${pom_file}.asc" type="pom.asc"/>- </artifact-attachments>- $credentials- </m2-deploy>\n!;- }-- ++$num_artifacts;-}