avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/meta-tools/xdocs tags.xml
Date Sat, 21 Jun 2003 17:10:03 GMT
mcconnell    2003/06/21 10:10:03

  Modified:    merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl
                        DefaultLifestyleService.java
                        SingletonLifestyleHandler.java
               merlin/assembly/src/test/org/apache/avalon/playground
                        ExploitationManager.xinfo
               merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl
                        StandardBlockLoader.java
               merlin/merlin-platform/xdocs/meta/info/type index.xml
               merlin/merlin-platform/xdocs/resources notebook.xml
               merlin/merlin-platform/xdocs/starting/tutorial
                        dependencies.xml
               merlin/merlin-platform/xdocs/tools ant.xml
               merlin/merlin-platform/xdocs/tools/tags lifestyle.xml
               merlin/meta/src/java/org/apache/avalon/meta/info/builder
                        XMLTypeCreator.java package.html
               merlin/meta-spi/src/java/org/apache/avalon/meta type.dtd
               merlin/meta-spi/src/java/org/apache/avalon/meta/info
                        InfoDescriptor.java
               merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder
                        DefaultTypeBuilder.java XMLTypeWriter.java
               merlin/meta-tools/src/java/org/apache/avalon/meta/tools/ant
                        MetaTask.java
               merlin/meta-tools/src/test/org/apache/avalon/meta
                        MetaTestCase.java
               merlin/meta-tools/xdocs tags.xml
  Log:
  Updates include:
    a) incorporate lifestyle as a formal element of the
        Type defintion (as a element with the type info block)
    b) addition of info.getLifestyle() and updating of related
        generators, builders, writers
    c) fix a synchronization bug concenring singleton instance
        establishment.
  
  Revision  Changes    Path
  1.5       +8 -7      avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/DefaultLifestyleService.java
  
  Index: DefaultLifestyleService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/DefaultLifestyleService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultLifestyleService.java	18 Jun 2003 11:16:14 -0000	1.4
  +++ DefaultLifestyleService.java	21 Jun 2003 17:10:01 -0000	1.5
  @@ -62,6 +62,7 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.meta.info.InfoDescriptor;
   
   /**
    * A lifestyle service provides support for the creation of a lifestyle
  @@ -183,10 +184,9 @@
           //
   
           final String policy =
  -                appliance.getType().getInfo().getAttribute(
  -                        "urn:avalon:lifestyle", "singleton" );
  +                appliance.getType().getInfo().getLifestyle();
   
  -        if( policy.equalsIgnoreCase( "singleton" ) )
  +        if( policy.equals( InfoDescriptor.SINGLETON ) )
           {
               try
               {
  @@ -201,7 +201,8 @@
                     "Internal error while attempting to establish the singleton lifestyle
handler.";
                   throw new LifestyleRuntimeException( error, e );
               }
  -        } else if( policy.equals( "transient" ) )
  +        } 
  +        else if( policy.equals( InfoDescriptor.TRANSIENT ) )
           {
               try
               {
  @@ -218,7 +219,7 @@
                   throw new LifestyleRuntimeException( error, e );
               }
           } 
  -        else if( policy.equals( "thread" ) )
  +        else if( policy.equals( InfoDescriptor.THREAD ) )
           {
               try
               {
  @@ -234,7 +235,7 @@
                   throw new LifestyleRuntimeException( error, e );
               }
            } 
  -         else if( policy.equals( "pooled" ) )
  +        else if( policy.equals( InfoDescriptor.POOLED ) )
            {
                try
                {
  
  
  
  1.3       +12 -8     avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/SingletonLifestyleHandler.java
  
  Index: SingletonLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/SingletonLifestyleHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SingletonLifestyleHandler.java	18 Jun 2003 11:16:14 -0000	1.2
  +++ SingletonLifestyleHandler.java	21 Jun 2003 17:10:02 -0000	1.3
  @@ -147,16 +147,20 @@
       {
           if( m_instance == null )
           {
  -            if( getLogger().isDebugEnabled() )
  +            synchronized( this )
               {
  -                final String debug =
  -                        "new instance in appliance: " + getAppliance();
  -                getLogger().debug( debug );
  +                if( m_instance == null )
  +                {
  +                    if( getLogger().isDebugEnabled() )
  +                    {
  +                        final String debug =
  +                         "new instance in appliance: " + getAppliance();
  +                        getLogger().debug( debug );
  +                    }
  +                    m_instance = super.newInstance();
  +                }
               }
  -
  -            m_instance = super.newInstance();
           }
           return m_instance;
       }
  -
   }
  
  
  
  1.2       +1 -3      avalon-sandbox/merlin/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo
  
  Index: ExploitationManager.xinfo
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExploitationManager.xinfo	13 Mar 2003 01:04:26 -0000	1.1
  +++ ExploitationManager.xinfo	21 Jun 2003 17:10:02 -0000	1.2
  @@ -21,9 +21,7 @@
   
     <info>
       <name>exploit</name>
  -    <attributes>
  -      <attribute key="urn:avalon:lifestyle" value="thread"/>
  -    </attributes>
  +    <lifestyle>thread</lifestyle>
     </info>
   
     <!--
  
  
  
  1.15      +13 -34    avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/StandardBlockLoader.java
  
  Index: StandardBlockLoader.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/StandardBlockLoader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StandardBlockLoader.java	18 Jun 2003 11:28:12 -0000	1.14
  +++ StandardBlockLoader.java	21 Jun 2003 17:10:02 -0000	1.15
  @@ -683,44 +683,23 @@
       private InfoDescriptor createBlockInfoDescriptor( Configuration info )
         throws BlockException
       {
  -        final String name = info.getChild( "name" ).getValue( null );
  -        if( name == null )
  -        {
  -            final String error =
  -              "Block " + this + " does not contain a name.";
  -            getLogger().warn( error );
  -            return createBlockInfoDescriptor( "unknown", info );
  -        }
  -        return createBlockInfoDescriptor( name, info );
  -    }
  +        String name = info.getChild( "name" ).getValue( "block" );
  +        String classname = StandardBlock.class.getName();
  +        final Version version = 
  +          Version.getVersion( info.getChild( "version" ).getValue( "1.0" ) );
   
  -   /**
  -    * Create a block info descriptor holding the block name, version and
  -    * optional properties.
  -    *
  -    * @param name the name to assign to the block
  -    * @param info the &lt;info&gt; configuration fragment
  -    * @return the block info descriptor
  -    */
  -    private InfoDescriptor createBlockInfoDescriptor( String name, Configuration info )
  -      throws BlockException
  -    {
           try
           {
  -            final String classname = StandardBlock.class.getName();
  -            final Version version =
  -              Version.getVersion( info.getChild( "version" ).getValue( "1.0" ) );
  -            final Properties attributes =
  -              CREATOR.buildAttributes( info.getChild( "attributes" ) );
  -            return new InfoDescriptor( name, classname, version, attributes );
  +            final Properties attributes = 
  +              CREATOR.buildAttributes( info.getChild( "attributes" ) ); 
  +            return new InfoDescriptor( 
  +              name, classname, version, InfoDescriptor.SINGLETON, attributes ); 
           }
  -        catch( ConfigurationException ce )
  +        catch( Throwable e )
           {
  -            final String error =
  -              "Unexpected error building block info desciptor: "
  -              + name + "\n"
  -              + ConfigurationUtil.list( info );
  -            throw new BlockException( error, ce );
  +            final String error 
  +              = "Unable to build block info descriptor.";
  +            throw new BlockException( error, e );
           }
       }
   
  
  
  
  1.2       +3 -3      avalon-sandbox/merlin/merlin-platform/xdocs/meta/info/type/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/meta/info/type/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	10 Jun 2003 02:14:15 -0000	1.1
  +++ index.xml	21 Jun 2003 17:10:02 -0000	1.2
  @@ -112,8 +112,8 @@
   
         &lt;attributes&gt;
   
  -         &lt;attribute key="<font color="darkred">urn:avalon:display-name-i18n</font>"
