1 package org.apache.maven.archiver;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.ArrayList;
24 import java.util.HashMap;
25 import java.util.List;
26 import java.util.Map;
27
28
29
30
31
32
33
34
35 public class MavenArchiveConfiguration
36 {
37 private boolean compress = true;
38
39 private boolean recompressAddedZips = true;
40
41 private boolean index;
42
43 private boolean addMavenDescriptor = true;
44
45 private File manifestFile;
46
47 private ManifestConfiguration manifest;
48
49 private Map<String, String> manifestEntries = new HashMap<String, String>();
50
51 private List<ManifestSection> manifestSections = new ArrayList<ManifestSection>();
52
53
54
55
56 private boolean forced = true;
57
58
59
60
61 private File pomPropertiesFile;
62
63 public boolean isCompress()
64 {
65 return compress;
66 }
67
68 public boolean isRecompressAddedZips()
69 {
70 return recompressAddedZips;
71 }
72
73 public void setRecompressAddedZips( boolean recompressAddedZips )
74 {
75 this.recompressAddedZips = recompressAddedZips;
76 }
77
78 public boolean isIndex()
79 {
80 return index;
81 }
82
83 public boolean isAddMavenDescriptor()
84 {
85 return addMavenDescriptor;
86 }
87
88 public File getManifestFile()
89 {
90 return manifestFile;
91 }
92
93 public ManifestConfiguration getManifest()
94 {
95 if ( manifest == null )
96 {
97 manifest = new ManifestConfiguration();
98 }
99 return manifest;
100 }
101
102 public void setCompress( boolean compress )
103 {
104 this.compress = compress;
105 }
106
107 public void setIndex( boolean index )
108 {
109 this.index = index;
110 }
111
112 public void setAddMavenDescriptor( boolean addMavenDescriptor )
113 {
114 this.addMavenDescriptor = addMavenDescriptor;
115 }
116
117 public void setManifestFile( File manifestFile )
118 {
119 this.manifestFile = manifestFile;
120 }
121
122 public void setManifest( ManifestConfiguration manifest )
123 {
124 this.manifest = manifest;
125 }
126
127 public void addManifestEntry( String key, String value )
128 {
129 manifestEntries.put( key, value );
130 }
131
132 public void addManifestEntries( Map<String,String> map )
133 {
134 manifestEntries.putAll( map );
135 }
136
137 public boolean isManifestEntriesEmpty()
138 {
139 return manifestEntries.isEmpty();
140 }
141
142 public Map<String, String> getManifestEntries()
143 {
144 return manifestEntries;
145 }
146
147 public void setManifestEntries( Map<String, String> manifestEntries )
148 {
149 this.manifestEntries = manifestEntries;
150 }
151
152 public void addManifestSection( ManifestSection section )
153 {
154 manifestSections.add( section );
155 }
156
157 public void addManifestSections( List<ManifestSection> list )
158 {
159 manifestSections.addAll( list );
160 }
161
162 public boolean isManifestSectionsEmpty()
163 {
164 return manifestSections.isEmpty();
165 }
166
167 public List<ManifestSection> getManifestSections()
168 {
169 return manifestSections;
170 }
171
172 public void setManifestSections( List<ManifestSection> manifestSections )
173 {
174 this.manifestSections = manifestSections;
175 }
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194 public boolean isForced()
195 {
196 return forced;
197 }
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216 public void setForced( boolean forced )
217 {
218 this.forced = forced;
219 }
220
221
222
223
224
225
226
227 public File getPomPropertiesFile()
228 {
229 return pomPropertiesFile;
230 }
231
232
233
234
235
236
237
238 public void setPomPropertiesFile( File pomPropertiesFile )
239 {
240 this.pomPropertiesFile = pomPropertiesFile;
241 }
242 }