1 | |
package org.apache.maven.plugin.assembly.archive; |
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.io.IOException; |
24 | |
import java.io.StringReader; |
25 | |
import java.lang.reflect.InvocationTargetException; |
26 | |
import java.lang.reflect.Method; |
27 | |
import java.util.ArrayList; |
28 | |
import java.util.Iterator; |
29 | |
import java.util.List; |
30 | |
import java.util.Map; |
31 | |
|
32 | |
import org.apache.maven.plugin.DebugConfigurationListener; |
33 | |
import org.apache.maven.plugin.assembly.AssemblerConfigurationSource; |
34 | |
import org.apache.maven.plugin.assembly.AssemblyContext; |
35 | |
import org.apache.maven.plugin.assembly.DefaultAssemblyContext; |
36 | |
import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException; |
37 | |
import org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver; |
38 | |
import org.apache.maven.plugin.assembly.archive.phase.AssemblyArchiverPhase; |
39 | |
import org.apache.maven.plugin.assembly.artifact.DependencyResolutionException; |
40 | |
import org.apache.maven.plugin.assembly.artifact.DependencyResolver; |
41 | |
import org.apache.maven.plugin.assembly.filter.ComponentsXmlArchiverFileFilter; |
42 | |
import org.apache.maven.plugin.assembly.filter.ContainerDescriptorHandler; |
43 | |
import org.apache.maven.plugin.assembly.format.AssemblyFormattingException; |
44 | |
import org.apache.maven.plugin.assembly.interpolation.AssemblyExpressionEvaluator; |
45 | |
import org.apache.maven.plugin.assembly.model.Assembly; |
46 | |
import org.apache.maven.plugin.assembly.model.ContainerDescriptorHandlerConfig; |
47 | |
import org.apache.maven.plugin.assembly.utils.AssemblyFileUtils; |
48 | |
import org.apache.maven.plugin.assembly.utils.AssemblyFormatUtils; |
49 | |
import org.codehaus.plexus.PlexusConstants; |
50 | |
import org.codehaus.plexus.PlexusContainer; |
51 | |
import org.codehaus.plexus.archiver.ArchiveFinalizer; |
52 | |
import org.codehaus.plexus.archiver.Archiver; |
53 | |
import org.codehaus.plexus.archiver.ArchiverException; |
54 | |
import org.codehaus.plexus.archiver.filters.JarSecurityFileSelector; |
55 | |
import org.codehaus.plexus.archiver.jar.JarArchiver; |
56 | |
import org.codehaus.plexus.archiver.manager.ArchiverManager; |
57 | |
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; |
58 | |
import org.codehaus.plexus.archiver.tar.TarArchiver; |
59 | |
import org.codehaus.plexus.archiver.tar.TarLongFileMode; |
60 | |
import org.codehaus.plexus.archiver.war.WarArchiver; |
61 | |
import org.codehaus.plexus.archiver.zip.AbstractZipArchiver; |
62 | |
import org.codehaus.plexus.component.annotations.Component; |
63 | |
import org.codehaus.plexus.component.annotations.Requirement; |
64 | |
import org.codehaus.plexus.component.configurator.ComponentConfigurationException; |
65 | |
import org.codehaus.plexus.component.configurator.ComponentConfigurator; |
66 | |
import org.codehaus.plexus.component.configurator.ConfigurationListener; |
67 | |
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; |
68 | |
import org.codehaus.plexus.component.repository.exception.ComponentLookupException; |
69 | |
import org.codehaus.plexus.components.io.fileselectors.FileSelector; |
70 | |
import org.codehaus.plexus.configuration.PlexusConfiguration; |
71 | |
import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; |
72 | |
import org.codehaus.plexus.context.Context; |
73 | |
import org.codehaus.plexus.context.ContextException; |
74 | |
import org.codehaus.plexus.logging.AbstractLogEnabled; |
75 | |
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; |
76 | |
import org.codehaus.plexus.util.xml.Xpp3Dom; |
77 | |
import org.codehaus.plexus.util.xml.Xpp3DomBuilder; |
78 | |
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; |
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
|
87 | |
|
88 | |
@Component( role = AssemblyArchiver.class ) |
89 | |
public class DefaultAssemblyArchiver |
90 | |
extends AbstractLogEnabled |
91 | |
implements AssemblyArchiver, Contextualizable |
92 | |
{ |
93 | |
|
94 | |
@Requirement |
95 | |
private ArchiverManager archiverManager; |
96 | |
|
97 | |
@Requirement |
98 | |
private DependencyResolver dependencyResolver; |
99 | |
|
100 | |
@Requirement( role = AssemblyArchiverPhase.class ) |
101 | |
private List<AssemblyArchiverPhase> assemblyPhases; |
102 | |
|
103 | |
@Requirement( role = ContainerDescriptorHandler.class ) |
104 | |
private Map<String, ContainerDescriptorHandler> containerDescriptorHandlers; |
105 | |
|
106 | |
private PlexusContainer container; |
107 | |
|
108 | |
public DefaultAssemblyArchiver() |
109 | 0 | { |
110 | |
|
111 | 0 | } |
112 | |
|
113 | |
|
114 | |
protected DefaultAssemblyArchiver( final ArchiverManager archiverManager, final DependencyResolver resolver, |
115 | |
final List<AssemblyArchiverPhase> assemblyPhases ) |
116 | 33 | { |
117 | 33 | this.archiverManager = archiverManager; |
118 | 33 | dependencyResolver = resolver; |
119 | 33 | this.assemblyPhases = assemblyPhases; |
120 | 33 | } |
121 | |
|
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
|
127 | |
|
128 | |
|
129 | |
|
130 | |
|
131 | |
|
132 | |
|
133 | |
|
134 | |
|
135 | |
public File createArchive(final Assembly assembly, final String fullName, final String format, |
136 | |
final AssemblerConfigurationSource configSource, boolean recompressZippedFiles) |
137 | |
throws ArchiveCreationException, AssemblyFormattingException, InvalidAssemblerConfigurationException |
138 | |
{ |
139 | 6 | validate( assembly ); |
140 | |
|
141 | 3 | String filename = fullName; |
142 | 3 | if ( !configSource.isIgnoreDirFormatExtensions() || !format.startsWith( "dir" ) ) |
143 | |
{ |
144 | 3 | filename += "." + format; |
145 | |
} |
146 | |
|
147 | 3 | AssemblyFileUtils.verifyTempDirectoryAvailability( configSource.getTemporaryRootDirectory(), getLogger() ); |
148 | |
|
149 | 3 | final File outputDirectory = configSource.getOutputDirectory(); |
150 | |
|
151 | 3 | final File destFile = new File( outputDirectory, filename ); |
152 | |
|
153 | |
try |
154 | |
{ |
155 | 3 | final String finalName = configSource.getFinalName(); |
156 | 3 | final String specifiedBasedir = assembly.getBaseDirectory(); |
157 | |
|
158 | 3 | String basedir = finalName; |
159 | |
|
160 | 3 | if ( specifiedBasedir != null ) |
161 | |
{ |
162 | 0 | basedir = |
163 | |
AssemblyFormatUtils.getOutputDirectory( specifiedBasedir, configSource.getProject(), null, |
164 | |
finalName, configSource ); |
165 | |
} |
166 | |
|
167 | 3 | final List<ContainerDescriptorHandler> containerHandlers = |
168 | |
selectContainerDescriptorHandlers( assembly.getContainerDescriptorHandlers(), configSource ); |
169 | |
|
170 | 3 | final Archiver archiver = |
171 | |
createArchiver( format, assembly.isIncludeBaseDirectory(), basedir, configSource, containerHandlers, recompressZippedFiles); |
172 | |
|
173 | 3 | archiver.setDestFile( destFile ); |
174 | |
|
175 | 3 | final AssemblyContext context = new DefaultAssemblyContext(); |
176 | |
|
177 | 3 | dependencyResolver.resolve( assembly, configSource, context ); |
178 | |
|
179 | 3 | for ( final Iterator<AssemblyArchiverPhase> phaseIterator = assemblyPhases.iterator(); phaseIterator.hasNext(); ) |
180 | |
{ |
181 | 3 | final AssemblyArchiverPhase phase = phaseIterator.next(); |
182 | |
|
183 | 3 | phase.execute( assembly, archiver, configSource, context ); |
184 | 3 | } |
185 | |
|
186 | 3 | archiver.createArchive(); |
187 | |
} |
188 | 0 | catch ( final ArchiverException e ) |
189 | |
{ |
190 | 0 | throw new ArchiveCreationException( "Error creating assembly archive " + assembly.getId() + ": " |
191 | |
+ e.getMessage(), e ); |
192 | |
} |
193 | 0 | catch ( final IOException e ) |
194 | |
{ |
195 | 0 | throw new ArchiveCreationException( "Error creating assembly archive " + assembly.getId() + ": " |
196 | |
+ e.getMessage(), e ); |
197 | |
} |
198 | 0 | catch ( final NoSuchArchiverException e ) |
199 | |
{ |
200 | 0 | throw new ArchiveCreationException( "Unable to obtain archiver for extension '" + format |
201 | |
+ "', for assembly: '" + assembly.getId() + "'", e ); |
202 | |
} |
203 | 0 | catch ( final DependencyResolutionException e ) |
204 | |
{ |
205 | 0 | throw new ArchiveCreationException( "Unable to resolve dependencies for assembly '" + assembly.getId() |
206 | |
+ "'", e ); |
207 | 3 | } |
208 | |
|
209 | 3 | return destFile; |
210 | |
} |
211 | |
|
212 | |
private void validate( final Assembly assembly ) |
213 | |
throws InvalidAssemblerConfigurationException |
214 | |
{ |
215 | 6 | if ( assembly.getId() == null || assembly.getId().trim().length() < 1 ) |
216 | |
{ |
217 | 3 | throw new InvalidAssemblerConfigurationException( "Assembly ID must be present and non-empty." ); |
218 | |
} |
219 | 3 | } |
220 | |
|
221 | |
private List<ContainerDescriptorHandler> selectContainerDescriptorHandlers( List<ContainerDescriptorHandlerConfig> requestedContainerDescriptorHandlers, |
222 | |
final AssemblerConfigurationSource configSource ) |
223 | |
throws InvalidAssemblerConfigurationException |
224 | |
{ |
225 | 3 | getLogger().debug( "All known ContainerDescriptorHandler components: " |
226 | |
+ ( containerDescriptorHandlers == null ? "none; map is null." : "" |
227 | |
+ containerDescriptorHandlers.keySet() ) ); |
228 | |
|
229 | 3 | if ( requestedContainerDescriptorHandlers == null ) |
230 | |
{ |
231 | 0 | requestedContainerDescriptorHandlers = new ArrayList<ContainerDescriptorHandlerConfig>(); |
232 | |
} |
233 | |
|
234 | 3 | final List<ContainerDescriptorHandler> handlers = new ArrayList<ContainerDescriptorHandler>(); |
235 | 3 | final List<String> hints = new ArrayList<String>(); |
236 | |
|
237 | 3 | if ( ( requestedContainerDescriptorHandlers != null ) && !requestedContainerDescriptorHandlers.isEmpty() ) |
238 | |
{ |
239 | 0 | for ( final Iterator<ContainerDescriptorHandlerConfig> it = requestedContainerDescriptorHandlers.iterator(); it.hasNext(); ) |
240 | |
{ |
241 | 0 | final ContainerDescriptorHandlerConfig config = it.next(); |
242 | |
|
243 | 0 | final String hint = config.getHandlerName(); |
244 | 0 | final ContainerDescriptorHandler handler = containerDescriptorHandlers.get( hint ); |
245 | |
|
246 | 0 | if ( handler == null ) |
247 | |
{ |
248 | 0 | throw new InvalidAssemblerConfigurationException( |
249 | |
"Cannot find ContainerDescriptorHandler with hint: " |
250 | |
+ hint ); |
251 | |
} |
252 | |
|
253 | 0 | getLogger().debug( "Found container descriptor handler with hint: " + hint + " (component: " + handler |
254 | |
+ ")" ); |
255 | |
|
256 | 0 | if ( config.getConfiguration() != null ) |
257 | |
{ |
258 | 0 | getLogger().debug( "Configuring handler with:\n\n" + config.getConfiguration() + "\n\n" ); |
259 | |
|
260 | 0 | configureContainerDescriptorHandler( handler, (Xpp3Dom) config.getConfiguration(), configSource ); |
261 | |
} |
262 | |
|
263 | 0 | handlers.add( handler ); |
264 | 0 | hints.add( hint ); |
265 | 0 | } |
266 | |
} |
267 | |
|
268 | 3 | if ( !hints.contains( "plexus" ) ) |
269 | |
{ |
270 | 3 | handlers.add( new ComponentsXmlArchiverFileFilter() ); |
271 | |
} |
272 | |
|
273 | 3 | return handlers; |
274 | |
} |
275 | |
|
276 | |
|
277 | |
|
278 | |
|
279 | |
|
280 | |
|
281 | |
|
282 | |
|
283 | |
|
284 | |
|
285 | |
|
286 | |
|
287 | |
|
288 | |
|
289 | |
protected Archiver createArchiver(final String format, final boolean includeBaseDir, final String finalName, |
290 | |
final AssemblerConfigurationSource configSource, |
291 | |
final List<ContainerDescriptorHandler> containerHandlers, boolean recompressZippedFiles) |
292 | |
throws ArchiverException, NoSuchArchiverException |
293 | |
{ |
294 | |
Archiver archiver; |
295 | 15 | if ( format.startsWith( "tar" ) ) |
296 | |
{ |
297 | 3 | archiver = createTarArchiver( format, configSource.getTarLongFileMode() ); |
298 | |
} |
299 | 12 | else if ( "war".equals( format ) ) |
300 | |
{ |
301 | 3 | archiver = createWarArchiver(); |
302 | |
} |
303 | |
else |
304 | |
{ |
305 | 9 | archiver = archiverManager.getArchiver( format ); |
306 | |
} |
307 | |
|
308 | 15 | if (archiver instanceof AbstractZipArchiver) |
309 | |
{ |
310 | 6 | ((AbstractZipArchiver)archiver).setRecompressAddedZips(recompressZippedFiles); |
311 | |
} |
312 | |
|
313 | 15 | final List<FileSelector> extraSelectors = new ArrayList<FileSelector>(); |
314 | 15 | final List<ArchiveFinalizer> extraFinalizers = new ArrayList<ArchiveFinalizer>(); |
315 | 15 | if ( archiver instanceof JarArchiver ) |
316 | |
{ |
317 | 3 | extraSelectors.add( new JarSecurityFileSelector() ); |
318 | |
|
319 | 3 | extraFinalizers.add( new ManifestCreationFinalizer( configSource.getMavenSession(), |
320 | |
configSource.getProject(), |
321 | |
configSource.getJarArchiveConfiguration() ) ); |
322 | |
|
323 | |
} |
324 | |
|
325 | 15 | if ( configSource.getArchiverConfig() != null ) |
326 | |
{ |
327 | 3 | configureArchiver( archiver, configSource ); |
328 | |
} |
329 | |
|
330 | 15 | String prefix = ""; |
331 | 15 | if ( includeBaseDir ) |
332 | |
{ |
333 | 3 | prefix = finalName; |
334 | |
} |
335 | |
|
336 | 15 | archiver = |
337 | |
new AssemblyProxyArchiver( prefix, archiver, containerHandlers, extraSelectors, extraFinalizers, |
338 | |
configSource.getWorkingDirectory(), getLogger(), configSource.isDryRun() ); |
339 | |
|
340 | 15 | archiver.setUseJvmChmod( configSource.isUpdateOnly() ); |
341 | 15 | archiver.setIgnorePermissions( configSource.isIgnorePermissions() ); |
342 | 15 | archiver.setForced( !configSource.isUpdateOnly() ); |
343 | |
|
344 | 15 | return archiver; |
345 | |
} |
346 | |
|
347 | |
private void configureContainerDescriptorHandler( final ContainerDescriptorHandler handler, final Xpp3Dom config, |
348 | |
final AssemblerConfigurationSource configSource ) |
349 | |
throws InvalidAssemblerConfigurationException |
350 | |
{ |
351 | 0 | getLogger().debug( "Configuring handler: '" + handler.getClass().getName() + "' -->" ); |
352 | |
|
353 | |
try |
354 | |
{ |
355 | 0 | configureComponent( handler, config, configSource ); |
356 | |
} |
357 | 0 | catch ( final ComponentConfigurationException e ) |
358 | |
{ |
359 | 0 | throw new InvalidAssemblerConfigurationException( "Failed to configure handler: " |
360 | |
+ handler.getClass().getName(), e ); |
361 | |
} |
362 | 0 | catch ( final ComponentLookupException e ) |
363 | |
{ |
364 | 0 | throw new InvalidAssemblerConfigurationException( "Failed to lookup configurator for setup of handler: " |
365 | |
+ handler.getClass().getName(), e ); |
366 | 0 | } |
367 | |
|
368 | 0 | getLogger().debug( "-- end configuration --" ); |
369 | 0 | } |
370 | |
|
371 | |
private void configureArchiver( final Archiver archiver, final AssemblerConfigurationSource configSource ) |
372 | |
throws ArchiverException |
373 | |
{ |
374 | |
Xpp3Dom config; |
375 | |
try |
376 | |
{ |
377 | 3 | config = Xpp3DomBuilder.build( new StringReader( configSource.getArchiverConfig() ) ); |
378 | |
} |
379 | 0 | catch ( final XmlPullParserException e ) |
380 | |
{ |
381 | 0 | throw new ArchiverException( |
382 | |
"Failed to parse archiver configuration for: " + archiver.getClass().getName(), |
383 | |
e ); |
384 | |
} |
385 | 0 | catch ( final IOException e ) |
386 | |
{ |
387 | 0 | throw new ArchiverException( |
388 | |
"Failed to parse archiver configuration for: " + archiver.getClass().getName(), |
389 | |
e ); |
390 | 3 | } |
391 | |
|
392 | 3 | getLogger().debug( "Configuring archiver: '" + archiver.getClass().getName() + "' -->" ); |
393 | |
|
394 | |
try |
395 | |
{ |
396 | 3 | configureComponent( archiver, config, configSource ); |
397 | |
} |
398 | 0 | catch ( final ComponentConfigurationException e ) |
399 | |
{ |
400 | 0 | throw new ArchiverException( "Failed to configure archiver: " + archiver.getClass().getName(), e ); |
401 | |
} |
402 | 0 | catch ( final ComponentLookupException e ) |
403 | |
{ |
404 | 0 | throw new ArchiverException( "Failed to lookup configurator for setup of archiver: " |
405 | |
+ archiver.getClass().getName(), e ); |
406 | 3 | } |
407 | |
|
408 | 3 | getLogger().debug( "-- end configuration --" ); |
409 | 3 | } |
410 | |
|
411 | |
private void configureComponent( final Object component, final Xpp3Dom config, |
412 | |
final AssemblerConfigurationSource configSource ) |
413 | |
throws ComponentLookupException, ComponentConfigurationException |
414 | |
{ |
415 | 3 | final ComponentConfigurator configurator = |
416 | |
(ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE, "basic" ); |
417 | |
|
418 | 3 | final ConfigurationListener listener = new DebugConfigurationListener( getLogger() ); |
419 | |
|
420 | 3 | final ExpressionEvaluator expressionEvaluator = new AssemblyExpressionEvaluator( configSource ); |
421 | |
|
422 | 3 | final XmlPlexusConfiguration configuration = new XmlPlexusConfiguration( config ); |
423 | |
|
424 | 3 | final Object[] containerRealm = getContainerRealm(); |
425 | |
|
426 | |
|
427 | |
|
428 | |
|
429 | |
|
430 | |
try |
431 | |
{ |
432 | 3 | final Method configureComponent = |
433 | |
ComponentConfigurator.class.getMethod( "configureComponent", new Class[] { Object.class, |
434 | |
PlexusConfiguration.class, ExpressionEvaluator.class, (Class<?>) containerRealm[1], |
435 | |
ConfigurationListener.class } ); |
436 | |
|
437 | 3 | configureComponent.invoke( configurator, new Object[] { component, configuration, expressionEvaluator, |
438 | |
containerRealm[0], listener } ); |
439 | |
} |
440 | 0 | catch ( final NoSuchMethodException e ) |
441 | |
{ |
442 | 0 | throw new RuntimeException( e ); |
443 | |
} |
444 | 0 | catch ( final IllegalAccessException e ) |
445 | |
{ |
446 | 0 | throw new RuntimeException( e ); |
447 | |
} |
448 | 0 | catch ( final InvocationTargetException e ) |
449 | |
{ |
450 | 0 | if ( e.getCause() instanceof ComponentConfigurationException ) |
451 | |
{ |
452 | 0 | throw (ComponentConfigurationException) e.getCause(); |
453 | |
} |
454 | 0 | throw new RuntimeException( e.getCause() ); |
455 | 3 | } |
456 | 3 | } |
457 | |
|
458 | |
private Object[] getContainerRealm() |
459 | |
{ |
460 | |
|
461 | |
|
462 | |
|
463 | |
|
464 | |
try |
465 | |
{ |
466 | 3 | final Method getContainerRealm = container.getClass().getMethod( "getContainerRealm" ); |
467 | 3 | return new Object[] { getContainerRealm.invoke( container ), getContainerRealm.getReturnType() }; |
468 | |
} |
469 | 0 | catch ( final NoSuchMethodException e ) |
470 | |
{ |
471 | 0 | throw new RuntimeException( e ); |
472 | |
} |
473 | 0 | catch ( final IllegalAccessException e ) |
474 | |
{ |
475 | 0 | throw new RuntimeException( e ); |
476 | |
} |
477 | 0 | catch ( final InvocationTargetException e ) |
478 | |
{ |
479 | 0 | throw new RuntimeException( e.getCause() ); |
480 | |
} |
481 | |
} |
482 | |
|
483 | |
protected Archiver createWarArchiver() |
484 | |
throws NoSuchArchiverException |
485 | |
{ |
486 | 6 | final WarArchiver warArchiver = (WarArchiver) archiverManager.getArchiver( "war" ); |
487 | 6 | warArchiver.setIgnoreWebxml( false ); |
488 | |
|
489 | 6 | return warArchiver; |
490 | |
} |
491 | |
|
492 | |
protected Archiver createTarArchiver( final String format, final String tarLongFileMode ) |
493 | |
throws NoSuchArchiverException, ArchiverException |
494 | |
{ |
495 | 15 | final TarArchiver tarArchiver = (TarArchiver) archiverManager.getArchiver( "tar" ); |
496 | 15 | final int index = format.indexOf( '.' ); |
497 | 15 | if ( index >= 0 ) |
498 | |
{ |
499 | |
|
500 | |
|
501 | 9 | final TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod(); |
502 | |
|
503 | |
|
504 | 9 | final String compression = format.substring( index + 1 ); |
505 | 9 | if ( "gz".equals( compression ) ) |
506 | |
{ |
507 | 3 | tarCompressionMethod.setValue( "gzip" ); |
508 | |
} |
509 | 6 | else if ( "bz2".equals( compression ) ) |
510 | |
{ |
511 | 3 | tarCompressionMethod.setValue( "bzip2" ); |
512 | |
} |
513 | |
else |
514 | |
{ |
515 | |
|
516 | 3 | throw new IllegalArgumentException( "Unknown compression format: " + compression ); |
517 | |
} |
518 | 6 | tarArchiver.setCompression( tarCompressionMethod ); |
519 | |
} |
520 | |
|
521 | 12 | final TarLongFileMode tarFileMode = new TarLongFileMode(); |
522 | |
|
523 | 12 | tarFileMode.setValue( tarLongFileMode ); |
524 | |
|
525 | 12 | tarArchiver.setLongfile( tarFileMode ); |
526 | |
|
527 | 12 | return tarArchiver; |
528 | |
} |
529 | |
|
530 | |
public void contextualize( final Context context ) |
531 | |
throws ContextException |
532 | |
{ |
533 | 0 | container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); |
534 | 0 | } |
535 | |
|
536 | |
protected void setContainer( final PlexusContainer container ) |
537 | |
{ |
538 | 33 | this.container = container; |
539 | 33 | } |
540 | |
|
541 | |
} |