34 lines
882 B
Bash
34 lines
882 B
Bash
: "${MAVEN_DEPS:=}"
|
|
for dep in $MAVEN_DEPS; do
|
|
nameVar="MAVEN_NAME_${dep}"
|
|
orgVar="MAVEN_ORG_${dep}"
|
|
versionVar="MAVEN_VERSION_${dep}"
|
|
sourceVar="MAVEN_SOURCE_${dep}"
|
|
pomVar="MAVEN_POM_${dep}"
|
|
name="${!nameVar}"
|
|
org="${!orgVar}"
|
|
version="${!versionVar}"
|
|
source="${!sourceVar}"
|
|
pom="${!pomVar}"
|
|
|
|
if [ -n "$source" ]; then
|
|
path="/build/.maven/repository/$org/jars"
|
|
file="$path/$name-$version.jar"
|
|
|
|
echo "Registering Maven Dependency: $file -> $source"
|
|
mkdir -p $path
|
|
#ln -s "$source" "$file"
|
|
cp "$source" "$file"
|
|
chmod 777 "$file"
|
|
fi
|
|
|
|
if [ -n "$pom" ]; then
|
|
path="/build/.maven/repository/$org/poms"
|
|
file="$path/$name-$version.pom"
|
|
|
|
echo "Registering Maven Dependency POM: $file -> $pom"
|
|
mkdir -p $path
|
|
ln -s "$pom" "$file"
|
|
fi
|
|
done
|