Class GenerateDescriptorMojo

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

    @Mojo(name="features-generate-descriptor",
          defaultPhase=COMPILE,
          requiresDependencyResolution=RUNTIME,
          threadSafe=true)
    public class GenerateDescriptorMojo
    extends MojoSupport
    Generates the features XML file starting with an optional source feature.xml and adding project dependencies as bundles and feature/car dependencies. NB this requires a recent maven-install-plugin such as 2.3.1
    • Field Detail

      • mavenResourcesFiltering

        @Component
        protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
      • mavenFileFilter

        @Component
        protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter
      • treeListing

        protected String treeListing
      • encoding

        @Parameter(defaultValue="${project.build.sourceEncoding}")
        protected String encoding
        The character encoding scheme to be applied when filtering resources.
      • escapeString

        @Parameter(defaultValue="${maven.resources.escapeString}")
        protected String escapeString
        Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
      • systemProperties

        @Parameter
        protected Map<String,​String> systemProperties
        System properties.
    • Constructor Detail

      • GenerateDescriptorMojo

        public GenerateDescriptorMojo()
    • 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
      • setLog

        public void setLog​(org.apache.maven.plugin.logging.Log log)
        Specified by:
        setLog in interface org.apache.maven.plugin.Mojo
        Overrides:
        setLog in class org.apache.maven.plugin.AbstractMojo
      • getLog

        public org.apache.maven.plugin.logging.Log getLog()
        Specified by:
        getLog in interface org.apache.maven.plugin.Mojo
        Overrides:
        getLog in class org.apache.maven.plugin.AbstractMojo
      • saveDependencyChanges

        protected void saveDependencyChanges​(Collection<org.apache.karaf.features.internal.model.Bundle> addedBundles,
                                             Collection<org.apache.karaf.features.internal.model.Bundle> removedBundles,
                                             Collection<org.apache.karaf.features.internal.model.Dependency> addedDependencys,
                                             Collection<org.apache.karaf.features.internal.model.Dependency> removedDependencys,
                                             org.apache.karaf.features.internal.model.ObjectFactory objectFactory)
                                      throws Exception
        Throws:
        Exception
      • filter

        protected void filter​(File sourceFile,
                              File targetFile)
                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException