Package aQute.bnd.maven.plugin
Class BndMavenPlugin
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- aQute.bnd.maven.plugin.BndMavenPlugin
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="bnd-process", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE) public class BndMavenPlugin extends org.apache.maven.plugin.AbstractMojo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
BndMavenPlugin.BeanProperties
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
bnd
Bnd instructions for this project specified directly in the pom file.private java.lang.String
bndfile
File path to a bnd file containing bnd instructions for this project.private org.sonatype.plexus.build.incremental.BuildContext
buildContext
private java.io.File
classesDir
private static org.slf4j.Logger
logger
private static java.lang.String
MANIFEST_LAST_MODIFIED
private java.io.File
manifestPath
private static java.lang.String
MARKED_FILES
private org.apache.maven.plugin.MojoExecution
mojoExecution
private static java.lang.String
PACKAGING_POM
private org.apache.maven.project.MavenProject
project
private java.io.File
propertiesFile
private java.util.List<org.apache.maven.model.Resource>
resources
private org.apache.maven.settings.Settings
settings
private boolean
skip
private java.io.File
sourceDir
private java.io.File
targetDir
private static java.lang.String
TSTAMP
-
Constructor Summary
Constructors Constructor Description BndMavenPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
private void
expandJar(Jar jar, java.io.File dir)
private java.io.File
loadProjectProperties(Builder builder, org.apache.maven.project.MavenProject project)
private boolean
manifestOutOfDate()
private void
reportErrorsAndWarnings(Builder builder)
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
MANIFEST_LAST_MODIFIED
private static final java.lang.String MANIFEST_LAST_MODIFIED
- See Also:
- Constant Field Values
-
MARKED_FILES
private static final java.lang.String MARKED_FILES
- See Also:
- Constant Field Values
-
PACKAGING_POM
private static final java.lang.String PACKAGING_POM
- See Also:
- Constant Field Values
-
TSTAMP
private static final java.lang.String TSTAMP
- See Also:
- Constant Field Values
-
targetDir
@Parameter(defaultValue="${project.build.directory}", readonly=true) private java.io.File targetDir
-
sourceDir
@Parameter(defaultValue="${project.build.sourceDirectory}", readonly=true) private java.io.File sourceDir
-
resources
@Parameter(defaultValue="${project.build.resources}", readonly=true) private java.util.List<org.apache.maven.model.Resource> resources
-
classesDir
@Parameter(defaultValue="${project.build.outputDirectory}", readonly=true) private java.io.File classesDir
-
manifestPath
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", readonly=true) private java.io.File manifestPath
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
-
settings
@Parameter(defaultValue="${settings}", readonly=true) private org.apache.maven.settings.Settings settings
-
mojoExecution
@Parameter(defaultValue="${mojoExecution}", readonly=true) private org.apache.maven.plugin.MojoExecution mojoExecution
-
skip
@Parameter(property="bnd.skip", defaultValue="false") private boolean skip
-
bndfile
@Parameter(defaultValue="bnd.bnd") private java.lang.String bndfile
File path to a bnd file containing bnd instructions for this project. Defaults tobnd.bnd
. The file path can be an absolute or relative to the project directory.The bnd instructions for this project are merged with the bnd instructions, if any, for the parent project.
-
bnd
@Parameter private java.lang.String bnd
Bnd instructions for this project specified directly in the pom file. This is generally be done using a<![CDATA[]]>
section. If the projects has abnd file
, then this configuration element is ignored.The bnd instructions for this project are merged with the bnd instructions, if any, for the parent project.
-
buildContext
@Component private org.sonatype.plexus.build.incremental.BuildContext buildContext
-
propertiesFile
private java.io.File propertiesFile
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
loadProjectProperties
private java.io.File loadProjectProperties(Builder builder, org.apache.maven.project.MavenProject project) throws java.lang.Exception
- Throws:
java.lang.Exception
-
reportErrorsAndWarnings
private void reportErrorsAndWarnings(Builder builder) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
expandJar
private void expandJar(Jar jar, java.io.File dir) throws java.lang.Exception
- Throws:
java.lang.Exception
-
manifestOutOfDate
private boolean manifestOutOfDate()
-
-