Do not add a directory of sources which doesn't exist.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@496538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier
2007-01-15 23:39:17 +00:00
parent feb031d22c
commit 3d94ce46ee
3 changed files with 28 additions and 18 deletions

View File

@@ -108,6 +108,7 @@ pom.package = [${pom.package}]
internal_javadoc_jar = [${internal_javadoc_jar}]
internal_javadoc_needed = [${internal_javadoc_needed}]
internal_javadoc_working_dir = [${internal_javadoc_working_dir}]
internal_javadoc_src_tmp = [${internal_javadoc_src_tmp}]
</ant:echo>
</j:if>
<j:if test="not ${maven.javadoc.debug}">
@@ -127,23 +128,29 @@ internal_javadoc_working_dir = [${internal_javadoc_working_dir}]
<util:tokenize var="sources_dirs" delim="${path.separator}">${context.getAntProject().getReferences().get('maven.compile.src.set')}</util:tokenize>
<ant:copy todir="${internal_javadoc_src_tmp}">
<j:forEach var="dir" items="${sources_dirs}">
<ant:fileset dir="${dir}">
<ant:include name="**/*.java"/>
<ant:include name="**/*.html"/>
<ant:include name="**/doc-files/**/*"/>
<!-- handle source modifications -->
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach> <!-- end sourceModification exclude -->
<j:forEach var="include" items="${sm.includes}">
<ant:include name="${include}"/>
</j:forEach> <!-- end sourceModification include -->
</j:if>
</j:forEach> <!-- end sourceModification -->
</ant:fileset>
<util:file var="dir_file_object" name="${dir}"/>
<j:if test="${dir_file_object.exists()}">
<ant:fileset dir="${dir}">
<ant:include name="**/*.java"/>
<ant:include name="**/*.html"/>
<ant:include name="**/doc-files/**/*"/>
<!-- handle source modifications -->
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach> <!-- end sourceModification exclude -->
<j:forEach var="include" items="${sm.includes}">
<ant:include name="${include}"/>
</j:forEach> <!-- end sourceModification include -->
</j:if>
</j:forEach> <!-- end sourceModification -->
</ant:fileset>
</j:if>
<j:if test="${!dir_file_object.exists()}">
<ant:echo>Directory "${dir}" doesn't exist. Not added in the sources for the javadoc.</ant:echo>
</j:if>
</j:forEach>
</ant:copy>
<ant:path id="internal_javadoc_sources">

View File

@@ -22,7 +22,7 @@
<pomVersion>3</pomVersion>
<artifactId>maven-javadoc-plugin</artifactId>
<name>Maven Javadoc Plugin</name>
<currentVersion>1.8</currentVersion>
<currentVersion>1.8.1-SNAPSHOT</currentVersion>
<shortDescription>Produce Javadocs and report</shortDescription>
<versions>
<version>

View File

@@ -25,6 +25,9 @@
<author email="aheritier@apache.org">Arnaud Heritier</author>
</properties>
<body>
<release version="1.8.1-SNAPSHOT" date="In SVN">
<action dev="aheritier" type="fix">Do not add a directory of sources which doesn't exist.</action>
</release>
<release version="1.8" date="2006-01-15">
<action dev="ltheussl" type="fix" issue="MPJAVADOC-52">Cannot set -sourcepath to add paths for inherited javadocs.</action>
<action dev="ltheussl" type="fix" issue="MPJAVADOC-56">Other doclets cannot use standard doclet parameters.</action>