Strabon
changeset 1042:8495c0c9b597
Strabon build fails due to the recent dissapearence of Aduna's maven repository
author | Kostis Kyzirakos <kkyzir@di.uoa.gr> |
---|---|
date | Thu Apr 18 15:42:46 2013 +0300 (2013-04-18) |
parents | 61bc2e9bf304 |
children | 989e5948ea23 |
files | pom.xml scripts/workaround/deploy-local-repo.sh |
line diff
1.1 --- a/pom.xml Wed Apr 17 18:56:04 2013 +0300 1.2 +++ b/pom.xml Thu Apr 18 15:42:46 2013 +0300 1.3 @@ -840,7 +840,6 @@ 1.4 </mailingLists> 1.5 1.6 <repositories> 1.7 - <!-- 1.8 <repository> 1.9 <releases> 1.10 <enabled>true</enabled> 1.11 @@ -852,7 +851,6 @@ 1.12 <name>Strabon - maven repository</name> 1.13 <url>http://maven.strabon.di.uoa.gr/content/repositories/testing</url> 1.14 </repository> 1.15 - --> 1.16 <repository> 1.17 <releases> 1.18 <enabled>true</enabled> 1.19 @@ -875,6 +873,7 @@ 1.20 <name>Strabon - maven repository - snapshots</name> 1.21 <url>http://maven.strabon.di.uoa.gr/content/repositories/snapshots</url> 1.22 </repository> 1.23 + <!-- 1.24 <repository> 1.25 <releases> 1.26 <enabled>true</enabled> 1.27 @@ -897,6 +896,7 @@ 1.28 <name>Aduna Open Source - Maven snapshots</name> 1.29 <url>http://repo.aduna-software.org/maven2/snapshots</url> 1.30 </repository> 1.31 + --> 1.32 <repository> 1.33 <snapshots> 1.34 <enabled>true</enabled>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/scripts/workaround/deploy-local-repo.sh Thu Apr 18 15:42:46 2013 +0300 2.3 @@ -0,0 +1,84 @@ 2.4 +#!/bin/bash 2.5 +# check your ~/.m2/settings.xml for the correct values 2.6 +DEPLOY_REPO_ID="strabon.testing" 2.7 +DEPLOY_REPO_URL="http://maven.strabon.di.uoa.gr/content/repositories/testing/" 2.8 +TEMP_DIR="/tmp/deploy-local-repo-$$" 2.9 + 2.10 +mkdir ${TEMP_DIR} 2.11 +if [[ ! -d "${TEMP_DIR}" ]] ; then 2.12 + echo "Could not create temporary directory." 2.13 + echo "Aborting..." 2.14 + exit 2.15 +fi 2.16 + 2.17 + 2.18 +for d in `find ${HOME}/.m2/repository -type d` ; 2.19 +do 2.20 + #for each directory 2.21 + cd ${d} 2.22 + children=`find . -type d|wc -l` 2.23 + if [[ "${children}" -ne "1" ]] ; then 2.24 + # if the directory has more subdirectories, move one 2.25 + continue; 2.26 + fi 2.27 + 2.28 + countPoms=`ls -1 *.pom 2>/dev/null|wc -l` 2.29 + countJars=`ls -1 *.pom 2>/dev/null|wc -l` 2.30 + 2.31 + if [[ "${countPoms}" -gt "1" ]] && [[ "${countJars}" -gt "1" ]] ; then 2.32 + echo "Found ${countPoms} poms and ${countJars} jars in directory '${d}'." 2.33 + echo "Aborting..." 2.34 + exit; 2.35 + elif [[ "${countPoms}" -eq "0" ]] ; then 2.36 + echo "No .pom file found in directory '${d}'." 2.37 + echo "Aborting..." 2.38 + exit; 2.39 + fi 2.40 + 2.41 + pomFile=`ls -1 *.pom 2>/dev/null` 2.42 + jarFile=`ls -1 *.jar 2>/dev/null` 2.43 + cp ${pomFile} ${TEMP_DIR}/${pomFile} 2>/dev/null 2.44 + cp ${jarFile} ${TEMP_DIR}/${jarFile} 2>/dev/null 2.45 + 2.46 + 2.47 + if [[ "${countPoms}" -eq "1" ]] && [[ "${countJars}" -eq "1" ]] ; then 2.48 + # deploy the local jar file to the remote repo 2.49 + mvn deploy:deploy-file \ 2.50 + -DrepositoryId=${DEPLOY_REPO_ID} \ 2.51 + -Durl=${DEPLOY_REPO_URL} \ 2.52 + -DpomFile=${TEMP_DIR}/${pomFile} \ 2.53 + -Dfile=${TEMP_DIR}/${jarFile}; 2.54 + elif [[ "${countPoms}" -eq "1" ]] && [[ "${countJars}" -eq "0" ]] ; then 2.55 + # deploy the local pom file to the remote repo 2.56 + mvn deploy:deploy-file \ 2.57 + -DrepositoryId=${DEPLOY_REPO_ID} \ 2.58 + -Durl=${DEPLOY_REPO_URL} \ 2.59 + -DpomFile=${TEMP_DIR}/${pomFile} \ 2.60 + -Dfile=${TEMP_DIR}/${pomFile}; 2.61 + else 2.62 + echo "Found ${countPoms} poms and ${countJars} jars in directory '${d}'." 2.63 + echo "What should I do?" 2.64 + echo "Aborting..." 2.65 + exit; 2.66 + fi 2.67 + 2.68 + pomFile=`ls -1 *.pom` 2.69 + jarFile=`ls -1 *.jar` 2.70 + 2.71 + cp ${pomFile} ${TEMP_DIR}/${pomFile} 2.72 + cp ${jarFile} ${TEMP_DIR}/${jarFile} 2.73 + 2.74 + # deploy the local file to the remote repo 2.75 + mvn deploy:deploy-file \ 2.76 + -DrepositoryId=${DEPLOY_REPO_ID} \ 2.77 + -Durl=${DEPLOY_REPO_URL} \ 2.78 + -DpomFile=${TEMP_DIR}/${pomFile} \ 2.79 + -Dfile=${TEMP_DIR}/${jarFile}; 2.80 + 2.81 + # grooming 2.82 + rm ${TEMP_DIR}/* 2.83 +done 2.84 + 2.85 + 2.86 +# grooming 2.87 +rm -rf ${TEMP_DIR}