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