avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components ContainerConstants.java
Date Wed, 27 Nov 2002 07:03:54 GMT
hammant     2002/11/26 23:03:53

  Modified:    .        build.xml
               src/java/org/apache/avalon/phoenix/components/embeddor
                        DefaultEmbeddor.java
               src/java/org/apache/avalon/phoenix/frontends CLIMain.java
  Added:       src/java/org/apache/avalon/phoenix/components
                        ContainerConstants.java
  Log:
  [patch] Use non-deprecated constants (From Peter Donald)
  
  Revision  Changes    Path
  1.190     +40 -30    jakarta-avalon-phoenix/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/build.xml,v
  retrieving revision 1.189
  retrieving revision 1.190
  diff -u -r1.189 -r1.190
  --- build.xml	18 Nov 2002 16:32:13 -0000	1.189
  +++ build.xml	27 Nov 2002 07:03:53 -0000	1.190
  @@ -13,7 +13,7 @@
    Peter Donald <peter at apache.org>
    Leo Simons <mail at leosimons.com>
    Nicola Ken Barozzi <nicolaken at apache.org>
  - 
  +
   Legal:
     Copyright (c) 1999-2002 The Apache Software Foundation. All Rights Reserved.
   
  @@ -40,8 +40,8 @@
       <property name="build.lib" value="${build.dir}/lib"/>
       <property name="build.src" value="${build.dir}/src"/>
       <property name="build.classes" value="${build.dir}/classes"/>
  -    <property name="build.javadocs" value="${build.dir}/javadocs"/>    
  -    <property name="build.docs" value="${build.dir}/site"/>    
  +    <property name="build.javadocs" value="${build.dir}/javadocs"/>
  +    <property name="build.docs" value="${build.dir}/site"/>
       <property name="build.tests" value="${build.dir}/tests"/>
       <property name="build.testclasses" value="${build.dir}/testclasses"/>
       <property name="build.reports" value="${build.dir}/reports"/>
  @@ -50,7 +50,7 @@
   
       <!-- Set the properties for source directories -->
       <property name="src.dir" value="src"/>
  -    <property name="java.dir" value="${src.dir}/java"/>   
  +    <property name="java.dir" value="${src.dir}/java"/>
       <property name="documentation.dir" value="${src.dir}/documentation"/>
       <property name="test.dir" value="${src.dir}/test"/>
       <property name="compat.dir" value="${src.dir}/compat"/>
  @@ -59,7 +59,7 @@
       <property name="lib.dir" value="lib"/>
       <property name="tools.dir" value="../jakarta-avalon/tools"/>
       <property name="phoenix.tools.dir" value="tools"/>
  -    
  +
       <property name="dist.name" value="${name}-${version}"/>
       <property name="dist.base" value="distributions"/>
       <property name="bin.dist.dir" value="dist"/>
  @@ -67,19 +67,20 @@
       <property name="checkstyle.failOnError" value="false"/>
   
       <property name="constants.file" value="org/apache/avalon/phoenix/Constants.java"/>
  +    <property name="container.constants.file" value="org/apache/avalon/phoenix/components/ContainerConstants.java"/>
       <property name="xml-api.jar" value="${lib.dir}/xml-apis.jar"/>
       <property name="xerces.jar" value="${lib.dir}/xercesImpl-2.0.2.jar"/>
       <property name="xalan.jar" value="${lib.dir}/xalan-2.3.1.jar"/>
       <property name="framework.jar" value="${lib.dir}/avalon-framework.jar"/>
       <property name="logkit.jar" value="${lib.dir}/logkit-1.1.1.jar"/>
       <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
  -    
  +
       <property name="announce2txt" value="${phoenix.tools.dir}/announcement2txt.xsl"/>
  -    <property name="announce2header" value="${phoenix.tools.dir}/announcement2header.xsl"/>
   
  -    <property name="announce2readme" value="${phoenix.tools.dir}/announcement2readme.xsl"/>
   
  -    <property name="announce2site" value="${phoenix.tools.dir}/announcement2site.xsl"/>
   
  -    <property name="status2changes" value="${phoenix.tools.dir}/status2changes.xsl"/>
 
  -    
  +    <property name="announce2header" value="${phoenix.tools.dir}/announcement2header.xsl"/>
  +    <property name="announce2readme" value="${phoenix.tools.dir}/announcement2readme.xsl"/>
  +    <property name="announce2site" value="${phoenix.tools.dir}/announcement2site.xsl"/>
  +    <property name="status2changes" value="${phoenix.tools.dir}/status2changes.xsl"/>
  +
       <!-- Invoke 'ant get-mx4j' to get these -->
       <property name="mx4j.jar" value="mx4j/mx4j-1.1.1/lib/mx4j-jmx.jar"/>
       <property name="mx4j-tools.jar" value="mx4j/mx4j-1.1.1/lib/mx4j-tools.jar"/>
  @@ -202,9 +203,15 @@
               <fileset dir="${compat.dir}">
                   <include name="${constants.file}" />
               </fileset>
  +            <fileset dir="${java.dir}">
  +                <include name="${container.constants.file}"/>
  +            </fileset>
           </copy>
   
           <tstamp/>
  +        <replace file="${build.src}/${container.constants.file}" token="@@VERSION@@"
