use of org.apache.maven.plugin.javadoc.options.DocletArtifact in project maven-plugins by apache.
the class AbstractJavadocMojo method getDocletPath.
/**
* Method to get the path of the doclet artifacts used in the <code>-docletpath</code> option.
* <p/>
* Either docletArtifact or doclectArtifacts can be defined and used, not both, docletArtifact
* takes precedence over doclectArtifacts. docletPath is always appended to any result path
* definition.
*
* @return a string that contains doclet path, separated by the System pathSeparator string
* (colon (<code>:</code>) on Solaris or semi-colon (<code>;</code>) on Windows).
* @throws MavenReportException if any
* @see File#pathSeparator
*/
private String getDocletPath() throws MavenReportException {
Set<DocletArtifact> docletArtifacts = collectDocletArtifacts();
List<String> pathParts = new ArrayList<String>();
for (DocletArtifact docletArtifact : docletArtifacts) {
if (!isDocletArtifactEmpty(docletArtifact)) {
pathParts.addAll(getArtifactsAbsolutePath(docletArtifact));
}
}
if (!StringUtils.isEmpty(docletPath)) {
pathParts.add(JavadocUtil.unifyPathSeparator(docletPath));
}
String path = StringUtils.join(pathParts.iterator(), File.pathSeparator);
if (StringUtils.isEmpty(path) && getLog().isWarnEnabled()) {
getLog().warn("No docletpath option was found. Please review <docletpath/> or <docletArtifact/>" + " or <doclets/>.");
}
return path;
}
Aggregations