org.apache.maven.archiver.MavenArchiveConfiguration Java Examples

The following examples show how to use org.apache.maven.archiver.MavenArchiveConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PackageMojo.java    From helidon-build-tools with Apache License 2.0 6 votes vote down vote up
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    if (siteArchiveSkip) {
        getLog().info("processing is skipped.");
        return;
    }
    getLog().info("Assembling site JAR [" + project.getArtifactId() + "]");

    final File jarFile = new File(siteArchiveOutputDirectory, siteArchiveFinalName + ".jar");
    final MavenArchiver mvnArchiver = new MavenArchiver();
    mvnArchiver.setArchiver(jarArchiver);
    mvnArchiver.setOutputFile(jarFile);
    mvnArchiver.getArchiver().addDirectory(siteOutputDirectory, getIncludes(), getExcludes());

    try {
        mvnArchiver.createArchive(session, project, new MavenArchiveConfiguration());
    } catch (ManifestException
            | IOException
            | DependencyResolutionRequiredException ex) {
        throw new MojoExecutionException("Error assembling site archive", ex);
    }

    project.getArtifact().setFile(jarFile);
}
 
Example #2
Source File: MojoParameters.java    From jkube with Eclipse Public License 2.0 5 votes vote down vote up
public MojoParameters(MavenSession session, MavenProject project, MavenArchiveConfiguration archive, MavenFileFilter mavenFileFilter,
                      MavenReaderFilter mavenFilterReader, Settings settings, String sourceDirectory, String outputDirectory, List<MavenProject> reactorProjects) {
    this.archive = archive;
    this.session = session;
    this.mavenFileFilter = mavenFileFilter;
    this.mavenFilterReader = mavenFilterReader;
    this.project = project;
    this.settings = settings;

    this.sourceDirectory = sourceDirectory;
    this.outputDirectory = outputDirectory;

    this.reactorProjects = reactorProjects;
}
 
Example #3
Source File: MojoParameters.java    From docker-maven-plugin with Apache License 2.0 5 votes vote down vote up
public MojoParameters(MavenSession session, MavenProject project, MavenArchiveConfiguration archive, MavenFileFilter mavenFileFilter,
        MavenReaderFilter mavenFilterReader, Settings settings, String sourceDirectory, String outputDirectory, List<MavenProject> reactorProjects) {
    this.archive = archive;
    this.session = session;
    this.mavenFileFilter = mavenFileFilter;
    this.mavenFilterReader = mavenFilterReader;
    this.project = project;
    this.settings = settings;

    this.sourceDirectory = sourceDirectory;
    this.outputDirectory = outputDirectory;
    
    this.reactorProjects = reactorProjects;
}
 
Example #4
Source File: MojoParameters.java    From jkube with Eclipse Public License 2.0 4 votes vote down vote up
public MavenArchiveConfiguration getArchiveConfiguration() {
    return archive;
}
 
Example #5
Source File: DockerAssemblyConfigurationSource.java    From docker-maven-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public MavenArchiveConfiguration getJarArchiveConfiguration() {
    return params.getArchiveConfiguration();
}
 
Example #6
Source File: MojoParameters.java    From docker-maven-plugin with Apache License 2.0 4 votes vote down vote up
public MavenArchiveConfiguration getArchiveConfiguration() {
    return archive;
}