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/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags DependencyTag.java
Date Tue, 15 Jul 2003 19:05:45 GMT
mcconnell    2003/07/15 12:05:45

  Modified:    meta/impl/src/java/org/apache/avalon/meta/info/writer
                        XMLTypeWriter.java
               meta/plugin plugin.jelly
               meta/tools/src/java/org/apache/avalon/meta/info/builder/tags
                        DependencyTag.java
  Log:
  Apply correction to DependencyTag identified by Daniel Krieg that enable multi-keys for
a given depedency type and enhanced the XML writers such that a version="-1" is not written
out in XML format.
  
  Revision  Changes    Path
  1.5       +11 -5     avalon-sandbox/meta/impl/src/java/org/apache/avalon/meta/info/writer/XMLTypeWriter.java
  
  Index: XMLTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/impl/src/java/org/apache/avalon/meta/info/writer/XMLTypeWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLTypeWriter.java	11 Jul 2003 04:49:33 -0000	1.4
  +++ XMLTypeWriter.java	15 Jul 2003 19:05:44 -0000	1.5
  @@ -317,8 +317,11 @@
               final ServiceDescriptor service = services[ i ];
               writer.write( "\n    <service type=\"" );
               writer.write( service.getReference().getClassname() );
  -            writer.write( "\" version=\"" );
  -            writer.write( service.getReference().getVersion().toString() );
  +            if( service.getReference().getVersion().getMajor() > -1 )
  +            {
  +                writer.write( "\" version=\"" );
  +                writer.write( service.getReference().getVersion().toString() );
  +            }
               final int count = service.getAttributeNames().length;
               if( 0 == count )
               {
  @@ -365,8 +368,11 @@
   
               writer.write( "type=\"" );
               writer.write( dependency.getReference().getClassname() );
  -            writer.write( "\" version=\"" );
  -            writer.write( dependency.getReference().getVersion().toString() );
  +            if( dependency.getReference().getVersion().getMajor() > -1 )
  +            {
  +                writer.write( "\" version=\"" );
  +                writer.write( dependency.getReference().getVersion().toString() );
  +            }
   
               if( dependency.isOptional() )
               {
  
  
  
  1.4       +1 -1      avalon-sandbox/meta/plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/plugin/plugin.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- plugin.jelly	10 Jul 2003 23:28:28 -0000	1.3
  +++ plugin.jelly	15 Jul 2003 19:05:45 -0000	1.4
  @@ -9,7 +9,7 @@
   
     <define:taglib uri="avalon"/>
   
  -  <ant:taskdef name="avalon" classname="org.apache.avalon.meta.tools.ant.MetaTask">
  +  <ant:taskdef name="avalon" classname="org.apache.avalon.meta.info.ant.MetaTask">
       <classpath>
         <pathelement path="${plugin.getDependencyPath('qdox:qdox')}"/>
         <pathelement path="${plugin.getDependencyPath('avalon-framework:avalon-framework-api')}"/>
  
  
  
  1.2       +5 -3      avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/DependencyTag.java
  
  Index: DependencyTag.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/DependencyTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DependencyTag.java	10 Jul 2003 12:10:39 -0000	1.1
  +++ DependencyTag.java	15 Jul 2003 19:05:45 -0000	1.2
  @@ -126,10 +126,12 @@
   
               for( int i = 0; i < tags.length; i++ )
               {
  -                final String key = getNamedParameter( tags[i], TYPE_PARAM );
  +                DocletTag tag = tags[i];
  +                DependencyDescriptor dep = getDependency( tag );
  +                final String key = dep.getKey();
                   if( !marked.contains( key ) )
                   {
  -                    deps.add( getDependency( tags[i] ) );
  +                    deps.add( dep );
                       marked.add( key );
                   }
               }
  
  
  

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


Mime
View raw message