From 1104f23bfce546b4f87ab9ca147a00dc79cffe85 Mon Sep 17 00:00:00 2001 From: j-n-c Date: Wed, 16 Mar 2022 13:41:29 +0000 Subject: [PATCH 1/3] Fixed python installer dataverse version parsing to fix #8494 --- scripts/installer/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/installer/install.py b/scripts/installer/install.py index ce74ccffb69..ea1a69db6a7 100644 --- a/scripts/installer/install.py +++ b/scripts/installer/install.py @@ -227,9 +227,9 @@ warfileVersion = "" if not os.path.isfile(warfile): # get dataverse version from pom.xml - tree = ET.ElementTree(file='../../pom.xml') + tree = ET.ElementTree(file='../../modules/dataverse-parent/pom.xml') for elem in tree.iter("*"): - if elem.tag == '{http://maven.apache.org/POM/4.0.0}version': + if elem.tag == '{http://maven.apache.org/POM/4.0.0}revision': warfileVersion = elem.text # only want the first, the rest are dependencies break From bf30a31a28ee427690e0f5a0546b971940f9e9f9 Mon Sep 17 00:00:00 2001 From: landreev Date: Wed, 16 Mar 2022 12:23:37 -0400 Subject: [PATCH 2/3] Fixing the Makefile to reflect the new pom file structure (#8494) --- scripts/installer/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer/Makefile b/scripts/installer/Makefile index 1722f208175..d40d4d792ea 100644 --- a/scripts/installer/Makefile +++ b/scripts/installer/Makefile @@ -29,7 +29,7 @@ ${INSTALL_SCRIPT}: install ${INSTALLER_ZIP_DIR} ${DISTRIBUTION_WAR_FILE}: @echo copying war file... - @VERSION_NUMBER=`grep -m1 '' ../../pom.xml | sed 's/ *<\/*version>//g'`; export VERSION_NUMBER; \ + @VERSION_NUMBER=`grep -m1 '' ../../modules/dataverse-parent/pom.xml | sed 's/ *<\/*revision>//g'`; export VERSION_NUMBER; \ BUILT_WAR_FILE=../../target/dataverse-$$VERSION_NUMBER.war; export BUILT_WAR_FILE; \ if [ -f $$BUILT_WAR_FILE ]; \ then \ From b6bd09cc8c779f4bbe85d921c2800d2961260fc2 Mon Sep 17 00:00:00 2001 From: landreev Date: Wed, 16 Mar 2022 12:28:37 -0400 Subject: [PATCH 3/3] Fixes the old (perl) installer To reflect the new pom file structure. (#8494) --- scripts/installer/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/installer/install b/scripts/installer/install index b30ad7982bc..2208f014606 100755 --- a/scripts/installer/install +++ b/scripts/installer/install @@ -277,7 +277,7 @@ unless ($postgresonly) unless ( -f $WARFILE_LOCATION ) { my $DATAVERSE_VERSION = ""; - my $DATAVERSE_POM_FILE = "../../pom.xml"; + my $DATAVERSE_POM_FILE = "../../modules/dataverse-parent/pom.xml"; if ( -f $DATAVERSE_POM_FILE ) { open DPF, $DATAVERSE_POM_FILE; @@ -285,7 +285,7 @@ unless ($postgresonly) while ($pom_line=) { chop $pom_line; - if ($pom_line =~/^[ \t]*([0-9\.]+)<\/version>/) + if ($pom_line =~/^[ \t]*([0-9\.]+)<\/revision>/) { $DATAVERSE_VERSION=$1; last;