Class TPValidationMojo

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

    @Mojo(name="validate-target-platform",
          defaultPhase=VALIDATE)
    public class TPValidationMojo
    extends org.apache.maven.plugin.AbstractMojo
    Validates that specified target platforms (.target files) contents can be resolved.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean checkDependencies
      Check that, for each artifact from the target file, the dependencies of the artifact are also contained in the target file.
      private boolean checkProvisioning
      Check that the content of the target-platform can be installed together in a same provisioning operation.
      protected EquinoxServiceFactory equinox  
      private java.lang.String executionEnvironment  
      private P2ResolverFactory factory  
      private boolean failOnError
      whether to fail build or just print a warning when a validation fails
      private org.codehaus.plexus.logging.Logger logger  
      private org.apache.maven.project.MavenProject project  
      private java.io.File[] targetFiles
      The .target files to validate.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String createErrorMessage​(java.util.List<TPError> errors)  
      void execute()  
      private void validateTarget​(java.io.File targetFile)  
      • 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

      • project

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

        @Parameter
        private java.io.File[] targetFiles
        The .target files to validate. If not specified and the project packaging is "eclipse-target-definition", the goal will validate project's primary target file will be validated.
      • failOnError

        @Parameter(defaultValue="true")
        private boolean failOnError
        whether to fail build or just print a warning when a validation fails
      • checkDependencies

        @Parameter(defaultValue="false")
        private boolean checkDependencies
        Check that, for each artifact from the target file, the dependencies of the artifact are also contained in the target file. Also check that there are no conflicting artifacts, i.e. artifact which could not be installed together. When this check passes, none of the artifacts should lead to dependency resolution problems when used in a Tycho project.
        Since:
        0.21.0
      • checkProvisioning

        @Parameter(defaultValue="false")
        private boolean checkProvisioning
        Check that the content of the target-platform can be installed together in a same provisioning operation.
        Since:
        0.26.0
      • executionEnvironment

        @Parameter(defaultValue="JavaSE-1.7")
        private java.lang.String executionEnvironment
      • logger

        @Component
        private org.codehaus.plexus.logging.Logger logger
    • Constructor Detail

      • TPValidationMojo

        public TPValidationMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • createErrorMessage

        private java.lang.String createErrorMessage​(java.util.List<TPError> errors)
      • validateTarget

        private void validateTarget​(java.io.File targetFile)
                             throws TPError
        Throws:
        TPError