You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by cm...@apache.org on 2003/05/16 15:14:55 UTC

cvs commit: jakarta-cactus/integration/ant/src/confs/j2ee13/jboss3x jboss-web.xml roles.properties users.properties

cmlenz      2003/05/16 06:14:55

  Modified:    integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss
                        JBoss3xContainer.java
  Removed:     integration/ant/src/confs/j2ee13/jboss3x jboss-web.xml
                        roles.properties users.properties
  Log:
  The JBoss container impl no longer repackages the user-supplied WAR file, adding the JBoss specific files
  This is now the responsibility of the user
  
  Revision  Changes    Path
  1.4       +7 -44     jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java
  
  Index: JBoss3xContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JBoss3xContainer.java	13 May 2003 12:39:08 -0000	1.3
  +++ JBoss3xContainer.java	16 May 2003 13:14:55 -0000	1.4
  @@ -64,14 +64,10 @@
   import java.util.jar.Manifest;
   
   import org.apache.cactus.integration.ant.container.AbstractJavaContainer;
  -import org.apache.cactus.integration.ant.util.ResourceUtils;
   import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.taskdefs.Jar;
   import org.apache.tools.ant.taskdefs.Java;
  -import org.apache.tools.ant.types.FileSet;
  -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 JBoss application server.
  @@ -96,11 +92,6 @@
       private String config = "default";
   
       /**
  -     * The temporary directory from which the container will be started.
  -     */
  -    private transient File tmpDir;
  -
  -    /**
        * The port to which the container should be bound.
        */
       private transient int port = 8080;
  @@ -268,45 +259,17 @@
        */
       private void prepare(String theDirName) throws IOException
       {
  -        FilterChain filterChain = createFilterChain();
  -
  -        this.tmpDir = createTempDirectory(theDirName);
  -
  -        File configDir = new File(this.dir, "server");
  +        FileUtils fileUtils = FileUtils.newFileUtils();
   
           // TODO: Find out how to create a valid default server configuration.
           // Copying the server directory does not seem to be enough
               
  -        // Extract the JBoss properties files
  -        File jbossWebXml = new File(this.tmpDir, "jboss-web.xml");
  -        ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + "jboss3x/jboss-web.xml",
  -            jbossWebXml, filterChain);
  -        File rolesProperties = new File(this.tmpDir, "roles.properties");
  -        ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + "jboss3x/roles.properties",
  -            rolesProperties, filterChain);
  -        File usersProperties = new File(this.tmpDir, "users.properties");
  -        ResourceUtils.copyResource(getProject(),
  -            RESOURCE_PATH + "jboss3x/users.properties",
  -            usersProperties, filterChain);
  -
           // deploy the web-app by copying the WAR file into the webapps
           // directory
  -        // TODO: manipulation of the WAR should really be left to the user
  -        Jar jar = (Jar) createAntTask("jar");
  -        jar.setDestFile(new File(configDir,
  -            this.config + "/deploy/" + getDeployableFile().getName()));
  -        ZipFileSet zip = new ZipFileSet();
  -        zip.setSrc(getDeployableFile());
  -        jar.addZipfileset(zip);
  -        FileSet fileSet = new FileSet();
  -        fileSet.setDir(this.tmpDir);
  -        fileSet.createInclude().setName(jbossWebXml.getName());
  -        fileSet.createInclude().setName(rolesProperties.getName());
  -        fileSet.createInclude().setName(usersProperties.getName());
  -        jar.addFileset(fileSet);
  -        jar.execute();
  +        File configDir = new File(this.dir, "server");
  +        File deployDir = new File(configDir, this.config + "/deploy");
  +        fileUtils.copyFile(getDeployableFile(),
  +            new File(deployDir, getDeployableFile().getName()), null, true);
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org