|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.plexus.logging.AbstractLogEnabled org.codehaus.mojo.license.DefaultThirdPartyTool
public class DefaultThirdPartyTool
Default implementation of the third party tool.
Field Summary | |
---|---|
static String |
DESCRIPTOR_CLASSIFIER
|
static String |
DESCRIPTOR_TYPE
|
Fields inherited from interface org.codehaus.mojo.license.ThirdPartyTool |
---|
ROLE |
Constructor Summary | |
---|---|
DefaultThirdPartyTool()
|
Method Summary | |
---|---|
void |
addLicense(LicenseMap licenseMap,
org.apache.maven.project.MavenProject project,
org.apache.maven.model.License license)
Add a given license to the given licenseMap for the given project . |
void |
addLicense(LicenseMap licenseMap,
org.apache.maven.project.MavenProject project,
List<?> licenses)
Add a given licenses to the given licenseMap for the given project . |
void |
addLicense(LicenseMap licenseMap,
org.apache.maven.project.MavenProject project,
String licenseName)
Add a license (name and url are licenseName ) to the given licenseMap for the given
project . |
void |
attachThirdPartyDescriptor(org.apache.maven.project.MavenProject project,
File file)
For the given project , attach the given file as a third-party file. |
SortedSet<org.apache.maven.project.MavenProject> |
getProjectsWithNoLicense(LicenseMap licenseMap,
boolean doLog)
From the given licenseMap , obtain all the projects with no license. |
SortedProperties |
loadThirdPartyDescriptorsForUnsafeMapping(String encoding,
Collection<org.apache.maven.project.MavenProject> projects,
SortedSet<org.apache.maven.project.MavenProject> unsafeDependencies,
LicenseMap licenseMap,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
|
SortedProperties |
loadUnsafeMapping(LicenseMap licenseMap,
SortedMap<String,org.apache.maven.project.MavenProject> artifactCache,
String encoding,
File missingFile)
|
void |
mergeLicenses(LicenseMap licenseMap,
String... licenses)
For a given licenseMap , merge all licenses . |
File |
resolvThirdPartyDescriptor(org.apache.maven.project.MavenProject project,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
List<org.apache.maven.artifact.repository.ArtifactRepository> repositories)
Obtain the third party file from the repository. |
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DESCRIPTOR_CLASSIFIER
public static final String DESCRIPTOR_TYPE
Constructor Detail |
---|
public DefaultThirdPartyTool()
Method Detail |
---|
public void attachThirdPartyDescriptor(org.apache.maven.project.MavenProject project, File file)
project
, attach the given file
as a third-party file.
The file will be attached as with a classifier third-parties
and a type properties
.
attachThirdPartyDescriptor
in interface ThirdPartyTool
project
- the project on which to attch the third-party filefile
- the third-party file to attach.public SortedSet<org.apache.maven.project.MavenProject> getProjectsWithNoLicense(LicenseMap licenseMap, boolean doLog)
licenseMap
, obtain all the projects with no license.
getProjectsWithNoLicense
in interface ThirdPartyTool
licenseMap
- the license map to querydoLog
- a flag to add debug logs
public SortedProperties loadThirdPartyDescriptorsForUnsafeMapping(String encoding, Collection<org.apache.maven.project.MavenProject> projects, SortedSet<org.apache.maven.project.MavenProject> unsafeDependencies, LicenseMap licenseMap, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws ThirdPartyToolException, IOException
loadThirdPartyDescriptorsForUnsafeMapping
in interface ThirdPartyTool
encoding
- encoding used to read or write properties filesprojects
- all projects where to read third parties descriptorsunsafeDependencies
- all unsafe projectslicenseMap
- license map where to store new licenseslocalRepository
- local repositoryremoteRepositories
- remote repositories
ThirdPartyToolException
- if any
IOException
- if anypublic File resolvThirdPartyDescriptor(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> repositories) throws ThirdPartyToolException
resolvThirdPartyDescriptor
in interface ThirdPartyTool
project
- the projectlocalRepository
- the local repositoryrepositories
- the remote repositories
ThirdPartyToolException
- if anypublic void addLicense(LicenseMap licenseMap, org.apache.maven.project.MavenProject project, String licenseName)
licenseName
) to the given licenseMap
for the given
project
.
addLicense
in interface ThirdPartyTool
licenseMap
- the license map where to add the licenseproject
- the projectlicenseName
- the name of the licensepublic void addLicense(LicenseMap licenseMap, org.apache.maven.project.MavenProject project, org.apache.maven.model.License license)
license
to the given licenseMap
for the given project
.
addLicense
in interface ThirdPartyTool
licenseMap
- the license map where to add the licenseproject
- the projectlicense
- the license to addpublic void addLicense(LicenseMap licenseMap, org.apache.maven.project.MavenProject project, List<?> licenses)
licenses
to the given licenseMap
for the given project
.
addLicense
in interface ThirdPartyTool
licenseMap
- the license map where to add the licensesproject
- the projectlicenses
- the licenses to addpublic void mergeLicenses(LicenseMap licenseMap, String... licenses)
licenseMap
, merge all licenses
.
The first value of the licenses
is the license to keep and all other values will be merged into the first
one.
mergeLicenses
in interface ThirdPartyTool
licenseMap
- the license map to mergelicenses
- all the licenses to merge (the first license will be the unique one to kkep)public SortedProperties loadUnsafeMapping(LicenseMap licenseMap, SortedMap<String,org.apache.maven.project.MavenProject> artifactCache, String encoding, File missingFile) throws IOException
loadUnsafeMapping
in interface ThirdPartyTool
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |