1 package org.apache.maven.plugins.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.plugins.assembly.AssemblerConfigurationSource; 23 import org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException; 24 import org.apache.maven.plugins.assembly.format.AssemblyFormattingException; 25 import org.apache.maven.plugins.assembly.model.Assembly; 26 27 import java.io.File; 28 import java.util.Date; 29 30 /** 31 * Creates an archive 32 * 33 * 34 */ 35 public interface AssemblyArchiver 36 { 37 String ROLE = AssemblyArchiver.class.getName(); 38 39 /** 40 * Create the assembly archive. Generally: 41 * <ol> 42 * <li>Setup any directory structures for temporary files</li> 43 * <li>Calculate the output directory/file for the assembly</li> 44 * <li>Setup any handler components for special descriptor files we may encounter</li> 45 * <li>Lookup and configure the {@link org.codehaus.plexus.archiver.Archiver} to be used</li> 46 * <li>Determine what, if any, dependency resolution will be required, and resolve any dependency-version conflicts 47 * up front to produce a managed-version map for the whole assembly process.</li> 48 * <li>Iterate through the available {@link org.apache.maven.plugins.assembly.archive.phase.AssemblyArchiverPhase} 49 * instances, executing each to handle a different 50 * top-level section of the assembly descriptor, if that section is present.</li> 51 * </ol> 52 * 53 * @param assembly The {@link Assembly} 54 * @param fullName The full name. 55 * @param format The format. 56 * @param configSource The {@link org.apache.maven.plugins.assembly.AssemblerConfigurationSource} 57 * @param recompressZippedFiles recompress zipped files. 58 * @param mergeManifestMode How to handle already existing Manifest files (skip, merge, mergewithoutmain) 59 * @param sourceDateEpoch Timestamp for reproducible archive entries 60 * @return The resulting archive file. 61 * @throws ArchiveCreationException when creation fails 62 * @throws org.apache.maven.plugins.assembly.format.AssemblyFormattingException when formatting fails 63 * @throws org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException when the configuration is bad 64 */ 65 File createArchive( Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource, 66 boolean recompressZippedFiles, String mergeManifestMode, Date sourceDateEpoch ) 67 throws ArchiveCreationException, AssemblyFormattingException, InvalidAssemblerConfigurationException; 68 }