You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by mi...@apache.org on 2003/05/01 19:28:40 UTC

cvs commit: maven-new/core/src/java/org/apache/maven/artifact RepositoryLayout.java ArtifactListProcessor.java DefaultArtifact.java Artifact.java DefaultRepositoryLayout.java DefaultArtifactVerifier.java ArtifactFactory.java ArtifactVerifier.java ArtifactHandler.java

michal      2003/05/01 10:28:40

  Modified:    core/src/java/org/apache/maven/artifact
                        RepositoryLayout.java ArtifactListProcessor.java
                        DefaultArtifact.java Artifact.java
                        DefaultRepositoryLayout.java
                        DefaultArtifactVerifier.java ArtifactFactory.java
                        ArtifactVerifier.java ArtifactHandler.java
  Log:
  changed property: ${artiftact.id} to artifact.artifactId and javadoc improved
  
  Revision  Changes    Path
  1.2       +12 -6     maven-new/core/src/java/org/apache/maven/artifact/RepositoryLayout.java
  
  Index: RepositoryLayout.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/RepositoryLayout.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepositoryLayout.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ RepositoryLayout.java	1 May 2003 17:28:40 -0000	1.2
  @@ -1,5 +1,3 @@
  -package org.apache.maven.artifact;
  -
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  @@ -55,23 +53,31 @@
    *
    * ====================================================================
    */
  +package org.apache.maven.artifact;
   
   /**
    * <code>RepositoryLayout</code> describes how artifacts are to
    * be arranged in a user's local repository.
  + * <br/> 
  + * The layout is type-senstive and for the different 
  + * types of artifacts the layout can be arranged differently. 
    *
    * @author <a href="jason@zenplex.com">Jason van Zyl</a>
  + * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a> 
    * @version $Id$
    */
   public interface RepositoryLayout
   {
      
  +   /** The role played in  Avalon container  */
      public static final String ROLE = RepositoryLayout.class.getName();
      
      /**
  -    * 
  -    * @param artifact
  -    * @return
  +    * Returns the relative path for artifact in local repository
  +    * <p>    
  +    *  
  +    * @param artifact the Artifact for which
  +    * @return the path 
       */
      String generatePath(Artifact artifact) throws Exception;
      
  
  
  
  1.2       +18 -14    maven-new/core/src/java/org/apache/maven/artifact/ArtifactListProcessor.java
  
  Index: ArtifactListProcessor.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/ArtifactListProcessor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArtifactListProcessor.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ ArtifactListProcessor.java	1 May 2003 17:28:40 -0000	1.2
  @@ -58,25 +58,29 @@
   import org.apache.maven.project.Project;
   
   /**
  - * Class resposible to convert information kept in 
  - * the {@link Project} into the list of artifacts.   
  + * Interface for clas   
  + * the {@link Project} into the list of artifacts.  
  + * <p>
  + * Processing for each artifact can include:
  + * <ol>
  + *   <li>Downloading</li>
  + *   <li>Verification</li>
  + *   <li>Application of artifact handler<li>
  + * </ol>
    *
    * @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
    * @version $Id$
    */
   public interface ArtifactListProcessor
   {
  -    public static final String ROLE = ArtifactListProcessor.class.getName();
  +   /** the role in Avalon container */
  +   public static final String ROLE = ArtifactListProcessor.class.getName();
   
  -    /**
  -     * Return an list of artifacts based on the information kept in the Project. 
  -     * There is one to one relation between project's dependiencies and artifacts
  -     * and currently for each dependecy one artifact should created.
  -     * 
  -     *
  -     * @param project The project for which the artifact list will be resolved 
  -     * @return The list contating resolved artifacts. 
  -     */
  -    public void processArtifacts(Project project) throws Exception;
  +   /**
  +    * Process all the project's artifacts 
  +    * 
  +    * @param project The project of which artifact list will proceessed     
  +    */
  +   public void processArtifacts(Project project) throws Exception;
   
   }
  
  
  
  1.2       +202 -180  maven-new/core/src/java/org/apache/maven/artifact/DefaultArtifact.java
  
  Index: DefaultArtifact.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/DefaultArtifact.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultArtifact.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ DefaultArtifact.java	1 May 2003 17:28:40 -0000	1.2
  @@ -63,190 +63,212 @@
   /**
    * The default implemenation of  {@link Artifact} 
    * interface
  - *
  + * 
    * @author <a href="jason@zenplex.com">Jason van Zyl</a>
    * @version $Id$
    */
   
  -public class DefaultArtifact implements Artifact {
  +public class DefaultArtifact implements Artifact
  +{
   
  -	/** Platform specific file separator used for file system operations. */
  -	protected final static String PATH_SEPARATOR = File.separator;
  +   /** Platform specific file separator used for file system operations. */
  +   protected final static String PATH_SEPARATOR = File.separator;
   
  -	/**
  -	 * The id of this artifact
  -	 */
  -	private String id;
  -
  -	/**
  -	 *   
  -	 *The group id for the artifact.
  -	 */
  -	private String groupId;
  -
  -	/**    
  -	 * Version of this artifact
  -	 */
  -	private String version;
  -
  -	/**
  -	 * Type such as "jar" or "war"
  -	 */
  -	private String type;
  -
  -	/**	 
  -	 * The artifact file.
  -	 */
  -	private File file;
  -
  -	/**
  -	 * 
  -	 * Assocaiated dependency
  -	 */
  -	private Dependency dependency = null;
  -
  -	/** 
  -	 * @see org.apache.maven.artifact.Artifact#setId(java.lang.String)
  -	 */
  -	public void setId(String id) {
  -		this.id = id;
  -
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getId()
  -	 */
  -	public String getId() {
  -		return id;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#setGroupId(java.lang.String)
  -	 */
  -	public void setGroupId(String groupId) {
  -		this.groupId = groupId;
  -
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getGroupId()
  -	 */
  -	public String getGroupId() {
  -		return groupId;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#setVersion(java.lang.String)
  -	 */
  -	public void setVersion(String version) {
  -		this.version = version;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getVersion()
  -	 */
  -	public String getVersion() {
  -		return version;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getType()
  -	 */
  -	public String getType() {
  -
  -		return type;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#setType(java.lang.String)
  -	 */
  -	public void setType(String type) {
  -		this.type = type;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getPath()
  -	 */
  -	public String getPath() {
  -		return PATH_SEPARATOR + getFile();
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getUrlPath()
  -	 */
  -	public String getUrlPath() {
  -
  -		return "/" + getFile();
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getChecksumUrl()
  -	 */
  -	public String getChecksumUrl() {
  -		return getUrlPath() + ".md5";
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#isSnapshot()
  -	 */
  -	public boolean isSnapshot() {
  -		return getVersion().endsWith(MavenConstants.SNAPSHOT_SIGNIFIER);
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#exists()
  -	 */
  -	public boolean exists() {
  -		if (getFile().exists()) {
  -			return true;
  -		}
  -		else {
  -			return false;
  -		}
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getFile()
  -	 */
  -	public File getFile() {
  -		return file;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#setFile(java.lang.String)
  -	 */
  -	public void setFile(String file) {
  -		setFile(new File(file));
  -
  -	}
  -
  -	/**
  -	 * @ see org.apache.maven.artifact.Artifact # setFile(java.lang.String)
  -	 */
  -	public void setFile(File file) {
  -		this.file = file;
  -
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getDependency()
  -	 */
  -	public Dependency getDependency() {
  -
  -		return dependency;
  -	}
  -
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#getName()
  -	 */
  -	public String getName() {
  -		return getGroupId() + ":" + getId();
  -	}
  -	/**
  -	 * @see org.apache.maven.artifact.Artifact#setDependency(null)
  -	 */
  -	public void setDependency(Dependency dependency) {
  -		this.dependency = dependency;
  -	}
  +   /**
  +    * The id of this artifact
  +    */
  +   private String artifactId;
  +
  +   /**
  +    *   
  +    *The group id for the artifact.
  +    */
  +   private String groupId;
  +
  +   /**    
  +    * Version of this artifact
  +    */
  +   private String version;
  +
  +   /**
  +    * Type such as "jar" or "war"
  +    */
  +   private String type;
  +
  +   /**	 
  +    * The artifact file.
  +    */
  +   private File file;
  +
  +   /**
  +    * 
  +    * Associated dependency
  +    */
  +   private Dependency dependency = null;
  +
  +   /** 
  +    * @see org.apache.maven.artifact.Artifact#setArtifactId(String)
  +    */
  +   public void setArtifactId(String artifactId)
  +   {
  +      this.artifactId = artifactId;
  +
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getArtifactId()()
  +    */
  +   public String getArtifactId()
  +   {
  +      return artifactId;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#setGroupId(java.lang.String)
  +    */
  +   public void setGroupId(String groupId)
  +   {
  +      this.groupId = groupId;
  +
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getGroupId()
  +    */
  +   public String getGroupId()
  +   {
  +      return groupId;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#setVersion(java.lang.String)
  +    */
  +   public void setVersion(String version)
  +   {
  +      this.version = version;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getVersion()
  +    */
  +   public String getVersion()
  +   {
  +      return version;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getType()
  +    */
  +   public String getType()
  +   {
  +
  +      return type;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#setType(java.lang.String)
  +    */
  +   public void setType(String type)
  +   {
  +      this.type = type;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getPath()
  +    */
  +   public String getPath()
  +   {
  +      return PATH_SEPARATOR + getFile();
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getUrlPath()
  +    */
  +   public String getUrlPath()
  +   {
  +
  +      return "/" + getFile();
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getChecksumUrl()
  +    */
  +   public String getChecksumUrl()
  +   {
  +      return getUrlPath() + ".md5";
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#isSnapshot()
  +    */
  +   public boolean isSnapshot()
  +   {
  +      return getVersion().endsWith(MavenConstants.SNAPSHOT_SIGNIFIER);
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#exists()
  +    */
  +   public boolean exists()
  +   {
  +      if (getFile().exists())
  +      {
  +         return true;
  +      }
  +      else
  +      {
  +         return false;
  +      }
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getFile()
  +    */
  +   public File getFile()
  +   {
  +      return file;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#setFile(java.lang.String)
  +    */
  +   public void setFile(String file)
  +   {
  +      setFile(new File(file));
  +
  +   }
  +
  +   /**
  +    * @ see org.apache.maven.artifact.Artifact # setFile(java.lang.String)
  +    */
  +   public void setFile(File file)
  +   {
  +      this.file = file;
  +
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getDependency()
  +    */
  +   public Dependency getDependency()
  +   {
  +
  +      return dependency;
  +   }
  +
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#getName()
  +    */
  +   public String getId()
  +   {
  +      return getGroupId() + ":" + getId();
  +   }
  +   /**
  +    * @see org.apache.maven.artifact.Artifact#setDependency(null)
  +    */
  +   public void setDependency(Dependency dependency)
  +   {
  +      this.dependency = dependency;
  +   }
   
   }
  
  
  
  1.2       +128 -127  maven-new/core/src/java/org/apache/maven/artifact/Artifact.java
  
  Index: Artifact.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/Artifact.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Artifact.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ Artifact.java	1 May 2003 17:28:40 -0000	1.2
  @@ -68,131 +68,132 @@
    * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a> 
    * @version $Id$
    */
  -public interface Artifact {
  +public interface Artifact
  +{
  +
  +   /**
  +    * Set the dependency for this JAR artifact.
  +    *
  +    * @param dependency Dependency this artifact is based on.
  +    */
  +   void setDependency(Dependency dependency);
  +
  +   /**
  +    * Get the dependency.
  +    *
  +    * @return The dependency this artifact is based on.
  +    */
  +   Dependency getDependency();
  +
  +   /**
  +    * Returns id which is "groupId:artifactId"
  +    * @return id of this artifact
  +    */
  +   String getId();
  +
  +   /**
  +    * Get the artifactId
  +    * @return artifactId for the artifact
  +    */
  +   String getArtifactId();
  +
  +   /**
  +    * Set artifactId
  +    * @param artifactId The artifactId for the artifact
  +    */
  +   void setArtifactId(String artifactId);
  +
  +   /**
  +    * Set the group id.
  +    *
  +    * @param groupId Group id for the artifact.
  +    */
  +   void setGroupId(String groupId);
  +
  +   /**
  +    * Get the group id.
  +    *
  +    * @return The group id for the artifact.
  +    */
  +   String getGroupId();
  +
  +   /**
  +    * Set the version for this artifact.
  +    *
  +    * @param version Version for this artifact
  +    */
  +   void setVersion(String version);
  +
  +   /**
  +    * Get the version of this artifact.
  +    *
  +    * @return Version of this artifact
  +    */
  +   String getVersion();
  +
  +   /**
  +    * Get the type of the artifact.
  +    *
  +    * @return dependency type such as "compile" or "test"
  +    */
  +   String getType();
  +
  +   /**
  +    * Sets the dependency type such as "compile" or "test"
  +    *
  +    * @param type The type of artifact.
  +    */
  +   void setType(String type);
  +
  +   /**
  +    * Set the path to the artifact. The maven jar override facilty can be
  +    * used to change the path to the artifact if the user specifies the
  +    * use of a specific version.
  +    *
  +    * @param path Path to the artifact.
  +    */
  +   void setFile(String file);
  +
  +   /**
  +    * Return a path that is platform agnostic.
  +    *
  +    * @return URL of the artifact.
  +    */
  +   String getPath();
  +
  +   /**
  +    * Return an URL path that is platform agnostic.
  +    *
  +    * @return URL of the artifact.
  +    */
  +   String getUrlPath();
  +
  +   /**
  +    * Return the url to the checksum file for this artifact.
  +    *
  +    * @return URL of the checksum file for this artifact.
  +    */
  +   String getChecksumUrl();
  +
  +   /**
  +    * Boolean flag indicating whether this artifact is a snapshot.
  +    *
  +    * @return Flag indicating whether this artifact is a snapshot.
  +    */
  +   boolean isSnapshot();
  +
  +   /**
  +    * Boolean flag indicating whether this artifact exists.
  +    *
  +    * @return Flag indicating the existance of the artifact in the local repository.
  +    */
  +   boolean exists();
  +
  +   /**
  +    * Get the location of the artifact in the local file system.
  +    *
  +    * @return The location of the artifact in the local file system.
  +    */
  +   File getFile();
   
  -	/**
  -	 * Set the dependency for this JAR artifact.
  -	 *
  -	 * @param dependency Dependency this artifact is based on.
  -	 */
  -	void setDependency(Dependency dependency);
  -
  -	/**
  -	 * Get the dependency.
  -	 *
  -	 * @return The dependency this artifact is based on.
  -	 */
  -	Dependency getDependency();
  -
  -	/**
  -	 * Set id
  -	 * @param id  Id of the artifact
  -	 */
  -	void setId(String id);
  -
  -	/**
  -	 * Get id
  -	 * @return id of this artifact
  -	 */
  -	String getId();
  -
  -	/**
  -	 * Set the group id.
  -	 *
  -	 * @param groupId Group id for the artifact.
  -	 */
  -	void setGroupId(String groupId);
  -
  -	/**
  -	 * Get the group id.
  -	 *
  -	 * @return The group id for the artifact.
  -	 */
  -	String getGroupId();
  -
  -	/**
  -	 * Set the version for this artifact.
  -	 *
  -	 * @param version Version for this artifact
  -	 */
  -	void setVersion(String version);
  -
  -	/**
  -	 * Get the version of this artifact.
  -	 *
  -	 * @return Version of this artifact
  -	 */
  -	String getVersion();
  -
  -	/**
  -	 * Get the type of the artifact.
  -	 *
  -	 * @return dependency type such as "compile" or "test"
  -	 */
  -	String getType();
  -
  -	/**
  -	 * Sets the dependency type such as "compile" or "test"
  -	 *
  -	 * @param type The type of artifact.
  -	 */
  -	void setType(String type);
  -
  -	/**
  -	 * Set the path to the artifact. The maven jar override facilty can be
  -	 * used to change the path to the artifact if the user specifies the
  -	 * use of a specific version.
  -	 *
  -	 * @param path Path to the artifact.
  -	 */
  -	void setFile(String file);
  -
  -	/**
  -	 * Return a path that is platform agnostic.
  -	 *
  -	 * @return URL of the artifact.
  -	 */
  -	String getPath();
  -
  -	/**
  -	 * Return an URL path that is platform agnostic.
  -	 *
  -	 * @return URL of the artifact.
  -	 */
  -	String getUrlPath();
  -
  -	/**
  -	 * Return the url to the checksum file for this artifact.
  -	 *
  -	 * @return URL of the checksum file for this artifact.
  -	 */
  -	String getChecksumUrl();
  -
  -	/**
  -	 * Boolean flag indicating whether this artifact is a snapshot.
  -	 *
  -	 * @return Flag indicating whether this artifact is a snapshot.
  -	 */
  -	boolean isSnapshot();
  -
  -	/**
  -	 * Boolean flag indicating whether this artifact exists.
  -	 *
  -	 * @return Flag indicating the existance of the artifact in the local repository.
  -	 */
  -	boolean exists();
  -
  -	/**
  -	 * Get the location of the artifact in the local file system.
  -	 *
  -	 * @return The location of the artifact in the local file system.
  -	 */
  -	File getFile();
  -
  -	/**
  -	 * Returns "groupId:id"
  -	 *
  -	 * @return "groupId:id"
  -	 */
  -	String getName();
   }
  
  
  
  1.2       +6 -3      maven-new/core/src/java/org/apache/maven/artifact/DefaultRepositoryLayout.java
  
  Index: DefaultRepositoryLayout.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/DefaultRepositoryLayout.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultRepositoryLayout.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ DefaultRepositoryLayout.java	1 May 2003 17:28:40 -0000	1.2
  @@ -76,13 +76,16 @@
   {
   
       private final static String DEFAULT_LAYOUT =
  -        "${groupId}/${type}s/${id}-${version}.${type}";
  +        "${groupId}/${type}s/${artifactId}-${version}.${type}";
   
       /**
        * List of cachedGlobalLayouts.
        */
       private Properties globalLayouts = new Properties();
   
  +    /**
  +     * see org.apache.maven.artifact.RepositoryLayout#generatePath(Artifact) 
  +     */
       public String generatePath(Artifact artifact) throws Exception
       {
           // see if we have layout for this artifact type alredy in the cache
  @@ -94,7 +97,7 @@
               globalLayouts.put(type,layout);
           }
           // interpolation of layout
  -        layout = StringUtils.replace(layout, "${id}", artifact.getId());        
  +        layout = StringUtils.replace(layout, "${artifactId}", artifact.getArtifactId());        
           layout =
               StringUtils.replace(layout, "${groupId}", artifact.getGroupId());
               
  
  
  
  1.2       +7 -3      maven-new/core/src/java/org/apache/maven/artifact/DefaultArtifactVerifier.java
  
  Index: DefaultArtifactVerifier.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/DefaultArtifactVerifier.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultArtifactVerifier.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ DefaultArtifactVerifier.java	1 May 2003 17:28:40 -0000	1.2
  @@ -66,10 +66,14 @@
   import org.apache.maven.verifier.ChecksumVerificationException;
   
   /**
  - * The interface defining an artifact (which probably lives in the
  - * repository).
  + * Implementation of {@link ArtifactVerifier}
  + * which checks if artifact is <i>"valid"</i> by 
  + * computing MD5 checksum for the artifact file
  + * and comparing it with MD5 checksum retrieved from 
  + * the accompanying file taken from repository.  
    *
    * @author <a href="jason@zenplex.com">Jason van Zyl</a>
  + * @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a> 
    * @version $Id$
    */
   public class DefaultArtifactVerifier
  
  
  
  1.2       +29 -14    maven-new/core/src/java/org/apache/maven/artifact/ArtifactFactory.java
  
  Index: ArtifactFactory.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/ArtifactFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArtifactFactory.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ ArtifactFactory.java	1 May 2003 17:28:40 -0000	1.2
  @@ -60,8 +60,22 @@
   import org.apache.maven.project.Project;
   
   /**
  - * Class resposible for converting {@link Project}'s list 
  - * of dependicies into the list of artifacts.   
  + * Class resposible for converting information kept
  + * in {@link Project} 
  + * (list of dependicies) into the list of artifacts.   
  + * <p>
  + * For the moment there a general assumption that there
  + * is one to one relation between 
  + * {@link Dependency} and {@link Artifact}
  + * and currently for each dependecy one artifact will 
  + * created.
  + * <p>
  + * Once (if ever) the agreement on meaning of terms like
  + * <b>transitive dependecy</b>, <b>group dependecy<b>
  + * will be found it can happend that there will be exceptions
  + * from this rule. That's why this interface has such form
  + * and leaves the doors open for such changes.
  + *  
    *
    * @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
    * @version $Id$
  @@ -69,17 +83,18 @@
   public interface ArtifactFactory
   {
   
  -    public static final String ROLE = ArtifactFactory.class.getName();
  +   /** The role played in Avalon container*/
  +   public static final String ROLE = ArtifactFactory.class.getName();
   
  -    /**
  -     * Return an list of artifacts based on the information kept in the Project. 
  -     * There is one to one relation between project's dependiencies and artifacts
  -     * and currently for each dependecy one artifact should created.
  -     * 
  -     *
  -     * @param project The project for which the artifact list will be resolved 
  -     * @return The list contating resolved artifacts. 
  -     */
  -    public List createArtifacts(Project project) throws Exception;
  +   /**
  +    * Returns the list of artifacts which is 
  +    * constructed basing on the information kept in the given 
  +    * Project. 
  +    * <br/>     
  +    *
  +    * @param project The project for which the artifact list will be resolved 
  +    * @return The list contating resolved artifacts. 
  +    */
  +   public List createArtifacts(Project project) throws Exception;
   
   }
  
  
  
  1.2       +19 -4     maven-new/core/src/java/org/apache/maven/artifact/ArtifactVerifier.java
  
  Index: ArtifactVerifier.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/ArtifactVerifier.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArtifactVerifier.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ ArtifactVerifier.java	1 May 2003 17:28:40 -0000	1.2
  @@ -58,9 +58,24 @@
   import org.apache.maven.verifier.ChecksumVerificationException;
   
   /**
  - * The interface defining an artifact (which probably lives in the
  - * repository).
  - *
  + * The interface defining an interface for classes 
  + * which will verify if given artifact is "valid".
  + * <br/>
  + * "The validation" can be type sensitive
  + * and can mean (just examples):
  + * <ol>
  + *   <li>MD5 sum checking</li>
  + *   <li>
  + *      XML validation (sytaxtic & agaist XML schema) 
  + *      - in case when artifact is XML file
  + *   </li>
  + *   <li>Checking if war archive contains valid web.xml file</li>
  + *   <li>...</i>
  + * <ol>
  + * 
  + * @todo This code was extracted from artifact class. 
  + * Find all the places which were affected. 
  + * 
    * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
    * @version $Id$
    */
  
  
  
  1.2       +8 -6      maven-new/core/src/java/org/apache/maven/artifact/ArtifactHandler.java
  
  Index: ArtifactHandler.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/java/org/apache/maven/artifact/ArtifactHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArtifactHandler.java	30 Apr 2003 08:29:40 -0000	1.1
  +++ ArtifactHandler.java	1 May 2003 17:28:40 -0000	1.2
  @@ -58,17 +58,19 @@
   import org.apache.maven.project.Project;
   
   /**
  - * The interface defining a contract for the class
  - * resposible to process artifact 
  - *
  + * The interface defines the contract for the class
  + * resposible for processing an artifact is particular,
  + * artifact type dependent way.
  + *  
    * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
    * @version $Id$
    */
  -public interface ArtifactHandler 
  +public interface ArtifactHandler
   {
      /**
       * 
  -    * @param artifact
  +    * @param artifact the Artifact to process
  +    * @param project the Project, owner of the artifact
       */
      void process(Artifact artifact, Project project);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org