Skip to content

Commit 7049435

Browse files
authored
Merge branch 'develop' into metadataLanguage-API-call
2 parents 0dc27ff + 0b7e41c commit 7049435

File tree

11 files changed

+32
-532
lines changed

11 files changed

+32
-532
lines changed

docker/util/intellij/cpwebapp.sh

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,26 @@ PROJECT_DIR="$1"
99
FILE_TO_COPY="$2"
1010
RELATIVE_PATH="${FILE_TO_COPY#"${PROJECT_DIR}/"}"
1111

12-
# Check if RELATIVE_PATH starts with 'src/main/webapp', otherwise ignore
12+
# Only act on files under src/main/webapp
1313
if [[ "$RELATIVE_PATH" == "src/main/webapp"* ]]; then
14-
# Extract version from POM, so we don't need to have Maven on the PATH
15-
VERSION=$(grep -oPm1 "(?<=<revision>)[^<]+" "$PROJECT_DIR/modules/dataverse-parent/pom.xml")
14+
POM="$PROJECT_DIR/modules/dataverse-parent/pom.xml"
1615

17-
# Construct the target path by cutting off the local prefix and prepend with in-container path
18-
RELATIVE_PATH_WITHOUT_WEBAPP="${RELATIVE_PATH#src/main/webapp/}"
19-
TARGET_PATH="/opt/payara/appserver/glassfish/domains/domain1/applications/dataverse-$VERSION/${RELATIVE_PATH_WITHOUT_WEBAPP}"
16+
# Extract <revision> in a portable way
17+
VERSION="$(awk -F'[<>]' '/<revision>/{print $3; exit}' "$POM")"
2018

21-
# Copy file to container
22-
docker cp "$FILE_TO_COPY" "dev_dataverse:$TARGET_PATH"
19+
if [[ -z "${VERSION:-}" ]]; then
20+
echo "Error: Could not extract <revision> from $POM" >&2
21+
exit 1
22+
fi
23+
24+
CONTAINER="dev_dataverse"
25+
26+
# Build target path
27+
RELATIVE_PATH_WITHOUT_WEBAPP="${RELATIVE_PATH#src/main/webapp/}"
28+
TARGET_PATH="/opt/payara/appserver/glassfish/domains/domain1/applications/dataverse-$VERSION/${RELATIVE_PATH_WITHOUT_WEBAPP}"
29+
30+
# Copy file into container
31+
docker cp "$FILE_TO_COPY" "$CONTAINER:$TARGET_PATH"
32+
33+
echo "Copied $FILE_TO_COPY$CONTAINER:$TARGET_PATH"
2334
fi
Binary file not shown.

local_lib/io/gdcc/xoai-common/5.3.2.1-local/xoai-common-5.3.2.1-local.pom

Lines changed: 0 additions & 82 deletions
This file was deleted.
Binary file not shown.

local_lib/io/gdcc/xoai-data-provider/5.3.2.1-local/xoai-data-provider-5.3.2.1-local.pom

Lines changed: 0 additions & 72 deletions
This file was deleted.
Binary file not shown.

local_lib/io/gdcc/xoai-service-provider/5.3.2.1-local/xoai-service-provider-5.3.2.1-local.pom

Lines changed: 0 additions & 65 deletions
This file was deleted.
Binary file not shown.

local_lib/io/gdcc/xoai-xmlio/5.3.2.1-local/xoai-xmlio-5.3.2.1-local.pom

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)