Class ProjectLicense
java.lang.Object
org.codehaus.mojo.license.download.ProjectLicense
- All Implemented Interfaces:
Cloneable
The license subelement of
ProjectLicenseInfo
.- Since:
- 1.17
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.The full constructor.ProjectLicense
(org.apache.maven.model.License license) Equivalent tonew ProjectLicense( license.getName(), license.getUrl(), license.getDistribution(), license.getComments(), null )
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Get addendum information pertaining to this license.Get the primary method by which this project may be distributed.getFile()
Returns the name of the license file (without path) downloaded fromurl
.getName()
Get the full legal name of the license.getUrl()
Get the official url for the license text.int
hashCode()
void
setComments
(String comments) Set addendum information pertaining to this license.void
setDistribution
(String distribution) Set the primary method by which this project may be distributed.void
Set the name of the license file (without path) downloaded fromurl
.void
Set the full legal name of the license.void
Set the official url for the license text.
-
Constructor Details
-
ProjectLicense
public ProjectLicense()The default constructor. -
ProjectLicense
public ProjectLicense(org.apache.maven.model.License license) Equivalent tonew ProjectLicense( license.getName(), license.getUrl(), license.getDistribution(), license.getComments(), null )
- Parameters:
license
- the license to get name, URL, ditribution and comments from
-
ProjectLicense
The full constructor.- Parameters:
name
- a human readable license nameurl
- a URL from where the license text can be downloadeddistribution
- seegetDistribution()
comments
- additional information related to this licensefile
- file name without path
-
-
Method Details
-
getComments
Get addendum information pertaining to this license.- Returns:
- String
-
getDistribution
Get the primary method by which this project may be distributed.- repo
- may be downloaded from the Maven repository
- manual
- user must manually download and install the dependency.
- Returns:
- String
-
getName
Get the full legal name of the license.- Returns:
- String
-
getUrl
Get the official url for the license text.- Returns:
- String
-
getFile
Returns the name of the license file (without path) downloaded fromurl
.- Returns:
- a path or
null
-
setComments
Set addendum information pertaining to this license.- Parameters:
comments
-
-
setDistribution
Set the primary method by which this project may be distributed.- repo
- may be downloaded from the Maven repository
- manual
- user must manually download and install the dependency.
- Parameters:
distribution
-
-
setName
Set the full legal name of the license.- Parameters:
name
-
-
setUrl
Set the official url for the license text.- Parameters:
url
-
-
setFile
Set the name of the license file (without path) downloaded fromurl
.- Parameters:
file
- the path to set
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
hashCode
public int hashCode() -
equals
-