vmassol     2003/09/13 03:05:46

  Modified:    
integration/ant/src/java/org/apache/cactus/integration/ant/container/orion
                        AbstractOrionContainer.java
  Added:       integration/ant/src/confs/share/orion2x/share principals.xml
                        web.xml mime.types rmi.xml
                        global-web-application.xml
               integration/ant/src/confs/share/orion2x/war server.xml
                        default-web-site.xml application.xml
               integration/ant/src/confs/share/orion2x/ear application.xml
                        default-web-site.xml server.xml
  Removed:     integration/ant/src/confs/share/orion2x rmi.xml
                        application.xml principals.xml server.xml
                        default-web-site.xml global-web-application.xml
                        mime.types
  Log:
  Added support for both WAR and EAR deployments in Orion. We need different configs 
in Orion. I wasn't able to find a common working config...
  
  Revision  Changes    Path
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/share/principals.xml
  
  Index: principals.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE principals PUBLIC "//Evermind - Orion Principals//" 
"http://www.orionserver.com/dtds/principals.dtd";>
  
  <principals>
        <groups>
                <group name="administrators">
                        <description>administrators</description>
                        <permission name="administration" />
                        <permission 
name="com.evermind.server.AdministrationPermission" />
                </group>
                <group name="guests">
                        <description>guests</description>
                </group>
                <group name="users">
                        <description>users</description>
                        <permission name="rmi:login" />
                        <permission name="com.evermind.server.rmi.RMIPermission" />
                </group>
        </groups>
        <users>
                <user username="admin" password="password" deactivated="false">
                        <description>The default administrator</description>
                        <group-membership group="administrators" />
                        <group-membership group="guests" />
                        <group-membership group="users" />
                </user>
          <user username="testuser" password="testpassword" deactivated="false">
              <description>Cactus Test User</description>
          </user>
        </users>
  </principals>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/share/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <web-app>
  </web-app>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/share/mime.types
  
  Index: mime.types
  ===================================================================
  # Registered mime-types
  
  application/activemessage
  application/andrew-inset
  application/applefile
  application/atomicmail
  application/dca-rft
  application/dec-dx
  application/mac-binhex40      hqx
  application/mac-compactpro    cpt
  application/macwriteii
  application/msword            doc
  application/news-message-id
  application/news-transmission
  application/octet-stream      bin dms lha lzh exe class
  application/jsp                       jsp
  application/oda                       oda
  application/pdf                       pdf
  application/postscript                ai eps ps
  application/powerpoint                ppt
  application/remote-printing
  application/rtf                       rtf
  application/slate
  application/wita
  application/wordperfect5.1
  application/x-bcpio           bcpio
  application/x-cdlink          vcd
  application/x-compress                Z
  application/x-cpio            cpio
  application/x-csh                     csh
  application/x-director                dcr dir dxr
  application/x-dvi                     dvi
  application/x-gtar            gtar
  application/x-gzip            gz
  application/x-hdf                     hdf
  application/x-httpd-cgi               cgi
  application/x-java-jnlp-file  jnlp
  application/x-koan            skp skd skt skm
  application/x-latex           latex
  application/x-mif                     mif
  application/x-netcdf          nc cdf
  application/x-sh                      sh
  application/x-shar            shar
  application/x-stuffit         sit
  application/x-sv4cpio         sv4cpio
  application/x-sv4crc          sv4crc
  application/x-tar                     tar
  application/x-tcl                     tcl
  application/x-tex                     tex
  application/x-texinfo         texinfo texi
  application/x-troff           t tr roff
  application/x-troff-man               man
  application/x-troff-me                me
  application/x-troff-ms                ms
  application/x-ustar           ustar
  application/x-wais-source     src
  text/xml                      xml ent cat sty
  text/dtd                              dtd
  text/xsl                              xsl
  application/jsp                       jsp
  application/zip                       zip
  audio/basic                           au snd
  audio/mpeg                            mpga mp2
  audio/x-aiff                  aif aiff aifc
  audio/x-pn-realaudio          ram
  audio/x-pn-realaudio-plugin   rpm
  audio/x-realaudio                     ra
  audio/x-wav                           wav
  chemical/x-pdb                        pdb xyz
  image/gif                             gif
  image/ief                             ief
  image/jpeg                            jpeg jpg jpe
  image/png                             png
  image/tiff                            tiff tif
  image/x-cmu-raster            ras
  image/x-portable-anymap               pnm
  image/x-portable-bitmap               pbm
  image/x-portable-graymap      pgm
  image/x-portable-pixmap               ppm
  image/x-rgb                           rgb
  image/x-xbitmap                       xbm
  image/x-xpixmap                       xpm
  image/x-xwindowdump           xwd
  message/external-body
  message/news
  message/partial
  message/rfc822
  multipart/alternative
  multipart/appledouble
  multipart/digest
  multipart/mixed
  multipart/parallel
  text/html                             html htm
  text/plain                            txt
  text/richtext                 rtx
  text/tab-separated-values     tsv
  text/x-setext                 etx
  text/x-sgml                           sgml sgm
  video/mpeg                            mpeg mpg mpe
  video/quicktime                       qt mov
  video/x-msvideo                       avi
  video/x-sgi-movie                     movie
  x-conference/x-cooltalk               ice
  x-world/x-vrml                        wrl vrml
  text/vnd.wap.wml                wml
  application/vnd.wap.wmlc        wmlc
  text/vnd.wap.wmlscript          wmls
  application/vnd.wap.wmlscriptc  wmlsc
  image/vnd.wap.wbmp              wbmp
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/share/rmi.xml
  
  Index: rmi.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE rmi-server PUBLIC "Orion RMI-server" 
