1 package org.apache.maven.artifact; 2 3 18 19 import org.apache.maven.artifact.handler.ArtifactHandler; 20 import org.apache.maven.artifact.metadata.ArtifactMetadata; 21 import org.apache.maven.artifact.repository.ArtifactRepository; 22 import org.apache.maven.artifact.resolver.filter.ArtifactFilter; 23 import org.apache.maven.artifact.versioning.ArtifactVersion; 24 import org.apache.maven.artifact.versioning.OverConstrainedVersionException; 25 import org.apache.maven.artifact.versioning.VersionRange; 26 27 import java.io.File ; 28 import java.util.Collection ; 29 import java.util.List ; 30 import java.util.regex.Pattern ; 31 32 38 public interface Artifact 39 extends Comparable 40 { 41 String LATEST_VERSION = "LATEST"; 42 43 String SNAPSHOT_VERSION = "SNAPSHOT"; 44 45 Pattern VERSION_FILE_PATTERN = Pattern.compile( "^(.*)-([0-9]{8}.[0-9]{6})-([0-9]+)$" ); 46 47 String SCOPE_COMPILE = "compile"; 49 50 String SCOPE_TEST = "test"; 51 52 String SCOPE_RUNTIME = "runtime"; 53 54 String SCOPE_PROVIDED = "provided"; 55 56 String SCOPE_SYSTEM = "system"; 57 58 String RELEASE_VERSION = "RELEASE"; 59 60 String getGroupId(); 61 62 String getArtifactId(); 63 64 String getVersion(); 65 66 void setVersion( String version ); 67 68 75 String getScope(); 76 77 String getType(); 78 79 String getClassifier(); 80 81 boolean hasClassifier(); 83 84 File getFile(); 85 86 void setFile( File destination ); 87 88 String getBaseVersion(); 89 90 93 void setBaseVersion( String baseVersion ); 94 95 97 String getId(); 98 99 String getDependencyConflictId(); 100 101 void addMetadata( ArtifactMetadata metadata ); 102 103 Collection getMetadataList(); 104 105 void setRepository( ArtifactRepository remoteRepository ); 106 107 ArtifactRepository getRepository(); 108 109 void updateVersion( String version, ArtifactRepository localRepository ); 110 111 String getDownloadUrl(); 112 113 void setDownloadUrl( String downloadUrl ); 114 115 ArtifactFilter getDependencyFilter(); 116 117 void setDependencyFilter( ArtifactFilter artifactFilter ); 118 119 ArtifactHandler getArtifactHandler(); 120 121 List getDependencyTrail(); 122 123 void setDependencyTrail( List dependencyTrail ); 124 125 void setScope( String scope ); 126 127 VersionRange getVersionRange(); 128 129 void setVersionRange( VersionRange newRange ); 130 131 void selectVersion( String version ); 132 133 void setGroupId( String groupId ); 134 135 void setArtifactId( String artifactId ); 136 137 boolean isSnapshot(); 138 139 void setResolved( boolean resolved ); 140 141 boolean isResolved(); 142 143 void setResolvedVersion( String version ); 144 145 148 void setArtifactHandler( ArtifactHandler handler ); 149 150 boolean isRelease(); 151 152 void setRelease( boolean release ); 153 154 List getAvailableVersions(); 155 156 void setAvailableVersions( List versions ); 157 158 boolean isOptional(); 159 160 void setOptional( boolean optional ); 161 162 ArtifactVersion getSelectedVersion() 163 throws OverConstrainedVersionException; 164 165 boolean isSelectedVersionKnown() 166 throws OverConstrainedVersionException; 167 } | Popular Tags |