costin      01/02/02 21:19:46

  Modified:    src/share/org/apache/tomcat/modules/config AutoDeploy.java
  Log:
  Started work on 427 - if a war file is specified in server.xml in
  a different location than webapps, we should expand it.
  
  ( I'm not sure this is the right thing - IMHO the right thing would be to
  do a simple deploytool - even as a simple shell script or in ant - and
  do the deployment the right way. Auto-expanding war files was just a
  simple solution to the lack of a real deploy tool. )
  
  Revision  Changes    Path
  1.2       +16 -0     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoDeploy.java
  
  Index: AutoDeploy.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoDeploy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AutoDeploy.java   2001/02/02 04:49:44     1.1
  +++ AutoDeploy.java   2001/02/03 05:19:45     1.2
  @@ -124,6 +124,22 @@
        *  Find all wars, expand them, register dependency.
        */
       public void engineInit(ContextManager cm) throws TomcatException {
  +
  +     // For all contexts in <server.xml > or loaded by differen means,
  +     // check if the docBase ends with .war - and expand it if so,
  +     // after that replace the docBase with the dir. See bug 427.
  +     /* XXX not ready yet.
  +     Enumeration loadedCtx=cm.getContexts();
  +     while( loadedCtx.hasMoreElements() ) {
  +         Context ctx=(Context)loadedCtx.nextElement();
  +         String docBase=ctx.getDocBase();
  +         if( docBase.endsWith( ".war" ) ) {
  +             expandWar( ctx, docBase);
  +         }
  +     }
  +     */
  +     
  +     // expand all the wars from srcDir ( webapps/*.war ).
        String home=cm.getHome();
   
        File webappS;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to