@Mojo(name="manifest", requiresDependencyResolution=TEST, threadSafe=true, defaultPhase=PROCESS_CLASSES) public class ManifestPlugin extends BundlePlugin
Modifier and Type | Field and Description |
---|---|
private org.sonatype.plexus.build.incremental.BuildContext |
buildContext |
protected boolean |
rebuildBundle
When true, generate the manifest by rebuilding the full bundle in memory
|
private boolean |
supportIncrementalBuild
When true, manifest generation on incremental builds is supported in IDEs like Eclipse.
|
artifactFactory, artifactResolver, classifier, createDependencyReducedPom, dependencyGraphBuilder, dependencyReducedPomLocation, dumpClasspath, dumpInstructions, excludeDependencies, exportScr, localRepository, m_dependencyGraphBuilder, manifestLocation, mavenProjectBuilder, niceManifest, packaging, project, remoteArtifactRepositories, scrLocation, session, supportedProjectTypes, unpackBundle
Constructor and Description |
---|
ManifestPlugin() |
Modifier and Type | Method and Description |
---|---|
private boolean |
anyJavaSourceFileTouchedSinceLastBuild()
Checks if any *.java file was added, updated or removed since last build in any source directory.
|
static java.lang.String |
calculateExportsFromContents(aQute.bnd.osgi.Jar bundle) |
private boolean |
containsJavaFile(org.codehaus.plexus.util.Scanner scanner) |
protected void |
execute(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph,
java.util.Map<java.lang.String,java.lang.String> instructions,
java.util.Properties properties,
aQute.bnd.osgi.Jar[] classpath) |
private static void |
exportScr(aQute.bnd.osgi.Analyzer analyzer,
aQute.bnd.osgi.Jar jar,
java.io.File scrLocation,
org.sonatype.plexus.build.incremental.BuildContext buildContext,
org.apache.maven.plugin.logging.Log log) |
protected aQute.bnd.osgi.Analyzer |
getAnalyzer(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph,
aQute.bnd.osgi.Jar[] classpath) |
protected aQute.bnd.osgi.Analyzer |
getAnalyzer(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph,
java.util.Map<java.lang.String,java.lang.String> instructions,
java.util.Properties properties,
aQute.bnd.osgi.Jar[] classpath) |
java.util.jar.Manifest |
getManifest(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph,
aQute.bnd.osgi.Jar[] classpath) |
java.util.jar.Manifest |
getManifest(org.apache.maven.project.MavenProject project,
org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph,
java.util.Map<java.lang.String,java.lang.String> instructions,
java.util.Properties properties,
aQute.bnd.osgi.Jar[] classpath,
org.sonatype.plexus.build.incremental.BuildContext buildContext) |
static void |
writeManifest(aQute.bnd.osgi.Analyzer analyzer,
java.io.File outputFile,
boolean niceManifest,
boolean exportScr,
java.io.File scrLocation,
org.sonatype.plexus.build.incremental.BuildContext buildContext,
org.apache.maven.plugin.logging.Log log) |
static void |
writeManifest(java.util.jar.Manifest manifest,
java.io.File outputFile,
boolean niceManifest,
org.sonatype.plexus.build.incremental.BuildContext buildContext,
org.apache.maven.plugin.logging.Log log) |
private static void |
writeSCR(aQute.bnd.osgi.Resource resource,
java.io.File destination,
org.sonatype.plexus.build.incremental.BuildContext buildContext,
org.apache.maven.plugin.logging.Log log) |
addMavenInstructions, addMavenSourcePath, buildDependencyGraph, buildOSGiBundle, convertVersionToOsgi, dumpClasspath, dumpInstructions, dumpManifest, execute, execute, getBase, getBuildDirectory, getBundleName, getClasspath, getDefaultProperties, getEmbeddableArtifacts, getFile, getMaven2OsgiConverter, getMavenResourcePaths, getOptionalPackages, getOSGiBuilder, getOutputDirectory, getProject, includeJava9Fixups, includeMavenResources, isTransitivelyOptional, mergeManifest, mergeMavenManifest, removeTagFromInstruction, reportErrors, sanitize, sanitize, setBuildDirectory, setOutputDirectory, transformDirectives, updateExcludesInDeps
@Parameter(property="rebuildBundle") protected boolean rebuildBundle
@Parameter(property="supportIncrementalBuild") private boolean supportIncrementalBuild
@Component private org.sonatype.plexus.build.incremental.BuildContext buildContext
protected void execute(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph, java.util.Map<java.lang.String,java.lang.String> instructions, java.util.Properties properties, aQute.bnd.osgi.Jar[] classpath) throws org.apache.maven.plugin.MojoExecutionException
execute
in class BundlePlugin
org.apache.maven.plugin.MojoExecutionException
private boolean anyJavaSourceFileTouchedSinceLastBuild()
private boolean containsJavaFile(org.codehaus.plexus.util.Scanner scanner)
public java.util.jar.Manifest getManifest(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph, aQute.bnd.osgi.Jar[] classpath) throws java.io.IOException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException, java.lang.Exception
java.io.IOException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
java.lang.Exception
public java.util.jar.Manifest getManifest(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph, java.util.Map<java.lang.String,java.lang.String> instructions, java.util.Properties properties, aQute.bnd.osgi.Jar[] classpath, org.sonatype.plexus.build.incremental.BuildContext buildContext) throws java.io.IOException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException, java.lang.Exception
java.io.IOException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
java.lang.Exception
private static void exportScr(aQute.bnd.osgi.Analyzer analyzer, aQute.bnd.osgi.Jar jar, java.io.File scrLocation, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws java.lang.Exception
java.lang.Exception
private static void writeSCR(aQute.bnd.osgi.Resource resource, java.io.File destination, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws java.lang.Exception
java.lang.Exception
protected aQute.bnd.osgi.Analyzer getAnalyzer(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph, aQute.bnd.osgi.Jar[] classpath) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException, java.lang.Exception
java.io.IOException
org.apache.maven.plugin.MojoExecutionException
java.lang.Exception
protected aQute.bnd.osgi.Analyzer getAnalyzer(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyGraph, java.util.Map<java.lang.String,java.lang.String> instructions, java.util.Properties properties, aQute.bnd.osgi.Jar[] classpath) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException, java.lang.Exception
java.io.IOException
org.apache.maven.plugin.MojoExecutionException
java.lang.Exception
public static void writeManifest(aQute.bnd.osgi.Analyzer analyzer, java.io.File outputFile, boolean niceManifest, boolean exportScr, java.io.File scrLocation, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws java.lang.Exception
java.lang.Exception
public static void writeManifest(java.util.jar.Manifest manifest, java.io.File outputFile, boolean niceManifest, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws java.io.IOException
java.io.IOException
public static java.lang.String calculateExportsFromContents(aQute.bnd.osgi.Jar bundle)