Package org.codehaus.mojo.license
Class AbstractLicensesXmlMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicensesXmlMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractDownloadLicensesMojo
,LicensesXmlInsertVersionsMojo
public abstract class AbstractLicensesXmlMojo
extends org.apache.maven.plugin.AbstractMojo
A common parent for
LicensesXmlInsertVersionsMojo
and AbstractDownloadLicensesMojo
.- Since:
- 1.19
- Author:
- Peter Palaga
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LicensedArtifactResolver
Licensed artifact resolver.protected File
The output file containing a mapping between each dependency and its license information.protected Eol
An end of line constant name denoting the EOL string to use when redering thelicenses.xml
file.protected org.apache.maven.project.MavenProject
The Maven Project Objectprotected List
<org.apache.maven.artifact.repository.ArtifactRepository> List of Remote Repositories used by the resolverFields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractLicensesXmlMojo
(LicensedArtifactResolver licensedArtifactResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected Path[]
protected void
writeLicenseSummary
(List<ProjectLicenseInfo> deps, File licensesOutputFile, boolean writeVersions) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
licensesOutputFile
@Parameter(property="licensesOutputFile", defaultValue="${project.build.directory}/generated-resources/licenses.xml") protected File licensesOutputFileThe output file containing a mapping between each dependency and its license information.- Since:
- 1.0
-
licensesOutputFileEol
@Parameter(property="licensesOutputFileEol", defaultValue="AUTODETECT") protected Eol licensesOutputFileEolAn end of line constant name denoting the EOL string to use when redering thelicenses.xml
file. Possible values areLF
,CRLF
,AUTODETECT
andPLATFORM
.When the value
AUTODETECT
is used, the mojo will use whatever EOL value is used in the first existing of the following files:invalid reference
#licensesConfigFile
${basedir}/pom.xml
.The value
PLATFORM
is deprecated but still kept for backwards compatibility reasons.- Since:
- 1.17
-
remoteRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositoriesList of Remote Repositories used by the resolver- Since:
- 1.0
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven Project Object- Since:
- 1.0
-
licensedArtifactResolver
Licensed artifact resolver.- Since:
- 1.0
-
-
Constructor Details
-
AbstractLicensesXmlMojo
-
-
Method Details
-
getEncoding
-
getAutodetectEolFiles
-
writeLicenseSummary
protected void writeLicenseSummary(List<ProjectLicenseInfo> deps, File licensesOutputFile, boolean writeVersions) throws ParserConfigurationException, TransformerException, IOException
-