vmassol     2003/12/30 01:03:53

  Modified:    documentation/docs/xdocs/integration/ant task_cactus.xml
               
integration/ant/src/java/org/apache/cactus/integration/ant/container/weblogic
                        WebLogic7xContainer.java
               documentation/docs/xdocs changes.xml
  Log:
  In the Ant integration module, added new <code>configXml</code> attribute to the 
<code>&lt;weblogic7x&gt;</code> container element of the <code>&lt;cactus&gt;</code> 
task.
  
  Revision  Changes    Path
  1.15      +29 -0     
jakarta-cactus/documentation/docs/xdocs/integration/ant/task_cactus.xml
  
  Index: task_cactus.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/documentation/docs/xdocs/integration/ant/task_cactus.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- task_cactus.xml   23 Nov 2003 16:47:09 -0000      1.14
  +++ task_cactus.xml   30 Dec 2003 09:03:52 -0000      1.15
  @@ -22,6 +22,27 @@
       </p>
   
       <p>
  +      Here are the different steps peformed automatically by the 
  +      <code>cactus</code> task:
  +    </p>
  +    <ol>
  +      <li>
  +        Deploy the cactified WAR/EAR into the target container,
  +      </li>
  +      <li>
  +        If the container is not already started, start it. Otherwise, leave
  +        it running,
  +      </li>
  +      <li>
  +        Run the Cactus tests,
  +      </li>
  +      <li>
  +        If the container was started by the <code>cactus</code> task the
  +        stop it. Otherwise, leave it running.
  +      </li>
  +    </ol>
  +
  +    <p>
         Currently the following containers are supported out of the box:
         <ul>
           <li>Apache Tomcat 3.x</li>
  @@ -1025,6 +1046,14 @@
                   you have put your bea home directory somewhere else.
                 </td>
                 <td>No, defaults to the parent directory of dir</td>
  +            </tr>
  +            <tr>
  +              <td>configXml</td>
  +              <td>
  +                The Weblogic <code>config.xml</code> configuration file to use 
  +                instead of the default one.
  +              </td>
  +              <td>No</td>
               </tr>
               <tr>
                 <td>port</td>
  
  
  
  1.11      +42 -5     
jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/weblogic/WebLogic7xContainer.java
  
  Index: WebLogic7xContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/weblogic/WebLogic7xContainer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebLogic7xContainer.java  7 Sep 2003 19:54:37 -0000       1.10
  +++ WebLogic7xContainer.java  30 Dec 2003 09:03:52 -0000      1.11
  @@ -67,6 +67,7 @@
   import org.apache.tools.ant.types.FilterChain;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.ZipFileSet;
  +import org.apache.tools.ant.util.FileUtils;
   
   /**
    * Special container support for the Bea WebLogic 7.x application server.
  @@ -100,6 +101,13 @@
       private int port = 8080;
   
       /**
  +     * A user-specific <code>config.xml</code> WebLogic configuration file. 
  +     * If this variable is not set, the default configuration file from the 
  +     * JAR resources will be used.
  +     */
  +    private File configXml;
  +    
  +    /**
        * The temporary directory from which the container will be started.
        */
       private File tmpDir;
  @@ -137,6 +145,17 @@
       }
   
       /**
  +     * Sets the configuration file to use for the test installation of 
  +     * WebLogic.
  +     * 
  +     * @param theConfigXml The custom <code>config.xml</code> file
  +     */
  +    public final void setConfigXml(File theConfigXml)
  +    {
  +        this.configXml = theConfigXml;
  +    }
  +    
  +    /**
        * Sets the temporary installation directory.
        * 
        * @param theTmpDir The temporary directory to set
  @@ -212,6 +231,13 @@
                   createSysProperty("weblogic.management.username", "weblogic"));
               java.addSysproperty(
                   createSysProperty("weblogic.management.password", "weblogic"));
  +
  +            // Note: The "=" in the call below is on purpose. It is left so that
  +            // we end up with: 
  +            //   -Djava.security.policy==./server/lib/weblogic.policy
  +            // (otherwise, we would end up with:
  +            //   -Djava.security.policy=./server/lib/weblogic.policy, which
  +            //  will not add to the security policy but instead replace it).
               java.addSysproperty(
                   createSysProperty("java.security.policy",
                       "=./server/lib/weblogic.policy"));
  @@ -270,6 +296,7 @@
        */
       private void prepare(String theDirName) throws IOException
       {
  +        FileUtils fileUtils = FileUtils.newFileUtils();
           FilterChain filterChain = createFilterChain();
           
           if (this.tmpDir == null)
  @@ -278,10 +305,20 @@
           }
   
           File testDomainDir = createDirectory(this.tmpDir, "testdomain");
  -        ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + "weblogic7x/config.xml",
  -            new File(testDomainDir, "config.xml"),
  -            filterChain);
  +
  +        if (this.configXml != null)
  +        {
  +            fileUtils.copyFile(this.configXml,
  +                new File(testDomainDir, "config.xml"));
  +        }
  +        else
  +        {
  +            ResourceUtils.copyResource(getProject(),
  +                RESOURCE_PATH + "weblogic7x/config.xml",
  +                new File(testDomainDir, "config.xml"),
  +                filterChain);
  +        }
  +        
           ResourceUtils.copyResource(getProject(),
               RESOURCE_PATH + "weblogic7x/DefaultAuthenticatorInit.ldift",
               new File(testDomainDir, "DefaultAuthenticatorInit.ldift"),
  
  
  
  1.148     +5 -0      jakarta-cactus/documentation/docs/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- changes.xml       7 Dec 2003 09:46:54 -0000       1.147
  +++ changes.xml       30 Dec 2003 09:03:53 -0000      1.148
  @@ -68,6 +68,11 @@
         </devs>
   
         <release version="1.6dev" date="in CVS">
  +        <action dev="VMA" type="add" fixes-bug="23016">
  +          In the Ant integration module, added new <code>configXml</code> 
  +          attribute to the <code>&lt;weblogic7x&gt;</code> container 
  +          element of the <code>&lt;cactus&gt;</code> task.
  +        </action>
           <action dev="VMA" type="fix" due-to="Joe Germuska" due-to-email="[EMAIL 
PROTECTED]">
             Make the <code>&lt;cactus&gt;</code> task work on Mac OSX by not 
             including the <code>tools.jar</code> file (on Max OSX all classes
  
  
  

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

Reply via email to