"http://www.orionserver.com/dtds/rmi-server.dtd";>
  
  <rmi-server port="23791">     
  </rmi-server>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/share/global-web-application.xml
  
  Index: global-web-application.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE orion-web-app PUBLIC '//Evermind//Orion web-application' 
'http://www.orionserver.com/dtds/orion-web.dtd'>
  
  <!-- Set development="true" to enabvle development, enable this if you
  want to debug JSP sources etc -->
  
  <orion-web-app
        jsp-cache-directory="./persistence"
        servlet-webdir="/servlet"
        development="false"
        persistence-path="./persistence/state.ser"
  >
  
        <!-- The mime-mappings for this server -->
        <mime-mappings path="./mime.types" />
        <servlet-chaining servlet-name="xsl" mime-type="text/xml" />
  
        <web-app>
                <servlet>
                        <servlet-name>xsl</servlet-name>
                        <servlet-class>com.evermind.servlet.XSLServlet</servlet-class>
                        <init-param>
                                <param-name>defaultContentType</param-name>
                                <param-value>text/html</param-value>
                        </init-param>
                </servlet>
        
                <servlet>
                        <servlet-name>jsp</servlet-name>
                        
<servlet-class>com.evermind.server.http.JSPServlet</servlet-class>
                </servlet>
  
                <servlet>
                        <servlet-name>ssi</servlet-name>
                        
<servlet-class>com.evermind.server.http.SSIServlet</servlet-class>
                </servlet>
  
                <servlet>
                        <servlet-name>cgi</servlet-name>
                        
<servlet-class>com.evermind.server.http.CGIServlet</servlet-class>
                </servlet>
  
                <servlet>
                        <servlet-name>perl</servlet-name>
                        
<servlet-class>com.evermind.server.http.CGIServlet</servlet-class>
                        <init-param>
                                <param-name>interpreter</param-name>
                                <param-value>perl</param-value>
                        </init-param>
                </servlet>
  
                <servlet>
                        <servlet-name>php</servlet-name>
                        
