Class MojoCacheMavenArtifacts

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

    @Mojo(name="cacheMavenArtifacts",
          defaultPhase=PROCESS_RESOURCES,
          threadSafe=true,
          requiresDependencyResolution=COMPILE,
          requiresDependencyCollection=COMPILE,
          instantiationStrategy=PER_LOOKUP,
          requiresProject=true,
          aggregator=false)
    public class MojoCacheMavenArtifacts
    extends AbstractOsgiContainerPackMojo
    This mojo will download or copy into the cache folder all artifacts declared in the configuration tag artifactConfigSets.

    As the org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher application was designed to work with eclipse generated bundles which uses its symbolic-name and version is separated by "_" instead the one used by maven "-", it will be necessary to rename the downloaded artifact file name.

    It was not designed be used stand alone, but as an integrated part of the default lifecycle of the osgi.repository packaging type.

    Author:
    Cristiano Gavião
    • Constructor Detail

      • MojoCacheMavenArtifacts

        @Inject
        public MojoCacheMavenArtifacts​(org.apache.maven.project.MavenProject project,
                                       io.takari.incrementalbuild.BuildContext pCopyBuildContext)
    • Method Detail

      • doBeforeSkipMojo

        protected void doBeforeSkipMojo()
                                 throws org.apache.maven.plugin.MojoExecutionException
        Description copied from class: AbstractOsgiContainerPackMojo
        Used to specify any action that must be executed when the mojo are being skipped by maven reactor.
        Overrides:
        doBeforeSkipMojo in class AbstractOsgiContainerPackMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException - When the skipping process had any problem
      • executeMojo

        protected void executeMojo()
                            throws org.apache.maven.plugin.MojoExecutionException,
                                   org.apache.maven.plugin.MojoFailureException
        Overrides:
        executeMojo in class br.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException