View Javadoc
1   package org.apache.maven.plugin.assembly.archive;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.maven.plugin.assembly.AssemblerConfigurationSource;
23  import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException;
24  import org.apache.maven.plugin.assembly.format.AssemblyFormattingException;
25  import org.apache.maven.plugin.assembly.model.Assembly;
26  
27  import java.io.File;
28  
29  /**
30   * @version $Id: AssemblyArchiver.java 1632869 2014-10-19 00:19:23Z khmarbaise $
31   */
32  public interface AssemblyArchiver
33  {
34      String ROLE = AssemblyArchiver.class.getName();
35  
36      /**
37       * Create the assembly archive. Generally:
38       * <ol>
39       * <li>Setup any directory structures for temporary files</li>
40       * <li>Calculate the output directory/file for the assembly</li>
41       * <li>Setup any handler components for special descriptor files we may encounter</li>
42       * <li>Lookup and configure the {@link Archiver} to be used</li>
43       * <li>Determine what, if any, dependency resolution will be required, and resolve any dependency-version conflicts
44       * up front to produce a managed-version map for the whole assembly process.</li>
45       * <li>Iterate through the available {@link AssemblyArchiverPhase} instances, executing each to handle a different
46       * top-level section of the assembly descriptor, if that section is present.</li>
47       * </ol>
48       * @param assembly The {@link Assembly}
49       * @param fullName The full name.
50       * @param format The format.
51       * @param configSource The {@link AssemblerConfigurationSource}
52       * @param recompressZippedFiles recompress zipped files.
53       * @return The resulting archive file.
54       * @throws ArchiveCreationException
55       * @throws AssemblyFormattingException
56       * @throws InvalidAssemblerConfigurationException
57       */
58      File createArchive( Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource,
59                          boolean recompressZippedFiles )
60          throws ArchiveCreationException, AssemblyFormattingException, InvalidAssemblerConfigurationException;
61  }