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/repository/api/src/java/org/apache/avalon/repository JarDescriptor.java
Date Mon, 17 Nov 2003 08:12:11 GMT
mcconnell    2003/11/17 00:12:11

  Modified:    repository/api/src/java/org/apache/avalon/repository
                        JarDescriptor.java
  Log:
  Change to usage an embedded artifact reference.
  
  Revision  Changes    Path
  1.2       +24 -1     avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/JarDescriptor.java
  
  Index: JarDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/JarDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JarDescriptor.java	7 Nov 2003 12:50:54 -0000	1.1
  +++ JarDescriptor.java	17 Nov 2003 08:12:11 -0000	1.2
  @@ -84,4 +84,27 @@
       {
           super( a_group, a_name, "jar", a_version ) ;
       }
  +
  +    /**
  +     * Gets the relative path to an artifact without a URL base.  The returned
  +     * URL path component represents the path to the artifact within a local or 
  +     * remote repository.
  +     */
  +    public String getRelativePath( char a_separator )
  +    {
  +        StringBuffer l_buf = new StringBuffer() ;
  +        
  +        l_buf.append( super.getGroup() ) ;
  +        l_buf.append( a_separator ) ;
  +        l_buf.append( "jars" ) ;
  +        l_buf.append( a_separator ) ;
  +        l_buf.append( super.getName() ) ;
  +        if( ( super.getVersion() != null ) && ( !super.getVersion().equals("")
) )
  +        {
  +            l_buf.append( '-' ) ;
  +            l_buf.append( super.getVersion() ) ;
  +        }
  +        l_buf.append( ".jar" ) ;
  +        return l_buf.toString() ;
  +    }
   }
  
  
  

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


Mime
View raw message