Class PatchMojo

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

@Mojo(name="patch", requiresProject=true, defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE) public class PatchMojo extends AbstractTorchMojo
Goal which executes WiX torch & pyro to create msp files.
  • Field Details

    • baseline

      @Parameter(property="wix.baseline", required=true) protected String baseline
      Baseline id... needs to match the baseline in the patch file, why then is it needed...I don't get how this works... Can we just read this from the input xml?
    • mavenProjectBuilder

      @Component protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
      Project builder -- builds a model from a pom.xml
  • Constructor Details

    • PatchMojo

      public PatchMojo()
  • Method Details

    • addValidationOptions

      protected void addValidationOptions(org.codehaus.plexus.util.cli.Commandline cl)
      Specified by:
      addValidationOptions in class AbstractTorchMojo
    • addOtherOptions

      protected void addOtherOptions(org.codehaus.plexus.util.cli.Commandline cl)
    • torchOutputExtension

      protected String torchOutputExtension()
      Specified by:
      torchOutputExtension in class AbstractTorchMojo
    • getJARDependencySets

      protected Set<org.apache.maven.artifact.Artifact> getJARDependencySets(org.apache.maven.artifact.Artifact inputArtifact) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • pyro

      protected void pyro(File pyroTool, org.apache.maven.artifact.Artifact baseInputArtifact, org.apache.maven.artifact.Artifact latestInputArtifact, String arch, File patchInputFile, File transformInputFile, File archOutputFile) throws org.apache.maven.plugin.MojoExecutionException
      Prepare and execute pyro commandline tool
      Parameters:
      pyroTool - pyro executable to run.
      baseInputArtifact - baseline artifact, used to source bind paths.
      latestInputArtifact - latest artifact, used to source bind paths.
      arch - target architecture.
      patchInputFile - patch input file.
      transformInputFile - transform input file.
      archOutputFile - output file to generate.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if pyro execution fails.
    • pyro

      protected void pyro(File pyroTool, File patchInputFile, Map<String,File> transformInputFiles, File archOutputFile) throws org.apache.maven.plugin.MojoExecutionException
      Prepare and execute the Uber pyro commandline
      Parameters:
      pyroTool - pyro executable to run.
      patchInputFile - patch input file.
      transformInputFiles - transforms keyed by culture.
      archOutputFile - output file to generate.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if pyro execution fails.
    • pyro

      protected void pyro(org.codehaus.plexus.util.cli.Commandline cl) throws org.apache.maven.plugin.MojoExecutionException
      Execute the given command line parsing output for pyro comments
      Parameters:
      cl - prepared pyro command line.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if pyro execution fails.
    • getDependencySets

      protected Set<org.apache.maven.artifact.Artifact> getDependencySets() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • 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
    • getRelatedArtifact

      protected org.apache.maven.artifact.Artifact getRelatedArtifact(ArtifactItem artifactItem, String arch, String culture, String type) throws org.apache.maven.plugin.MojoExecutionException
      Based on Maven-dependency-plugin AbstractFromConfigurationMojo. Resolves the Artifact from the remote repository if necessary. If no version is specified, it will be retrieved from the dependency list or from the DependencyManagement section of the pom.
      Parameters:
      artifactItem - containing information about artifact from plugin configuration.
      arch - target architecture classifier prefix.
      culture - target culture, or null for neutral.
      type - artifact type to resolve.
      Returns:
      Artifact object representing the specified file.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - with a message if the version can't be found in DependencyManagement.
    • getRelatedArtifactFiles

      protected File getRelatedArtifactFiles(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • resolveArtifactDependencies

      protected Set<org.apache.maven.artifact.Artifact> resolveArtifactDependencies(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException, org.apache.maven.project.ProjectBuildingException, org.apache.maven.project.artifact.InvalidDependencyVersionException, org.apache.maven.plugin.MojoExecutionException
      This method resolves all transitive dependencies of an artifact.
      Parameters:
      artifact - the artifact used to retrieve dependencies
      Returns:
      resolved set of dependencies
      Throws:
      org.apache.maven.artifact.resolver.ArtifactResolutionException - if dependency artifacts cannot be resolved.
      org.apache.maven.artifact.resolver.ArtifactNotFoundException - if a required artifact cannot be found.
      org.apache.maven.project.ProjectBuildingException - if Maven project metadata cannot be built.
      org.apache.maven.project.artifact.InvalidDependencyVersionException - if a dependency version is invalid.
      org.apache.maven.plugin.MojoExecutionException - if dependency resolution fails unexpectedly.