Class CustomBundleMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="custom-bundle")
    public class CustomBundleMojo
    extends org.apache.maven.plugin.AbstractMojo
    Builds OSGi bundle
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.archiver.MavenArchiveConfiguration archive  
      private java.io.File bundleLocation
      Location of OSGi bundle, must have META-INF/MANIFEST.MF bundle manifest file.
      private java.lang.String classifier
      Classifier of attached artifact.
      private java.lang.String[] excludes
      File patterns to exclude from bundleLocation.
      private java.util.List<org.codehaus.plexus.archiver.util.DefaultFileSet> fileSets
      Additional files to be included in the generated bundle.
      private java.lang.String[] includes
      File patterns to include from bundleLocation.
      private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver  
      private org.apache.maven.project.MavenProject project  
      private org.apache.maven.project.MavenProjectHelper projectHelper  
      private org.apache.maven.execution.MavenSession session  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      protected java.io.File getOutputJarFile()  
      private java.io.File updateManifest()  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bundleLocation

        @Parameter(required=true)
        private java.io.File bundleLocation
        Location of OSGi bundle, must have META-INF/MANIFEST.MF bundle manifest file.
      • classifier

        @Parameter(required=true)
        private java.lang.String classifier
        Classifier of attached artifact.
      • includes

        @Parameter
        private java.lang.String[] includes
        File patterns to include from bundleLocation. Include everything by default.
      • excludes

        @Parameter
        private java.lang.String[] excludes
        File patterns to exclude from bundleLocation.
      • fileSets

        @Parameter(required=true)
        private java.util.List<org.codehaus.plexus.archiver.util.DefaultFileSet> fileSets
        Additional files to be included in the generated bundle.
      • project

        @Parameter(property="project")
        private org.apache.maven.project.MavenProject project
      • session

        @Parameter(property="session",
                   readonly=true)
        private org.apache.maven.execution.MavenSession session
      • archive

        @Parameter
        private org.apache.maven.archiver.MavenArchiveConfiguration archive
      • jarArchiver

        @Component(role=org.codehaus.plexus.archiver.Archiver.class,
                   hint="jar")
        private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
      • projectHelper

        @Component
        private org.apache.maven.project.MavenProjectHelper projectHelper
    • Constructor Detail

      • CustomBundleMojo

        public CustomBundleMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • getOutputJarFile

        protected java.io.File getOutputJarFile()
      • updateManifest

        private java.io.File updateManifest()
                                     throws java.io.FileNotFoundException,
                                            java.io.IOException,
                                            org.apache.maven.plugin.MojoExecutionException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
        org.apache.maven.plugin.MojoExecutionException