Releasing an updated tomcat to Sakai repo for pack-demo
Whenever a new tomcat comes out it needs to be released to the repository. I'm not sure how this was handled in the past but several jiras about it existed with semi-outdated instructions.
SAK-22312: Update tomcat 5.5 to newest version (5.5.35)Closed
SAK-22784: Update tomcat 5.5 to newest version (5.5.36)Closed and probably others. Here's what I did.
Make sure you have an account and key on source.sakaiproject.org as shared_release. In your .ssh/config file add this.
Host shared_release
IdentityFile ~/.ssh/private.key
Hostname source.sakaiproject.org
User shared_release
Go to Apache Tomcat and download the latest ZIP file to some directory on your file system that you can throw away.
http://tomcat.apache.org/download-70.cgi
Update the first line "export TOMCAT_VERSION=7.0.39" to match whatever version you downloaded then run this script. It should upload to shared release correctly using your private key. These instructions are for 7.0.42 and Maven 3 SAK-23510: Update tomcat 7.0 to newest version (7.0.39)Resolved
#!/bin/bash
export TOMCAT_VERSION=7.0.42
#For Maven 3
#If this doesn't work you need to download these 2 files first and put them in this directory
if [ ! -f wagon-ssh-external-1.0.jar ]; then
wget http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-common/2.2/wagon-ssh-common-2.2.jar
wget http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-external/1.0/wagon-ssh-external-1.0.jar
fi
for jar in `ls $PWD/wagon*.jar`; do
extClasspath="${jar}:${extClasspath}"
done
\rm -rf apache-tomcat-${TOMCAT_VERSION}
mvn deploy:deploy-file -DgroupId=tomcat.tomcat -DartifactId=tomcat -Dversion=${TOMCAT_VERSION} -Dpackaging=zip -Dfile=./apache-tomcat-${TOMCAT_VERSION}.zip -DrepositoryId=sakai-maven2 Durl=scpexe://shared_release/var/www/html/maven2 -Dmaven.ext.class.path="${extClasspath}"
unzip apache-tomcat-${TOMCAT_VERSION}
cd apache-tomcat-${TOMCAT_VERSION}/lib
mvn deploy:deploy-file -DgroupId=tomcat -DartifactId=catalina -Dversion=tomcat-${TOMCAT_VERSION} -Dpackaging=jar -Dfile=./catalina.jar -DrepositoryId=sakai-maven2 -Durl=scpexe://shared_release/var/www/html/maven2 -Dmaven.ext.class.path="${extClasspath}"
Tomcat 5.5 instructions mention some optional files. I don't think these are needed anymore, but I couldn't immediately find them.