I recently upgraded tomcat on a development machine and found that the CATALINA_HOME environment variable was no longer set. I looked on an older development machine and found that this used to be set with the file /etc/env.d/21tomcat. The contents of this file are as follows: CATALINA_HOME=/opt/tomcat CONFIG_PROTECT=/etc/tomcat #CATALINA_LIBDIR=/usr/share/tomcat/lib #CLASSPATH=${CATALINA_LIBDIR} #ENV_VARS="CATALINA_LIBDIR" I am not sure what the motivation was about removing this file, but many ant build.xml scripts depend on the CATALINA_HOME environment variable for locating the tomcat libraries and for using the built in ant tasks contained in $CATALINA_HOME/server/lib/catalina-ant.jar for deploying/undeploying particular applications. Reproducible: Always Steps to Reproduce: Expected Results: At the very minimum, the ebuild should install the file /etc/env.d/21tomcat that contains the following line: CATALINA_HOME=/opt/tomcat
$CATALINA_HOME is nog set in /etc/conf.d/tomcat5 .
I will assume you meant "now set in /etc/conf.d/tomcat5". This is correct, and is useful to the gentoo startup script that allows you to start and stop the tomcat5 service. However, as I said in my bug report, it does not set the environment variable CATALINA_HOME. It would be nice to have this set in the /etc/env.d/21tomcat file because then you could do something like this in your build.xml file: <property environment="env"/> <property name="tomcat.home" value="${env.CATALINA_HOME}"/> <path id="tomcat.classpath"> <pathelement location="${tomcat.home}/server/lib/catalina-ant.jar"/> </path> <taskdef name="list" classname="org.apache.catalina.ant.ListTask" classpathref="tomcat.classpath"/> <target name="list"> <list url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}"/> </target> Which would list all the installed web applications (running or otherwise).
i'm now going to maintain tomcat. starting from tomorrow i'll start to work on this
Thank you, this issue should be pretty easy to fix. I simply created the file /etc/env.d/21tomcat with the following line: CATALINA_HOME=/opt/tomcat5 I don't know what happens if you try to install multiple versions of tomcat on the same machine, e.g., tomcat-5.0.27 and tomcat-5.5.
ok, added an env.d file for this version. it will be added to newer version as well as soon as they're ready. thanks for your report.
I just went to upgrade my install of tomcat to 5.0.27-r4 and ran into a little problem. It looks like the permissions are incorrectly set: -rwxr-x--- 1 root root 27 Apr 13 12:34 21tomcat it should be: -rw-r--r-- 1 root root 27 Apr 13 12:34 21tomcat
now the old ebuild also makes use of newenvd.