Apache Solr open-source search software
LUCENE-7995: 'ant stage-maven-artifacts' should work from the top-level project directory, and should provide a better error message when its 'maven.dist.dir' param points to a non-existent directory
Steve Rowedabb9ed3254a
diff --git a/dev-tools/scripts/write.stage.maven.build.xml.pl b/dev-tools/scripts/write.stage.maven.build.xml.plindex c5e8aa851ff..21f09e83a08 100755--- a/dev-tools/scripts/write.stage.maven.build.xml.pl+++ b/dev-tools/scripts/write.stage.maven.build.xml.pl@@ -46,7 +46,6 @@ 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];-my $m2_repository_url = $ARGV[5];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 whitespacediff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 03c6c2650ff..2c70813227f 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -1889,7 +1889,14 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}<target name="stage-maven-artifacts"><sequential><property name="output.build.xml" location="${build.dir}/stage_maven_build.xml"/>- <property name="dev-tools.scripts.dir" value="../dev-tools/scripts"/>+ <property name="dev-tools.scripts.dir" value="${common.dir}/../dev-tools/scripts"/>+ <fail message="maven.dist.dir '${maven.dist.dir}' does not exist!">+ <condition>+ <not>+ <available file="${maven.dist.dir}" type="dir"/>+ </not>+ </condition>+ </fail><exec dir="." executable="${perl.exe}" failonerror="false" outputproperty="stage.maven.script.output"resultproperty="stage.maven.script.success"><arg value="-CSD"/>@@ -1899,7 +1906,6 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}<arg value="${common.dir}/common-build.xml"/> <!-- Imported from the ant file to be written --><arg value="${m2.credentials.prompt}"/><arg value="${m2.repository.id}"/>- <arg value="${m2.repository.url}"/></exec><echo message="${stage.maven.script.output}"/><fail message="maven stage script failed!">