Class Site

java.lang.Object
org.apache.maven.api.model.Site
All Implemented Interfaces:
Serializable, InputLocationTracker

@Experimental @Generated @ThreadSafe @Immutable public class Site extends Object implements Serializable, InputLocationTracker
Contains the information needed for deploying websites.
See Also:
  • Method Details

    • getId

      public String getId()
      A unique identifier for a deployment location. This is used to match the site to configuration in the settings.xml file, for example.
      Returns:
      a String
    • getName

      public String getName()
      Human readable name of the deployment location.
      Returns:
      a String
    • getUrl

      public String getUrl()
      The url of the location where website is deployed, in the form protocol://hostname/path.
      Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if site's child.site.url.inherit.append.path="false"
      Returns:
      a String
    • getChildSiteUrlInheritAppendPath

      public String getChildSiteUrlInheritAppendPath()
      When children inherit from distribution management site url, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
      Default value is: true
      Since: Maven 3.6.1
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      @Nonnull public Site.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withId

      @Nonnull public Site withId(String id)
      Creates a new Site instance using the specified id.
      Parameters:
      id - the new String to use
      Returns:
      a Site with the specified id
    • withName

      @Nonnull public Site withName(String name)
      Creates a new Site instance using the specified name.
      Parameters:
      name - the new String to use
      Returns:
      a Site with the specified name
    • withUrl

      @Nonnull public Site withUrl(String url)
      Creates a new Site instance using the specified url.
      Parameters:
      url - the new String to use
      Returns:
      a Site with the specified url
    • withChildSiteUrlInheritAppendPath

      @Nonnull public Site withChildSiteUrlInheritAppendPath(String childSiteUrlInheritAppendPath)
      Creates a new Site instance using the specified childSiteUrlInheritAppendPath.
      Parameters:
      childSiteUrlInheritAppendPath - the new String to use
      Returns:
      a Site with the specified childSiteUrlInheritAppendPath
    • newInstance

      @Nonnull public static Site newInstance()
      Creates a new Site instance. Equivalent to newInstance( true ).
      Returns:
      a new Site
      See Also:
    • newInstance

      @Nonnull public static Site newInstance(boolean withDefaults)
      Creates a new Site instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Site
    • newBuilder

      @Nonnull public static Site.Builder newBuilder()
      Creates a new Site builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Site.Builder newBuilder(boolean withDefaults)
      Creates a new Site builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Site.Builder newBuilder(Site from)
      Creates a new Site builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the Site instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Site.Builder newBuilder(Site from, boolean forceCopy)
      Creates a new Site builder instance using the specified object as a basis.
      Parameters:
      from - the Site instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder
    • isChildSiteUrlInheritAppendPath

      public boolean isChildSiteUrlInheritAppendPath()