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 import org.codehaus.plexus.component.annotations.Component;
23
24
25
26
27
28 @Component( role = ArtifactHandler.class )
29 public class DefaultArtifactHandler
30 implements ArtifactHandler
31 {
32 private String extension;
33
34 private String type;
35
36 private String classifier;
37
38 private String directory;
39
40 private String packaging;
41
42 private boolean includesDependencies;
43
44 private String language;
45
46 private boolean addedToClasspath;
47
48 public DefaultArtifactHandler()
49 {
50 }
51
52 public DefaultArtifactHandler( String type )
53 {
54 this.type = type;
55 }
56
57 public String getExtension()
58 {
59 if ( extension == null )
60 {
61 extension = type;
62 }
63 return extension;
64 }
65
66 public void setExtension( String extension )
67 {
68 this.extension = extension;
69 }
70
71 public String getType()
72 {
73 return type;
74 }
75
76 public String getClassifier()
77 {
78 return classifier;
79 }
80
81 public String getDirectory()
82 {
83 if ( directory == null )
84 {
85 directory = getPackaging() + "s";
86 }
87 return directory;
88 }
89
90 public String getPackaging()
91 {
92 if ( packaging == null )
93 {
94 packaging = type;
95 }
96 return packaging;
97 }
98
99 public boolean isIncludesDependencies()
100 {
101 return includesDependencies;
102 }
103
104 public void setIncludesDependencies( boolean includesDependencies )
105 {
106 this.includesDependencies = includesDependencies;
107 }
108
109 public String getLanguage()
110 {
111 if ( language == null )
112 {
113 language = "none";
114 }
115
116 return language;
117 }
118
119 public void setLanguage( String language )
120 {
121 this.language = language;
122 }
123
124 public boolean isAddedToClasspath()
125 {
126 return addedToClasspath;
127 }
128
129 public void setAddedToClasspath( boolean addedToClasspath )
130 {
131 this.addedToClasspath = addedToClasspath;
132 }
133
134 }