You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/03/10 09:48:52 UTC

[lucene] 05/08: 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

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch branch_7_0
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit f5ec4c02e2dad6f8ca490670cb53e3bcf26e797e
Author: Steve Rowe <sa...@gmail.com>
AuthorDate: Mon Oct 16 16:00:14 2017 -0400

    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
---
 dev-tools/scripts/write.stage.maven.build.xml.pl |  1 -
 lucene/common-build.xml                          | 10 ++++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dev-tools/scripts/write.stage.maven.build.xml.pl b/dev-tools/scripts/write.stage.maven.build.xml.pl
index c5e8aa8..21f09e8 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 whitespace
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index dba69db..37f35f3 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -1812,7 +1812,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"/>
@@ -1822,7 +1829,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!">