avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/installer Installer.java
Date Wed, 15 May 2002 10:54:49 GMT
donaldp     02/05/15 03:54:49

  Modified:    src/java/org/apache/avalon/phoenix/components/deployer
                        DefaultDeployer.java
               src/java/org/apache/avalon/phoenix/components/deployer/installer
                        Installer.java
  Log:
  Update to use name to deploy application rather than filename of .sar file.
  
  Revision  Changes    Path
  1.30      +11 -2     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- DefaultDeployer.java	15 May 2002 09:34:36 -0000	1.29
  +++ DefaultDeployer.java	15 May 2002 10:54:49 -0000	1.30
  @@ -221,12 +221,21 @@
       public void deploy( final String name, final String sarURL )
           throws DeploymentException
       {
  +        System.out.println( "DefaultDeployer.deploy(" + name + "," + sarURL + ")" );
           try
           {
  -            deploy( name, new URL( sarURL ) );
  +            try
  +            {
  +                deploy( name, new URL( sarURL ) );
  +            }
  +            catch( DeploymentException e )
  +            {
  +                e.printStackTrace();
  +            }
           }
           catch( MalformedURLException mue )
           {
  +            mue.printStackTrace();
               throw new DeploymentException( mue.getMessage(), mue );
           }
       }
  @@ -252,7 +261,7 @@
           {
               //m_baseWorkDirectory
               final Installation installation =
  -                m_installer.install( location );
  +                m_installer.install( name, location );
   
               final Configuration config = getConfigurationFor( installation.getConfig()
);
               final Configuration environment = getConfigurationFor( installation.getEnvironment()
);
  
  
  
  1.4       +9 -10     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/installer/Installer.java
  
  Index: Installer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/installer/Installer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Installer.java	15 May 2002 09:34:36 -0000	1.3
  +++ Installer.java	15 May 2002 10:54:49 -0000	1.4
  @@ -34,7 +34,7 @@
    * and installing it as appropriate.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/05/15 09:34:36 $
  + * @version $Revision: 1.4 $ $Date: 2002/05/15 10:54:49 $
    */
   public class Installer
       extends AbstractLogEnabled
  @@ -158,7 +158,7 @@
        * @param url the url of instalation
        * @throws InstallationException if an error occurs
        */
  -    public Installation install( final URL url )
  +    public Installation install( final String name, final URL url )
           throws InstallationException
       {
           lock();
  @@ -189,7 +189,7 @@
               }
               else
               {
  -                return install( url, file, zipFile, m_baseWorkDirectory );
  +                return install( name, url, file, zipFile );
               }
           }
           catch( final IOException ioe )
  @@ -301,17 +301,16 @@
        * @param url the url designator of sar
        * @param file the file of sar
        * @param zipFile the ZipFile representing sar
  -     * @param baseWorkDir the base directory in which to extract jars,
  -     *        libraries and other temporary files.
        * @return the Installation object
        */
  -    private Installation install( final URL url,
  +    private Installation install( final String name,
  +                                  final URL url,
                                     final File file,
  -                                  final ZipFile zipFile,
  -                                  final File baseWorkDir )
  +                                  final ZipFile zipFile )
           throws InstallationException
       {
  -        final File directory = getDestinationFor( file );
  +        final File directory =
  +            new File( m_baseDirectory, name ).getAbsoluteFile();
   
           //Question: Should we be making sure that
           //this directory is created?
  @@ -321,7 +320,7 @@
           final ArrayList jars = new ArrayList();
   
           final File workDir =
  -            getRelativeWorkDir( baseWorkDir, file );
  +            getRelativeWorkDir( m_baseWorkDirectory, file );
   
           expandZipFile( zipFile, directory, workDir, jars, digests, url );
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message