Class OsgiSourceMojo

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

    @Mojo(name="plugin-source",
          defaultPhase=PREPARE_PACKAGE)
    public class OsgiSourceMojo
    extends AbstractSourceJarMojo
    Goal to create a JAR-package containing all the source files of a osgi project.
    • Field Detail

      • useDefaultSourceExcludes

        @Parameter(defaultValue="true")
        protected boolean useDefaultSourceExcludes
        Whether default source excludes for SCM files defined in {@see AbstractScanner#DEFAULTEXCLUDES} should be used.
      • requireSourceRoots

        @Parameter(defaultValue="false",
                   readonly=true)
        protected boolean requireSourceRoots
        Whether source folders are required or not. If not required (the default), projects without source folders/source includes will be silently ignored.
      • strictSrcIncludes

        @Parameter(defaultValue="true")
        protected boolean strictSrcIncludes
        If set to true (the default), missing build.properties src.includes will cause build failure. If set to false, missing build.properties src.includes will be reported as warnings but the build will not fail.
    • Constructor Detail

      • OsgiSourceMojo

        public OsgiSourceMojo()
    • Method Detail

      • getSources

        protected List<org.apache.maven.model.Resource> getSources​(org.apache.maven.project.MavenProject p)
                                                            throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        getSources in class AbstractSourceJarMojo
        Parameters:
        p - not null
        Returns:
        the compile or test sources
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getSources

        protected List<org.apache.maven.model.Resource> getSources​(org.apache.maven.project.MavenProject p,
                                                                   boolean requireSourceRoots,
                                                                   BuildProperties buildProperties)
                                                            throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getResources

        protected List<org.apache.maven.model.Resource> getResources​(org.apache.maven.project.MavenProject p)
                                                              throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        getResources in class AbstractSourceJarMojo
        Parameters:
        p - not null
        Returns:
        the compile or test resources
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • readL10nProps

        protected Properties readL10nProps​(OsgiManifest manifest)
                                    throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • updateSourceManifest

        protected void updateSourceManifest​(org.apache.maven.archiver.MavenArchiveConfiguration mavenArchiveConfiguration)
        Overrides:
        updateSourceManifest in class AbstractSourceJarMojo
      • isRelevantProjectImpl

        protected static boolean isRelevantProjectImpl​(org.apache.maven.project.MavenProject project,
                                                       BuildPropertiesParser buildPropertiesParser)