value="${version}"/>
  +        <replace file="${build.src}/${container.constants.file}" token="@@NAME@@" value="${Name}"/>
  +        <replace file="${build.src}/${container.constants.file}" token="@@DATE@@" value="${TODAY}"/>
           <replace file="${build.src}/${constants.file}" token="@@VERSION@@" value="${version}"/>
           <replace file="${build.src}/${constants.file}" token="@@NAME@@" value="${Name}"/>
           <replace file="${build.src}/${constants.file}" token="@@DATE@@" value="${TODAY}"/>
  @@ -226,6 +233,7 @@
               <src path="${build.src}" />
               <src path="${compat.dir}" />
               <exclude name="${constants.file}" />
  +            <exclude name="${container.constants.file}"/>
               <exclude name="org/apache/avalon/phoenix/frontends/PhoenixServlet.java"
unless="servlet.present"/>
               <exclude name="org/apache/avalon/phoenix/frontends/ComposableServlet.java"
unless="servlet.present"/>
               <exclude name="org/apache/avalon/phoenix/launcher/DaemonLauncher.java"
  @@ -383,11 +391,11 @@
           <jar jarfile="${build.lib}/phoenix-metagenerate.jar" basedir="${build.classes}">
               <include name="org/apache/avalon/phoenix/tools/metagenerate/**"/>
           </jar>
  -        
  +
           <jar jarfile="${build.lib}/phoenix-punit.jar" basedir="${build.classes}">
               <include name="org/apache/avalon/phoenix/tools/punit/**"/>
           </jar>
  -        
  +
   
       </target>
   
  @@ -577,11 +585,11 @@
           <mkdir dir="${bin.dist.javadocs}"/>
   
           <copy todir="${bin.dist.docs}">
  -            <fileset dir="${build.dir}/docs"/>
  +            <fileset dir="${build.docs}"/>
           </copy>
   
           <copy todir="${bin.dist.javadocs}">
  -            <fileset dir="${build.dir}/javadocs"/>
  +            <fileset dir="${build.javadocs}"/>
           </copy>
   
           <copy todir="${bin.dist.tools}">
  @@ -592,19 +600,19 @@
           </copy>
   
           <echo file="${bin.dist.tools}/readme.txt" append="false">
  -These are tools useful for build-time only. 
  +These are tools useful for build-time only.
   You can delete the tools/ dir for a runtime install of Phoenix.
   
   phoenix-metagenerate.jar needs to be used with qdox-1.0.jar
     See http://cvs.apache.org/viewcvs/jakarta-avalon-apps/demo/build.xml for usage
     See http://jakarta.apache.org/avalon/phoenix/mx/index.html for documentation
  -  
  +
   phoenix-punit.jar needs to be used with excalibur-containerkit-1.0.jar
  -  See http://cvs.apache.org/viewcvs/jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/punit/test/

  +  See http://cvs.apache.org/viewcvs/jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/tools/punit/test/
     for usage.
     See http://jakarta.apache.org/avalon/phoenix/punit/index.html for documentation
           </echo>
  -        
  +
           <filter token="version" value="${version}"/>
           <filter token="dist.name" value="${dist.name}"/>
           <copy todir="${bin.dist.dir}" filtering="on">
  @@ -662,11 +670,11 @@
           </copy>
   
           <copy todir="${src.dist.docs}">
  -            <fileset dir="${build.dir}/docs"/>
  +            <fileset dir="${build.docs}"/>
           </copy>
   
           <copy todir="${src.dist.javadocs}">
  -            <fileset dir="${build.dir}/javadocs"/>
  +            <fileset dir="${build.javadocs}"/>
           </copy>
   
           <filter token="version" value="${version}"/>
  @@ -702,13 +710,13 @@
           </antcall>
   
           <!-- Two readme files to ensure directories are untarred -->
  -        <echo file="${dist.name}/apps/readme.txt" append="false">
  +        <echo file="${dist.name}/apps/README.txt" append="false">
               Place SAR files in here for Phoenix to launch.
           </echo>
  -        <echo file="${dist.name}/ext/readme.txt" append="false">
  +        <echo file="${dist.name}/ext/README.txt" append="false">
               Place extension jars here.
           </echo>
  -        <echo file="${dist.name}/logs/readme.txt" append="false">
  +        <echo file="${dist.name}/logs/README.txt" append="false">
               The Phoenix Kernel Logs will be placed here.
           </echo>
   
  @@ -735,8 +743,6 @@
   
           <delete file="${dist.base}/${dist.name}-bin.tar"/>
   
  -
  -
           <delete dir="${dist.name}" />
   
           <antcall target="src-dist">
  @@ -795,8 +801,12 @@
       <!-- Cleans absolutely everything up -->
       <target name="distclean" depends="clean" description="cleans up all generated files
