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/14 15:13:05 UTC

cvs commit: jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment EarArchive.java WarArchive.java

cmlenz      2003/05/14 06:13:05

  Modified:    integration/ant/src/java/org/apache/cactus/integration/ant/deployment
                        EarArchive.java WarArchive.java
  Log:
  Use the new getResource() method
  
  Revision  Changes    Path
  1.2       +8 -11     jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/EarArchive.java
  
  Index: EarArchive.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/EarArchive.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EarArchive.java	14 May 2003 12:23:11 -0000	1.1
  +++ EarArchive.java	14 May 2003 13:13:04 -0000	1.2
  @@ -59,11 +59,9 @@
   import java.io.File;
   import java.io.IOException;
   import java.io.InputStream;
  -import java.util.jar.JarInputStream;
   
   import javax.xml.parsers.ParserConfigurationException;
   
  -import org.apache.cactus.integration.ant.util.ResourceUtils;
   import org.xml.sax.SAXException;
   
   /**
  @@ -129,12 +127,12 @@
       {
           if (this.applicationXml == null)
           {
  -            JarInputStream in = null;
  +            InputStream in = null;
               try
               {
  -                in = getContentAsStream();
  +                in = getResource("META-INF/application.xml");
                   this.applicationXml =
  -                    ApplicationXmlIo.parseApplicationXmlFromEar(in, null);
  +                    ApplicationXmlIo.parseApplicationXml(in, null);
               }
               finally
               {
  @@ -158,11 +156,10 @@
       public WarArchive getWebModule(String theUri)
           throws IOException
       {
  -        JarInputStream in = null;
  +        InputStream war = null;
           try
           {
  -            in = getContentAsStream();
  -            InputStream war = ResourceUtils.getResource(in, theUri);
  +            getResource(theUri);
               if (war != null)
               {
                   return new WarArchive(war);
  @@ -170,9 +167,9 @@
           }
           finally
           {
  -            if (in != null)
  +            if (war != null)
               {
  -                in.close();
  +                war.close();
               }
           }
           return null;
  
  
  
  1.2       +4 -5      jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/WarArchive.java
  
  Index: WarArchive.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/deployment/WarArchive.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarArchive.java	14 May 2003 12:23:11 -0000	1.1
  +++ WarArchive.java	14 May 2003 13:13:04 -0000	1.2
  @@ -59,7 +59,6 @@
   import java.io.File;
   import java.io.IOException;
   import java.io.InputStream;
  -import java.util.jar.JarInputStream;
   
   import javax.xml.parsers.ParserConfigurationException;
   
  @@ -127,11 +126,11 @@
       {
           if (this.webXml == null)
           {
  -            JarInputStream in = null;
  +            InputStream in = null;
               try
               {
  -                in = getContentAsStream();
  -                this.webXml = WebXmlIo.parseWebXmlFromWar(in, null);
  +                in = getResource("WEB-INF/web.xml");
  +                this.webXml = WebXmlIo.parseWebXml(in, null);
               }
               finally
               {
  
  
  

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