1 package org.apache.maven.artifact.repository.metadata; 2 3 18 19 import org.apache.maven.artifact.Artifact; 20 import org.apache.maven.artifact.repository.ArtifactRepository; 21 22 28 public class ArtifactRepositoryMetadata 29 extends AbstractRepositoryMetadata 30 { 31 private Artifact artifact; 32 33 public ArtifactRepositoryMetadata( Artifact artifact ) 34 { 35 this( artifact, null ); 36 } 37 38 public ArtifactRepositoryMetadata( Artifact artifact, Versioning versioning ) 39 { 40 super( createMetadata( artifact, versioning ) ); 41 this.artifact = artifact; 42 } 43 44 public boolean storedInGroupDirectory() 45 { 46 return false; 47 } 48 49 public boolean storedInArtifactVersionDirectory() 50 { 51 return false; 52 } 53 54 public String getGroupId() 55 { 56 return artifact.getGroupId(); 57 } 58 59 public String getArtifactId() 60 { 61 return artifact.getArtifactId(); 62 } 63 64 public String getBaseVersion() 65 { 66 return null; 68 } 69 70 public Object getKey() 71 { 72 return "artifact " + artifact.getGroupId() + ":" + artifact.getArtifactId(); 73 } 74 75 public boolean isSnapshot() 76 { 77 return false; 79 } 80 81 public void setRepository( ArtifactRepository remoteRepository ) 82 { 83 artifact.setRepository( remoteRepository ); 84 } 85 } 86 | Popular Tags |