and directories">
           <delete dir="${dist.base}" />
  +        <delete>
  +            <fileset dir="." includes="jakarta-news.xml"/>
  +            <fileset dir="." includes="Announcement.txt"/>
  +        </delete>
       </target>
  -    
  +
   
     <!-- Create the API documentation -->
     <target name="javadocs">
  @@ -847,11 +857,11 @@
             </fileset>
           </copy>
   
  -        <style style="${status2changes}"  in="${build.dir}/status.xml" 
  +        <style style="${status2changes}"  in="${build.dir}/status.xml"
                                             out="${build.dir}/changes.xml"/>
  -        <style style="${announce2txt}"    in="${build.dir}/announcement.xml" 
  +        <style style="${announce2txt}"    in="${build.dir}/announcement.xml"
                                             out="Announcement.txt"/>
  -        <style style="${announce2header}" in="${build.dir}/announcement.xml"       
  
  +        <style style="${announce2header}" in="${build.dir}/announcement.xml"
                                             out="${dist.base}/HEADER.html"/>
           <style style="${announce2readme}" in="${build.dir}/announcement.xml"
                                             out="${dist.base}/README.html"/>
  
  
  
  1.82      +6 -6      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- DefaultEmbeddor.java	28 Oct 2002 07:13:47 -0000	1.81
  +++ DefaultEmbeddor.java	27 Nov 2002 07:03:53 -0000	1.82
  @@ -31,7 +31,7 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.phoenix.Constants;
  +import org.apache.avalon.phoenix.components.ContainerConstants;
   import org.apache.avalon.phoenix.interfaces.Deployer;
   import org.apache.avalon.phoenix.interfaces.Embeddor;
   import org.apache.avalon.phoenix.interfaces.EmbeddorMBean;
  @@ -239,7 +239,7 @@
               {
                   // wait() for shutdown() to take action...
                   if( m_shutdown
  -                    || (emptyKernel() && !m_persistent) )
  +                    || ( emptyKernel() && !m_persistent ) )
                   {
                       // The server will shut itself down when all applications are disposed.
                       if( emptyKernel() )
  @@ -261,7 +261,7 @@
           if( null != kernel )
           {
               final String[] names = kernel.getApplicationNames();
  -            return (0 == names.length);
  +            return ( 0 == names.length );
           }
           else
           {
  @@ -351,7 +351,7 @@
        */
       public String getName()
       {
  -        return Constants.SOFTWARE;
  +        return ContainerConstants.SOFTWARE;
       }
   
       /**
  @@ -393,7 +393,7 @@
        */
       public String getVersion()
       {
  -        return Constants.VERSION;
  +        return ContainerConstants.VERSION;
       }
   
       /**
  @@ -405,7 +405,7 @@
        */
       public String getBuild()
       {
  -        return "(" + Constants.DATE + ")";
  +        return "(" + ContainerConstants.DATE + ")";
       }
   
       //////////////////////
  
  
  
  1.45      +2 -2      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/frontends/CLIMain.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- CLIMain.java	15 Sep 2002 02:07:31 -0000	1.44
  +++ CLIMain.java	27 Nov 2002 07:03:53 -0000	1.45
  @@ -22,7 +22,7 @@
   import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.phoenix.Constants;
  +import org.apache.avalon.phoenix.components.ContainerConstants;
   import org.apache.avalon.phoenix.interfaces.Embeddor;
   import org.apache.log.Hierarchy;
   import org.apache.log.LogTarget;
  @@ -82,7 +82,7 @@
               }
   
               System.out.println();
  -            System.out.println( Constants.SOFTWARE + " " + Constants.VERSION );
  +            System.out.println( ContainerConstants.SOFTWARE + " " + ContainerConstants.VERSION
);
               System.out.println();
   
               final Parameters parameters = setup.getParameters();
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/ContainerConstants.java
  
  Index: ContainerConstants.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.phoenix.components;
  
  /**
   * A set of constants that are used internally in the container to communicate
   * about different artefacts.
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   */
  public interface ContainerConstants
  {
      String SOFTWARE = "@@NAME@@";
      String VERSION = "@@VERSION@@";
      String DATE = "@@DATE@@";
  
      String DISABLE_PROXY_ATTR = "phoenix:disable-proxy";
  }
  
  
  

--
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