All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.bnd.maven.plugin.BndMavenPackagingPlugin Maven / Gradle / Ivy

Go to download

This maven plugin is used to build OSGi bundles using the bnd tool for generating MANIFEST.MF and other OSGi-specific artifacts.

The newest version!
package aQute.bnd.maven.plugin;

import java.io.File;
import java.util.Optional;

import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;

/**
 * Generate OSGi metadata for the target classes and
 * package into a jar.
 * 

* This goal has the default phase of "package". */ @Mojo(name = "jar", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class BndMavenPackagingPlugin extends BndMavenPlugin { /** * The classifier to use for the generated artifact. */ @Parameter String classifier; /** * The directory where this plugin will store the generated artifact. */ @Parameter(defaultValue = "${project.build.directory}") File outputDir; @Override public Optional getClassifier() { return Optional.ofNullable(classifier) .map(String::trim) .filter(s -> !s.isEmpty()); } @Override public Optional getType() { return Optional.of("jar"); } @Override public File getOutputDir() { return outputDir; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy