akarasulu    2003/11/11 21:28:01

  Modified:    repository/api/src/java/org/apache/avalon/repository
                        RepositoryUtils.java
  Log:
  Switching over to using the meta extention for
  meta-data artifacts.  Similar mechanism to the
  .md5 extension mechanism is used rather than
  creating a metas directory.
  
  Revision  Changes    Path
  1.3       +9 -14     
avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/RepositoryUtils.java
  
  Index: RepositoryUtils.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/RepositoryUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RepositoryUtils.java      10 Nov 2003 23:43:50 -0000      1.2
  +++ RepositoryUtils.java      12 Nov 2003 05:28:00 -0000      1.3
  @@ -76,6 +76,9 @@
    */
   public class RepositoryUtils
   {
  +    /** meta extension tag for meta-data containing artifacts */
  +    public static final String META = "meta" ;
  +    
       /**
        * Transforms a Properties into a Attributes using a simple enumeration 
        * convention for property names which appends a numeric enumeration name
  @@ -117,7 +120,7 @@
           return l_attrs ;
       }
       
  -    
  +
       /**
        * Gets the Properties in a remote properties file.
        * 
  @@ -133,19 +136,11 @@
           
           for( int ii = 0; ii < a_repos.length; ii++ )
           {
  -            StringBuffer l_buf = new StringBuffer( a_repos[ii] ) ;
  +            StringBuffer l_buf = new StringBuffer() ;
  +            l_buf.append( a_artifact.getUrl( a_repos[ii] ) ) ;
  +            l_buf.append( "." ) ;
  +            l_buf.append( META ) ;
           
  -            if ( l_buf.charAt( l_buf.length() - 1 ) != '/' )
  -            {
  -                l_buf.append( '/' ) ;
  -            }
  -            
  -            l_buf.append( a_artifact.getGroup() ).append( '/' ) ;
  -            l_buf.append( "propertiess/" ) ;
  -            l_buf.append( a_artifact.getName() ).append( '-' ) ;
  -            l_buf.append( a_artifact.getVersion() ) ;
  -            l_buf.append( ".jar.properties" ) ;
  -
               try
               {
                   URL l_url = new URL( l_buf.toString() ) ;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to