Class DetectMojo

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

    @Mojo(name="detect",
          defaultPhase=VALIDATE)
    public class DetectMojo
    extends org.apache.maven.plugin.AbstractMojo
    Detects the current operating system and architecture, normalizes them, and sets them to various project properties.
    • os.detected.name - normalized os.name (e.g. linux, osx)
    • os.detected.arch - normalized os.arch (e.g. x86_64, x86_32)
    • os.detected.classifier - a shortcut for 'os.detectedName'.'os.detectedArch' (e.g. linux-x86_64)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Detector detector  
      private org.apache.maven.project.MavenProject project  
      private static java.lang.String UNKNOWN  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      DetectMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      • 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(defaultValue="${project}",
                   readonly=true)
        private org.apache.maven.project.MavenProject project
      • detector

        private final Detector detector
    • Constructor Detail

      • DetectMojo

        public DetectMojo()
    • Method Detail

      • execute

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