Class AyoyArtifact
- java.lang.Object
-
- se.ayoy.maven.plugins.licenseverifier.model.AyoyArtifact
-
public class AyoyArtifact extends Object
Represents a found artifact, including license information.
-
-
Constructor Summary
Constructors Constructor Description AyoyArtifact(org.apache.maven.artifact.Artifact artifact, AyoyArtifact parent)Initialize the instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLicenseInfo(LicenseInfo info)Adds a license info about the licenses for the artifact.voidaddLicenses(List<org.apache.maven.model.License> licenses)Add licenses to the artifact.org.apache.maven.artifact.ArtifactgetArtifact()StringgetChainString()Creates a string representing the dependency chain to this artifact.List<LicenseInfo>getLicenseInfos()List<org.apache.maven.model.License>getLicenses()AyoyArtifactgetParent()StringgetParentString()Create a string representation as if we're the parent.booleanisLicenseValid(boolean requireAllValid)Check if licenses are valid.StringtoString()
-
-
-
Constructor Detail
-
AyoyArtifact
public AyoyArtifact(org.apache.maven.artifact.Artifact artifact, AyoyArtifact parent)Initialize the instance.- Parameters:
artifact- the maven artifact found.parent- the parent artifact.
-
-
Method Detail
-
addLicenses
public void addLicenses(List<org.apache.maven.model.License> licenses)
Add licenses to the artifact.- Parameters:
licenses- the licenses to add.
-
getLicenses
public List<org.apache.maven.model.License> getLicenses()
-
getParent
public AyoyArtifact getParent()
-
getArtifact
public org.apache.maven.artifact.Artifact getArtifact()
-
getChainString
public String getChainString()
Creates a string representing the dependency chain to this artifact.- Returns:
- a string representing the dependency chain to this artifact.
-
addLicenseInfo
public void addLicenseInfo(LicenseInfo info)
Adds a license info about the licenses for the artifact.- Parameters:
info- the license information.
-
isLicenseValid
public boolean isLicenseValid(boolean requireAllValid)
Check if licenses are valid.- Parameters:
requireAllValid- if all licenses are required to be valid- Returns:
- true if valid.
-
getLicenseInfos
public List<LicenseInfo> getLicenseInfos()
-
getParentString
public String getParentString()
Create a string representation as if we're the parent.- Returns:
- a string representation.
-
-