Class JoinPathsMojo

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

    @Mojo(name="join-paths",
          defaultPhase=INITIALIZE,
          requiresProject=true,
          threadSafe=true)
    public class JoinPathsMojo
    extends org.apache.maven.plugin.AbstractMojo
    Join paths using the platform-specific path separator and provide the result as a Maven property.

    While paths for most of the standard Maven plugins can be defined in a way that is platform agnostic, sometimes it's necessary to add flags directly. For instance, when configuring Javadoc's --snippet-path flag, the value should use the platform-specific path separator.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String[] paths
      The paths to join.
      (package private) org.apache.maven.project.MavenProject project  
      (package private) java.lang.String propertyName
      The name of the resulting Maven property name.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      JoinPathsMojo()  
    • 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)
        org.apache.maven.project.MavenProject project
      • paths

        @Parameter
        java.lang.String[] paths
        The paths to join.
        Since:
        1.0
      • propertyName

        @Parameter
        java.lang.String propertyName
        The name of the resulting Maven property name. This property should not have been set before.
        Since:
        1.0
    • Constructor Detail

      • JoinPathsMojo

        public JoinPathsMojo()
    • Method Detail

      • execute

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