Package org.apache.maven.api.model
Class License
java.lang.Object
org.apache.maven.api.model.License
- All Implemented Interfaces:
- Serializable,- InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class License
extends Object
implements Serializable, InputLocationTracker
Describes the licenses for this project. This is used to generate the license
 page of the project's web site, as well as being taken into consideration in other reporting
 and validation. The licenses listed for the project are that of the project itself, and not
 of dependencies.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create License instances.
- 
Method SummaryModifier and TypeMethodDescriptionAddendum information pertaining to this license.The primary method by which this project may be distributed.getLocation(Object key) Gets the location of the specified field in the input source.getName()The full legal name of the license.getUrl()The official url for the license text.static License.BuilderCreates a newLicensebuilder instance.static License.BuildernewBuilder(boolean withDefaults) Creates a newLicensebuilder instance using default values or not.static License.BuildernewBuilder(License from) Creates a newLicensebuilder instance using the specified object as a basis.static License.BuildernewBuilder(License from, boolean forceCopy) Creates a newLicensebuilder instance using the specified object as a basis.static LicenseCreates a newLicenseinstance.static LicensenewInstance(boolean withDefaults) Creates a newLicenseinstance using default values or not.with()Creates a new builder with this object as the basis.withComments(String comments) Creates a newLicenseinstance using the specified comments.withDistribution(String distribution) Creates a newLicenseinstance using the specified distribution.Creates a newLicenseinstance using the specified name.Creates a newLicenseinstance using the specified url.
- 
Method Details- 
getNameThe full legal name of the license.- Returns:
- a String
 
- 
getUrlThe official url for the license text.- Returns:
- a String
 
- 
getDistributionThe 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:
- a String
 
- 
getCommentsAddendum information pertaining to this license.- Returns:
- a String
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withNameCreates a newLicenseinstance using the specified name.- Parameters:
- name- the new- Stringto use
- Returns:
- a Licensewith the specified name
 
- 
withUrlCreates a newLicenseinstance using the specified url.- Parameters:
- url- the new- Stringto use
- Returns:
- a Licensewith the specified url
 
- 
withDistributionCreates a newLicenseinstance using the specified distribution.- Parameters:
- distribution- the new- Stringto use
- Returns:
- a Licensewith the specified distribution
 
- 
withCommentsCreates a newLicenseinstance using the specified comments.- Parameters:
- comments- the new- Stringto use
- Returns:
- a Licensewith the specified comments
 
- 
newInstanceCreates a newLicenseinstance. Equivalent tonewInstance( true ).- Returns:
- a new License
- See Also:
 
- 
newInstanceCreates a newLicenseinstance using default values or not. Equivalent tonewBuilder( withDefaults ).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new License
 
- 
newBuilderCreates a newLicensebuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newLicensebuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newLicensebuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
- from- the- Licenseinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newLicensebuilder instance using the specified object as a basis.- Parameters:
- from- the- Licenseinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-