Summary: | Using Manager ant tasks is messy | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Daniel Santos <daniel.santos> |
Component: | Webapps:Manager | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | Nightly Build | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
jakarta-tomcat-catalina/webapps/docs/manager-howto.xml from 20050406 nightly
jakarta-tomcat-catalina/catalina/src/bin/catalina-tasks.xml proposed new file jakarta-tomcat-catalina/catalina/src/bin/catalina-tasks.xml proposed new file |
Description
Daniel Santos
2005-04-07 23:17:18 UTC
Created attachment 14656 [details]
jakarta-tomcat-catalina/webapps/docs/manager-howto.xml from 20050406 nightly
Removed instructions to copy catalina-ant.jar to the $ANT_HOME/lib.
Removed code that declares Tomcat taskdefs in example build.xml.
Added import of $CATALINA_HOME/bin/catalina-tasks.xml to top of example
build.xml to replace taskdefs that were removed.
Created attachment 14657 [details]
jakarta-tomcat-catalina/catalina/src/bin/catalina-tasks.xml proposed new file
ant build script for importing to simplify taskdefs and class location
Hey, wonderfull shortcut! I see at weekend to commit it and update doc Thanks Peter PS: I have test it and currently a shorter classpath is enough :-) <project name="Catalina Ant Tasks"> <!-- set catalina.home if it's not already set --> <dirname property="catalina.home.bin.dir" file="${ant.file.imported}"/> <property name="catalina.home" value="${catalina.home.bin.dir}/.."/> <taskdef resource="org/apache/catalina/ant/catalina.tasks"> <classpath> <fileset dir="${catalina.home}/server/lib"> <include name="catalina-ant.jar"/> </fileset> </classpath> </taskdef> </project> > PS: I have test it and currently a shorter classpath is enough :-)
hmm. You might want to check your CLASSPATH, $ANT_HOME/lib and ANT_ARGS (for
-lib statments) maybe. When I ran it, it needed classes for JspC. Oh wait, I
may have run it against 5.0.28 however. That would be awsome if that's all it
needed! :)
if that's the case in the nightly then we should be able to get away with:
<project name="Catalina Ant Tasks">
<!-- set catalina.home if it's not already set -->
<dirname property="catalina.home.bin.dir" file="${ant.file.imported}"/>
<property name="catalina.home" value="${catalina.home.bin.dir}/.."/>
<taskdef resource="org/apache/catalina/ant/catalina.tasks"
classpath=${catalina.home}/server/lib/catalina-ant.jar"/>
</project>
Even if not, we can cause it to have a faster load by isolating the jars that it
really needs (catalina-ant.jar plus the ones for JspC). I'll have to
experiement with this more after I have slept.
Thanks!
Daniel
Peter, or whoever commits this: *if* this patch requires a specific version of Ant, e.g 1.6 or later, please make sure to note that as well in the docs. (In reply to comment #5) > Peter, or whoever commits this: *if* this patch requires a specific version of > Ant, e.g 1.6 or later, please make sure to note that as well in the docs. yea, I was just thinking that. We should do some testing on older versions of ant and make sure it works there as well. If not document the latest required version. Yes, I document this only for version > 1.6 and I thing that new ant import method is a real nice addon :-) Before we commit this, let's refine the dependencies. I was really busy this weekend and didn't get a chance to do it but I will have the chance tonight. When you get back to this, feel free to reopen/resolve the item. Created attachment 15341 [details]
jakarta-tomcat-catalina/catalina/src/bin/catalina-tasks.xml proposed new file
Updated to only import the jar files that are used.
Sorry I took so long on this. I got the dependencies isolated down to these 5 jars: bin/commons-logging-api.jar common/lib/jasper-compiler.jar common/lib/jasper-runtime.jar common/lib/servlet-api.jar server/lib/catalina-ant.jar The documentation diff is still good since it hasn't changed since Mon Jan 31 12:16:57 2005 UTC (4 months ago). Works great and uses the same jar files on both 5.0 and 5.5 builds. I think it's ready to go! :) Daniel This was applied by Peter Rossbach on June 24th, so I'm closing this issue ;) |