Search in sources :

Example 11 with InvalidAssemblerConfigurationException

use of org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException in project maven-plugins by apache.

the class DefaultAssemblyReader method includeSiteInAssembly.

@Override
public void includeSiteInAssembly(final Assembly assembly, final AssemblerConfigurationSource configSource) throws InvalidAssemblerConfigurationException {
    final File siteDirectory = configSource.getSiteDirectory();
    if (!siteDirectory.exists()) {
        throw new InvalidAssemblerConfigurationException("site did not exist in the target directory - " + "please run site:site before creating the assembly");
    }
    getLogger().info("Adding site directory to assembly : " + siteDirectory);
    final FileSet siteFileSet = new FileSet();
    siteFileSet.setDirectory(siteDirectory.getPath());
    siteFileSet.setOutputDirectory("/site");
    assembly.addFileSet(siteFileSet);
}
Also used : FileSet(org.apache.maven.plugins.assembly.model.FileSet) InvalidAssemblerConfigurationException(org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException) File(java.io.File)

Aggregations

InvalidAssemblerConfigurationException (org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException)11 File (java.io.File)4 ArrayList (java.util.ArrayList)3 Artifact (org.apache.maven.artifact.Artifact)3 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)3 ArchiveCreationException (org.apache.maven.plugins.assembly.archive.ArchiveCreationException)3 AssemblyFormattingException (org.apache.maven.plugins.assembly.format.AssemblyFormattingException)3 Assembly (org.apache.maven.plugins.assembly.model.Assembly)3 MavenProject (org.apache.maven.project.MavenProject)3 FileSet (org.apache.maven.plugins.assembly.model.FileSet)2 AssemblyConfiguration (io.fabric8.maven.docker.config.AssemblyConfiguration)1 AssemblyMode (io.fabric8.maven.docker.config.AssemblyMode)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 AndArtifactFilter (org.apache.maven.artifact.resolver.filter.AndArtifactFilter)1 ArtifactFilter (org.apache.maven.artifact.resolver.filter.ArtifactFilter)1 MojoFailureException (org.apache.maven.plugin.MojoFailureException)1