1 package org.apache.maven.artifact.handler; 2 3 18 19 23 public class DefaultArtifactHandler 24 implements ArtifactHandler 25 { 26 private String extension; 27 28 private String type; 29 30 private String classifier; 31 32 private String directory; 33 34 private String packaging; 35 36 private boolean includesDependencies; 37 38 private String language; 39 40 private boolean addedToClasspath; 41 42 public DefaultArtifactHandler() 43 { 44 } 45 46 public DefaultArtifactHandler( String type ) 47 { 48 this.type = type; 49 } 50 51 public String getExtension() 52 { 53 if ( extension == null ) 54 { 55 extension = type; 56 } 57 return extension; 58 } 59 60 public String getType() 61 { 62 return type; 63 } 64 65 public String getClassifier() 66 { 67 return classifier; 68 } 69 70 public String getDirectory() 71 { 72 if ( directory == null ) 73 { 74 directory = getPackaging() + "s"; 75 } 76 return directory; 77 } 78 79 public String getPackaging() 80 { 81 if ( packaging == null ) 82 { 83 packaging = type; 84 } 85 return packaging; 86 } 87 88 public boolean isIncludesDependencies() 89 { 90 return includesDependencies; 91 } 92 93 public String getLanguage() 94 { 95 if ( language == null ) 96 { 97 language = "none"; 98 } 99 100 return language; 101 } 102 103 public boolean isAddedToClasspath() 104 { 105 return addedToClasspath; 106 } 107 } 108 | Popular Tags |