Class Property

java.lang.Object
org.codehaus.mojo.versions.api.Property

public class Property extends Object
Represents an association between properties and dependencies.
Since:
1.0-alpha-3
Author:
Stephen Connolly
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance without any set name
    Creates a new Property with the given name
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.maven.model.Dependency[]
    Dependencies that must be available for this property.
    Returns the property name
    Returns the value of the property
    Returns the property version
    boolean
    Whether properties linking versions should be auto-detected or not
    boolean
    Specifies whether snapshots should not be considered
    boolean
    Says whether, when searchReactor is true and a property version can be entirely satisfied from the reactor and this setting is true then the reactor version will be specified irrespective of any other settings (including isBanSnapshots()).
    boolean
    Says whether reactor should be searched for the artifact version
    void
    setAutoLinkDependencies(boolean autoLinkDependencies)
    Specifies whether properties indicating dependency versions should be linked automatically
    void
    setBanSnapshots(boolean banSnapshots)
    Specifies whether snapshots should not be considered
    void
    setDependencies(org.apache.maven.model.Dependency[] dependencies)
    Dependencies that must be available for this property.
    void
    Sets the name of the property
    void
    setPreferReactor(boolean preferReactor)
    Specifies whether, when searchReactor is true and a property version can be entirely satisfied from the reactor and this setting is true then the reactor version will be specified irrespective of any other settings (including isBanSnapshots()).
    void
    setSearchReactor(boolean searchReactor)
    Specifies whether reactor should be searched for the artifact version
    void
    Sets the value of the property
    void
    setVersion(String version)
    Sets the property version

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Property

      public Property()
      Creates a new instance without any set name
    • Property

      public Property(String name)
      Creates a new Property with the given name
      Parameters:
      name - name of the property
  • Method Details

    • getName

      public String getName()
      Returns the property name
      Returns:
      name of the property
    • setName

      public void setName(String name)
      Sets the name of the property
      Parameters:
      name - name to be set
    • getVersion

      public String getVersion()
      Returns the property version
      Returns:
      version
    • setVersion

      public void setVersion(String version)
      Sets the property version
      Parameters:
      version - version to be set
    • isAutoLinkDependencies

      public boolean isAutoLinkDependencies()
      Whether properties linking versions should be auto-detected or not
      Returns:
      true if properties linking versions should be auto-detected or not
    • setAutoLinkDependencies

      public void setAutoLinkDependencies(boolean autoLinkDependencies)
      Specifies whether properties indicating dependency versions should be linked automatically
      Parameters:
      autoLinkDependencies - true if properties indicating dependency versions should be linked automatically
    • getDependencies

      public org.apache.maven.model.Dependency[] getDependencies()
      Dependencies that must be available for this property. If isAutoLinkDependencies() is true then these dependencies will be considered in addition to the automatically linked dependencies.
      Returns:
      dependencies
    • setDependencies

      public void setDependencies(org.apache.maven.model.Dependency[] dependencies)
      Dependencies that must be available for this property. If isAutoLinkDependencies() is true then these dependencies will be considered in addition to the automatically linked dependencies.
      Parameters:
      dependencies - to be set
    • isSearchReactor

      public boolean isSearchReactor()
      Says whether reactor should be searched for the artifact version
      Returns:
      true if reactor should be searched for the artifact version
    • setSearchReactor

      public void setSearchReactor(boolean searchReactor)
      Specifies whether reactor should be searched for the artifact version
      Parameters:
      searchReactor - whether reactor should be searched for the artifact version
    • isPreferReactor

      public boolean isPreferReactor()
      Says whether, when searchReactor is true and a property version can be entirely satisfied from the reactor and this setting is true then the reactor version will be specified irrespective of any other settings (including isBanSnapshots()).
      Returns:
      provided value
    • setPreferReactor

      public void setPreferReactor(boolean preferReactor)
      Specifies whether, when searchReactor is true and a property version can be entirely satisfied from the reactor and this setting is true then the reactor version will be specified irrespective of any other settings (including isBanSnapshots()).
      Parameters:
      preferReactor - required value
    • isBanSnapshots

      public boolean isBanSnapshots()
      Specifies whether snapshots should not be considered
      Returns:
      true if snapshots should not be considered
    • setBanSnapshots

      public void setBanSnapshots(boolean banSnapshots)
      Specifies whether snapshots should not be considered
      Parameters:
      banSnapshots - true if snapshots should not be considered
    • getValue

      public String getValue()
      Returns the value of the property
      Returns:
      value of the property
    • setValue

      public void setValue(String value)
      Sets the value of the property
      Parameters:
      value - property value to be set