value="<font color="darkred">display-name</font>"/&gt;
  -         &lt;attribute key="<font color="darkred">urn:avalon:lifestyle</font>"
value="<font color="darkred">THREAD_SAFE</font>"/&gt;
  +         &lt;attribute key="<font color="darkred">color</font>" value="<font
color="darkred">blue</font>"/&gt;
  +         &lt;attribute key="<font color="darkred">quantity</font>" value="<font
color="darkred">35</font>"/&gt;
   
         &lt;/attributes&gt;
   
  
  
  
  1.6       +7 -0      avalon-sandbox/merlin/merlin-platform/xdocs/resources/notebook.xml
  
  Index: notebook.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/resources/notebook.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- notebook.xml	20 Jun 2003 19:01:39 -0000	1.5
  +++ notebook.xml	21 Jun 2003 17:10:02 -0000	1.6
  @@ -65,6 +65,13 @@
               <td>DONE</td>
             </tr>
             <tr>
  +            <td>
  +            replace the attribute based lifestyle policy declaration with 
  +            a formal element in the info block 
  +            </td>
  +            <td>DONE</td>
  +          </tr>
  +          <tr>
               <td>tutorial on logging categories management</td>
               <td></td>
             </tr>
  
  
  
  1.3       +1 -3      avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/dependencies.xml
  
  Index: dependencies.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/dependencies.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- dependencies.xml	18 Jun 2003 11:19:28 -0000	1.2
  +++ dependencies.xml	21 Jun 2003 17:10:02 -0000	1.3
  @@ -77,9 +77,7 @@
     <info>
       <name>hello</name>
       <version>1.0.0</version>
  -    <attributes>
  -      <attribute key="urn:avalon:lifestyle" value="singleton"/>
  -    </attributes>
  +    <lifestyle>singleton</lifestyle>
     </info>
     <dependencies>
       <dependency key="random" type="tutorial.RandomGenerator:1.0.0"/>
  
  
  
  1.3       +1 -3      avalon-sandbox/merlin/merlin-platform/xdocs/tools/ant.xml
  
  Index: ant.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/tools/ant.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ant.xml	16 Jun 2003 09:39:05 -0000	1.2
  +++ ant.xml	21 Jun 2003 17:10:02 -0000	1.3
  @@ -136,9 +136,7 @@
     <info>
       <name>secondary-component</name>
       <version>2.4.0</version>
  -    <attributes>
  -      <attribute name="urn:avalon:lifestyle" value="singleton"/>
  -    </attributes>
  +    <lifestyle>singleton</lifestyle>
     </info>
     <loggers>
       <logger name="system"/>
  
  
  
  1.2       +2 -4      avalon-sandbox/merlin/merlin-platform/xdocs/tools/tags/lifestyle.xml
  
  Index: lifestyle.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/tools/tags/lifestyle.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lifestyle.xml	10 Jun 2003 02:14:38 -0000	1.1
  +++ lifestyle.xml	21 Jun 2003 17:10:02 -0000	1.2
  @@ -37,9 +37,7 @@
     <info>
       <version>1.0.0</version>
       <name>sample</name>
  -    <attributes>
  -      <attribute name="urn:avalon:lifestyle" value="transient"/>
  -    </attributes>
  +    <lifestyle>transient</lifestyle>
     </info>
   </type>
   ]]></source>
  
  
  
  1.8       +33 -7     avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/info/builder/XMLTypeCreator.java
  
  Index: XMLTypeCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/info/builder/XMLTypeCreator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLTypeCreator.java	20 Jun 2003 19:02:18 -0000	1.7
  +++ XMLTypeCreator.java	21 Jun 2003 17:10:02 -0000	1.8
  @@ -397,21 +397,47 @@
        * object from specified configuraiton data and classname.
        *
        * @param classname The classname of Component (used to create descriptor)
  -     * @param component the Component Configuration
  +     * @param info the component info configuration fragment
        * @return the created InfoDescriptor
        * @throws ConfigurationException if an error occurs
        */
       public InfoDescriptor buildInfoDescriptor(
  -      final String classname, final Configuration component )
  +      final String classname, final Configuration info )
         throws ConfigurationException
       {
           final String name = 
  -          component.getChild( "name" ).getValue( null );
  +          info.getChild( "name" ).getValue( null );
           final Version version = 
  -          buildVersion( component.getChild( "version" ).getValue( "1.0" ) );
  +          buildVersion( info.getChild( "version" ).getValue( "1.0" ) );
           final Properties attributes =
  -            buildAttributes( component.getChild( "attributes" ) );
  -        return new InfoDescriptor( name, classname, version, attributes );
  +            buildAttributes( info.getChild( "attributes" ) );
  +        final String lifestyle = 
  +          buildLifestyle( info, attributes );
  +        return new InfoDescriptor( name, classname, version, lifestyle, attributes );
  +    }
  +
  +   /**
  +    * Handle the resolution of the component lifestyle.  Normally this is 
  +    * resolved by retrieving the &lt;lifestyle&gt; element value, however, for

  +    * backward compatability - if the lifecycle element is not present, we will
  +    * attempt to resolve the lifestyle using the attribute value relative to the
  +    * key urn:avalon:lifestyle.
  +    *
  +    * @param info the info configuration fragment
  +    * @param attributes the component attributes
  +    * @return the lifestyle policy value
  +    */
  +    private String buildLifestyle( Configuration info, Properties attributes )
  +    {
  +        String lifestyle = info.getChild( "lifestyle" ).getValue( null );
  +        if( lifestyle != null )
  +        {
  +            return lifestyle;
  +        }
  +        else
  +        {
  +            return attributes.getProperty( "urn:avalon:lifestyle" );
  +        }
       }
   
       /**
  
  
  
  1.3       +4 -2      avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/info/builder/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/info/builder/package.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html	2 Apr 2003 15:58:38 -0000	1.2
  +++ package.html	21 Jun 2003 17:10:02 -0000	1.3
  @@ -33,13 +33,15 @@
   
       &lt;version&gt;</strong><font color="darkred">1.2.1</font>&lt;/version&gt;
   
  +    &lt;lifestyle&gt;</strong><font color="darkred">singleton</font>&lt;/lifestyle&gt;
  +
       <font color="gray"><i>&lt;!-- the set of attribibutes associated with
the type
            (attribute names and values are examples only) --&gt;</i></font>
   
       &lt;attributes&gt;
   
  -       &lt;attribute key="<font color="darkred">urn:avalon:display-name-i18n</font>"
value="<font color="darkred">display-name</font>"/&gt;
  -       &lt;attribute key="<font color="darkred">urn:avalon:lifestyle</font>"
value="<font color="darkred">THREAD_SAFE</font>"/&gt;
  +       &lt;attribute key="<font color="darkred">color</font>" value="<font
color="darkred">blue</font>"/&gt;
  +       &lt;attribute key="<font color="darkred">speed</font>" value="<font
color="darkred">fast</font>"/&gt;
   
       &lt;/attributes&gt;
   
  
  
  
  1.2       +2 -1      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/type.dtd
  
  Index: type.dtd
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/type.dtd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- type.dtd	13 Mar 2003 01:06:11 -0000	1.1
  +++ type.dtd	21 Jun 2003 17:10:02 -0000	1.2
  @@ -44,9 +44,10 @@
   version	     the version of the component in (in the format #.#.#, #.# or # where
                # is a integer
   -->
  -<!ELEMENT info      (name?,version,attributes?)>
  +<!ELEMENT info      (name?,version,lifestyle?,attributes?)>
     <!ELEMENT name         (#PCDATA) >
     <!ELEMENT version      (#PCDATA) >
  +  <!ELEMENT lifestyle      (#PCDATA) >
   
   
   <!--
  
  
  
  1.4       +53 -4     avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/InfoDescriptor.java
  
  Index: InfoDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/InfoDescriptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InfoDescriptor.java	16 Apr 2003 14:15:00 -0000	1.3
  +++ InfoDescriptor.java	21 Jun 2003 17:10:02 -0000	1.4
  @@ -76,6 +76,14 @@
    */
   public final class InfoDescriptor extends Descriptor
   {
  +     public static final String TRANSIENT = "transient";
  +
  +     public static final String SINGLETON = "singleton";
  +
  +     public static final String THREAD = "thread";
  +
  +     public static final String POOLED = "pooled";
  +
       /**
        * The short name of the Component Type. Useful for displaying
        * human readable strings describing the type in
  @@ -94,8 +102,14 @@
       private final Version m_version;
   
       /**
  +     * The component lifestyle.
  +     */
  +    private final String m_lifestyle;
  +
  +    /**
        * Creation of a new component descriptor using a supplied name, key, version
        * and attribute set.
  +     *
        * @param name the component name
        * @param classname the implemetation classname
        * @param version the implementation version
  @@ -105,7 +119,7 @@
       public InfoDescriptor( final String classname )
           throws IllegalArgumentException
       {
  -        this( null, classname, null, null );
  +        this( null, classname, null, null, null );
       }
   
       /**
  @@ -121,6 +135,7 @@
       public InfoDescriptor( final String name,
                                   final String classname,
                                   final Version version,
  +                                final String lifestyle,
                                   final Properties attributes )
           throws IllegalArgumentException
       {
  @@ -131,6 +146,19 @@
               throw new IllegalArgumentException( "classname: " + classname );
           }
   
  +        m_classname = classname;
  +        m_version = version;
  +
  +        if( lifestyle == null )
  +        {
  +            m_lifestyle = TRANSIENT;
  +        }
  +        else
  +        {
  +            validateLifestyle( lifestyle );
  +            m_lifestyle = lifestyle;
  +        }
  +
           if( name != null )
           {
               m_name = name;
  @@ -139,8 +167,19 @@
           {
               m_name = getClassName( classname );
           }
  -        m_classname = classname;
  -        m_version = version;
  +    }
  +
  +    private void validateLifestyle( String lifestyle ) throws IllegalArgumentException
  +    {
  +        if( lifestyle.equals( TRANSIENT )
  +          || lifestyle.equals( SINGLETON )
  +          || lifestyle.equals( THREAD )
  +          || lifestyle.equals( POOLED ) )
  +        {
  +            return;
  +        }
  +        final String error = "Lifestyle policy not recognized: " + lifestyle;
  +        throw new IllegalArgumentException( error );
       }
   
       private String getClassName( String classname )
  @@ -184,6 +223,16 @@
       public Version getVersion()
       {
           return m_version;
  +    }
  +
  +    /**
  +     * Return the component lifestyle.
  +     *
  +     * @return the lifestyle
  +     */
  +    public String getLifestyle()
  +    {
  +        return m_lifestyle;
       }
   
       /**
  
  
  
  1.4       +2 -6      avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/DefaultTypeBuilder.java
  
  Index: DefaultTypeBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/DefaultTypeBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultTypeBuilder.java	16 Apr 2003 14:19:42 -0000	1.3
  +++ DefaultTypeBuilder.java	21 Jun 2003 17:10:02 -0000	1.4
  @@ -120,10 +120,6 @@
           Version version = new VersionTag( javaClass ).getVersion();
           final String type = javaClass.getFullyQualifiedName();
           Properties properties = new AttributeTag( javaClass ).getProperties();
  -        if( lifestyle != null )
  -        {
  -            properties.setProperty( LIFESTYLE_URN, lifestyle );
  -        }
  -        return new InfoDescriptor( name, type, version, properties );
  +        return new InfoDescriptor( name, type, version, lifestyle, properties );
       }
   }
  
  
  
  1.6       +6 -2      avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/XMLTypeWriter.java
  
  Index: XMLTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/XMLTypeWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLTypeWriter.java	4 Jun 2003 02:02:54 -0000	1.5
  +++ XMLTypeWriter.java	21 Jun 2003 17:10:02 -0000	1.6
  @@ -113,7 +113,7 @@
       private void writeHeader( final Writer writer )
           throws IOException
       {
  -        writer.write( "<?xml version=\"1.0\" ?>" );
  +        writer.write( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" );
       }
   
       /**
  @@ -153,6 +153,10 @@
           writer.write( "\n    <version>");
           writer.write( info.getVersion().toString() );
           writer.write( "</version>");
  +
  +        writer.write( "\n    <lifestyle>");
  +        writer.write( info.getLifestyle() );
  +        writer.write( "</lifestyle>" );
   
           if( 0 == info.getAttributeNames().length )
           {
  
  
  
  1.7       +2 -2      avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/tools/ant/MetaTask.java
  
  Index: MetaTask.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/tools/ant/MetaTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MetaTask.java	16 Jun 2003 14:15:53 -0000	1.6
  +++ MetaTask.java	21 Jun 2003 17:10:02 -0000	1.7
  @@ -129,7 +129,7 @@
        * will be generated only when the source file is
        * newer than the destination file.
        */
  -    private boolean m_force = false;
  +    private boolean m_force = true;
   
       /**
        * Set the desitation directory to generate output files to.
  
  
  
  1.3       +1 -1      avalon-sandbox/merlin/meta-tools/src/test/org/apache/avalon/meta/MetaTestCase.java
  
  Index: MetaTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/test/org/apache/avalon/meta/MetaTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MetaTestCase.java	16 Apr 2003 14:21:14 -0000	1.2
  +++ MetaTestCase.java	21 Jun 2003 17:10:03 -0000	1.3
  @@ -202,7 +202,7 @@
           assertTrue( "version", type.getInfo().getVersion().toString().equals( "1.3.0" )
);
           assertTrue( "name", type.getInfo().getName().equals( "primary-component" ) );
           assertTrue(
  -          "lifestyle", type.getInfo().getAttribute("urn:avalon:lifestyle").equals( "singleton"
) );
  +          "lifestyle", type.getInfo().getLifestyle().equals( "singleton" ) );
   
           ContextDescriptor context = m_primary.getContext();
           EntryDescriptor entry = context.getEntry( "home" );
  
  
  
  1.3       +3 -1      avalon-sandbox/merlin/meta-tools/xdocs/tags.xml
  
  Index: tags.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/xdocs/tags.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tags.xml	2 Apr 2003 15:58:39 -0000	1.2
  +++ tags.xml	21 Jun 2003 17:10:03 -0000	1.3
  @@ -103,7 +103,9 @@
   <source><![CDATA[
   <type>
     <info>
  +    <name>primary-component<name>
       <version>1.3.0<version>
  +    <lifestyle>singleton<lifestyle>
     </info>
   </type>
   ]]></source>
  
  
  

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


Mime
View raw message