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 LicensedArtifactResolverLicensed artifact resolver.protected FileThe output file containing a mapping between each dependency and its license information.protected EolAn end of line constant name denoting the EOL string to use when redering thelicenses.xmlfile.protected org.apache.maven.project.MavenProjectThe 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
ConstructorsModifierConstructorDescriptionprotectedAbstractLicensesXmlMojo(LicensedArtifactResolver licensedArtifactResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected Path[]protected voidwriteLicenseSummary(List<ProjectLicenseInfo> deps, File licensesOutputFile, boolean writeVersions) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.xmlfile. Possible values areLF,CRLF,AUTODETECTandPLATFORM.When the value
AUTODETECTis 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
PLATFORMis 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
-