<servlet-class>com.evermind.server.http.CGIServlet</servlet-class>
                        <init-param>
                        <param-name>interpreter</param-name>
                                <param-value>php</param-value>
                        </init-param>
                </servlet>
                <servlet-mapping>
                        <servlet-name>jsp</servlet-name>
                        <url-pattern>/*.jsp</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>cgi</servlet-name>
                        <url-pattern>/*.cgi</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>perl</servlet-name>
                        <url-pattern>/*.pl</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>php</servlet-name>
                        <url-pattern>/*.php</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>php</servlet-name>
                        <url-pattern>/*.php3</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>php</servlet-name>
                        <url-pattern>/*.phtml</url-pattern>
                </servlet-mapping>
  
                <servlet-mapping>
                        <servlet-name>ssi</servlet-name>
                        <url-pattern>/*.shtml</url-pattern>
                </servlet-mapping>
                <welcome-file-list>
                        <welcome-file>index.html</welcome-file>
                        <welcome-file>default.jsp</welcome-file>
                </welcome-file-list>
        </web-app>
  </orion-web-app>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/war/server.xml
  
  Index: server.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE application-server PUBLIC "Orion Application Server Config" 
"http://www.orionserver.com/dtds/application-server.dtd";>
  
  <application-server
        application-directory="../applications"
        deployment-directory="../application-deployments">
  
        <rmi-config path="./rmi.xml"/>
        <log>
                <file path="../log/server.log"/>
        </log>
  
      <global-application name="default" path="./application.xml"/>
        <global-web-app-config path="./global-web-application.xml"/>
      <web-site path="./default-web-site.xml"/>
  
  </application-server>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/war/default-web-site.xml
  
  Index: default-web-site.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE web-site PUBLIC "Orion Web-site" 
"http://www.orionserver.com/dtds/web-site.dtd";>
  
  <web-site host="[ALL]" port="@cactus.port@" display-name="Default Orion WebSite">
  
      <!-- The default web-app for this site, bound to the root -->
      <default-web-app application="default" name="defaultWebApp"/>
  
      <!-- The Cactus test webapp -->
      <web-app application="default" name="test" root="[EMAIL PROTECTED]@"/>
  
  </web-site>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/war/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 
1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd";>
  
  <orion-application>
  
      <web-module id="defaultWebApp" path="../default-web-app"/>
      <web-module id="test" path="../applications/@[EMAIL PROTECTED]"/>
  
        <persistence path="../persistence"/>
        
        <principals path="./principals.xml"/>
  
        <log>
                <file path="../log/global-application.log"/>
        </log>
  
      <!-- TODO: Remove security stuff from the default configuration. This must
           be provided by the Sample Servlet project -->
  
      <security-role-mapping name="test">
          <user name="testuser"/>
      </security-role-mapping>
  
        <namespace-access>
                <read-access>
                        <namespace-resource root="">
                                <security-role-mapping>
                                        <group name="administrators" />
                                </security-role-mapping>
                        </namespace-resource>
                </read-access>
                <write-access>
                        <namespace-resource root="">
                                <security-role-mapping>
                                        <group name="administrators" />
                                </security-role-mapping>
                        </namespace-resource>
                </write-access>
        </namespace-access>
  
  </orion-application>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/ear/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 
1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd";>
  
  <orion-application>
  
      <web-module id="defaultWebApp" path="../default-web-app"/>
  
        <persistence path="../persistence"/>
        
        <principals path="./principals.xml"/>
  
        <log>
                <file path="../log/global-application.log"/>
        </log>
  
  </orion-application>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/ear/default-web-site.xml
  
  Index: default-web-site.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE web-site PUBLIC "Orion Web-site" 
"http://www.orionserver.com/dtds/web-site.dtd";>
  
  <web-site host="[ALL]" port="@cactus.port@" display-name="Default Orion WebSite">
  
      <!-- The default web-app for this site, bound to the root -->
      <default-web-app application="default" name="defaultWebApp"/>
  
  </web-site>
  
  
  
  1.1                  
jakarta-cactus/integration/ant/src/confs/share/orion2x/ear/server.xml
  
  Index: server.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE application-server PUBLIC "Orion Application Server Config" 
"http://www.orionserver.com/dtds/application-server.dtd";>
  
  <application-server
        application-auto-deploy-directory="../applications"
        deployment-directory="../application-deployments">
  
        <rmi-config path="./rmi.xml"/>
        <log>
                <file path="../log/server.log"/>
        </log>
  
      <global-application name="default" path="./application.xml"/>
        <global-web-app-config path="./global-web-application.xml"/>
      <web-site path="./default-web-site.xml"/>
  
  </application-server>
  
  
  
  1.6       +44 -12    
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/orion/AbstractOrionContainer.java
  
  Index: AbstractOrionContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/orion/AbstractOrionContainer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractOrionContainer.java       7 Sep 2003 19:54:37 -0000       1.5
  +++ AbstractOrionContainer.java       13 Sep 2003 10:05:46 -0000      1.6
  @@ -221,36 +221,68 @@
               this.tmpDir = createTempDirectory(theDirName);
           }
   
  -        // copy configuration files into the temporary container directory
  +        // Copy configuration files into the temporary container directory
  +
           File confDir = createDirectory(tmpDir, "conf");
  +
  +        // Configuration files are not the same whether we deploy a 
  +        // WAR or an EAR
  +        String sharePath = RESOURCE_PATH + theResourcePrefix + "/share";
  +        String specificPath;
  +        if (getDeployableFile().isWar())
  +        {
  +            specificPath = RESOURCE_PATH + theResourcePrefix + "/war";
  +        }
  +        else
  +        {
  +            specificPath = RESOURCE_PATH + theResourcePrefix + "/ear";
  +        }
  +
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/application.xml",
  +            specificPath + "/server.xml",
  +            new File(confDir, "server.xml"), filterChain);
  +        ResourceUtils.copyResource(getProject(), 
  +            specificPath + "/application.xml",
               new File(confDir, "application.xml"), filterChain);
           ResourceUtils.copyResource(getProject(), 
  -            RESOURCE_PATH + theResourcePrefix + "/default-web-site.xml",
  +            specificPath + "/default-web-site.xml",
               new File(confDir, "default-web-site.xml"), filterChain);
  +
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/global-web-application.xml",
  +            sharePath + "/global-web-application.xml",
               new File(confDir, "global-web-application.xml"), filterChain);
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/mime.types",
  +            sharePath + "/mime.types",
               new File(confDir, "mime.types"), filterChain);
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/principals.xml",
  +            sharePath + "/principals.xml",
               new File(confDir, "principals.xml"), filterChain);
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/rmi.xml",
  +            sharePath + "/rmi.xml",
               new File(confDir, "rmi.xml"), filterChain);
  +
  +        // Create default web app (required by Orion unfortunately...)
  +        File defaultWebAppDir = createDirectory(tmpDir, 
  +            "default-web-app/WEB-INF");
           ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + theResourcePrefix + "/server.xml",
  -            new File(confDir, "server.xml"), filterChain);
  +            sharePath + "/web.xml",
  +            new File(defaultWebAppDir, "web.xml"), filterChain);       
           
           // Orion need to have a /persistence directory created, otherwise it
           // throws an error
           createDirectory(tmpDir, "persistence");
  -        
  +
  +        // Directory where modules to be deployed are located
  +        File appDir = createDirectory(tmpDir, "applications");
  +
  +        // Deployment directory (i.e. where Orion expands modules)
  +        createDirectory(tmpDir, "application-deployments");
  +
  +        // Orion log directory
  +        createDirectory(tmpDir, "log");
  +               
           fileUtils.copyFile(getDeployableFile().getFile(),
  -            new File(tmpDir, getDeployableFile().getFile().getName()), 
  +            new File(appDir, getDeployableFile().getFile().getName()), 
               null, true);
       }
   
  
  
  

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

Reply via email to