PR: MPJAVADOC-5
fix javadoc handling of all of maven.compile.src.set, including plugin test git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -72,9 +72,6 @@
|
||||
</j:when>
|
||||
|
||||
<j:otherwise>
|
||||
|
||||
<ant:property name="maven.javadoc.compile.src.set" refid="maven.compile.src.set"/>
|
||||
|
||||
<!-- Create a patternset for source modifications -->
|
||||
<patternset id="source.modifications">
|
||||
<ant:include name="**/*.java"/>
|
||||
@@ -93,7 +90,7 @@
|
||||
</patternset>
|
||||
|
||||
<!-- Tokenize the set of directories -->
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">${maven.javadoc.compile.src.set}</util:tokenize>
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">${context.getAntProject().getReferences().get('maven.compile.src.set')}</util:tokenize>
|
||||
|
||||
<!-- Counter used to name filesets -->
|
||||
<j:set var="src.set.counter" value="0"/>
|
||||
@@ -116,7 +113,7 @@
|
||||
|
||||
<j:set var="src.set.counter" value="${src.set.counter + 1}"/>
|
||||
</j:if>
|
||||
</j:forEach> <!-- dir in maven.javadoc.compile.src.set -->
|
||||
</j:forEach> <!-- dir in maven.compile.src.set -->
|
||||
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
@@ -203,10 +200,8 @@
|
||||
useexternalfile="${maven.javadoc.useexternalfile}"
|
||||
>
|
||||
|
||||
<ant:property name="maven.javadoc.compile.src.set" refid="maven.compile.src.set"/>
|
||||
|
||||
<!-- Tokenize the set of directories -->
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">${maven.javadoc.compile.src.set}</util:tokenize>
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">${context.getAntProject().getReferences().get('maven.compile.src.set')}</util:tokenize>
|
||||
|
||||
<j:forEach var="dir" items="${sources.dirs}">
|
||||
|
||||
@@ -215,7 +210,7 @@
|
||||
<patternset refid="source.modifications"/>
|
||||
</ant:fileset>
|
||||
|
||||
</j:forEach>--> <!-- dir in maven.javadoc.compile.src.set -->
|
||||
</j:forEach>--> <!-- dir in maven.compile.src.set -->
|
||||
|
||||
<j:if test="${context.getVariable('maven.javadoc.source') != null}">
|
||||
<ant:setProperty name="source" value="${maven.javadoc.source}" />
|
||||
@@ -346,12 +341,8 @@
|
||||
automatically doc-files directories.
|
||||
We must do it manually.
|
||||
-->
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">${context.getAntProject().getReferences().get('maven.compile.src.set')}</util:tokenize>
|
||||
<ant:copy todir="${maven.javadoc.destdir}">
|
||||
|
||||
<util:tokenize var="sources.dirs" delim="${path.separator}">
|
||||
${maven.javadoc.compile.src.set}
|
||||
</util:tokenize>
|
||||
|
||||
<j:forEach var="dir" items="${sources.dirs}">
|
||||
<ant:fileset dir="${dir}">
|
||||
<ant:include name="**/doc-files/**/*"/>
|
||||
@@ -433,4 +424,4 @@
|
||||
project="${pom}"/>
|
||||
|
||||
</goal>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
<goal name="test-javadoc-multi-src">
|
||||
<delete dir="${maven.build.dir}" failonerror="false"/>
|
||||
<ant:path id="test.src.set">
|
||||
<ant:fileset dir="${basedir}/src/main"/>
|
||||
<ant:fileset dir="${basedir}/src/opt"/>
|
||||
<ant:pathelement path="${basedir}/src/opt"/>
|
||||
</ant:path>
|
||||
<maven:addPath id="maven.compile.src.set" refid="test.src.set"/>
|
||||
<attainGoal name="maven-javadoc-plugin:report"/>
|
||||
@@ -52,17 +51,13 @@
|
||||
<!-- assert that doc-files are copied - Issue MPJAVADOC-24 -->
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven/doc-files/example.txt"/>
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven2/doc-files/example.txt"/>
|
||||
<!--
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven3/doc-files/example.txt"/>
|
||||
-->
|
||||
<!-- assert that javadoc for classes Dummy, Dummy2, Dummy3, Dummy5, Dummy6 are generated -->
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven/Dummy.html"/>
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven/Dummy2.html"/>
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven2/Dummy3.html"/>
|
||||
<!--
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven3/Dummy5.html"/>
|
||||
<assert:assertFileExists file="${maven.javadoc.destdir}/org/apache/maven3/Dummy6.html"/>
|
||||
-->
|
||||
</goal>
|
||||
|
||||
<goal name="test-javadoc-jar">
|
||||
@@ -70,4 +65,4 @@
|
||||
<attainGoal name="javadoc:jar"/>
|
||||
<assert:assertFileExists file="${maven.build.dir}/${maven.final.name}_javadoc.jar"/>
|
||||
</goal>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<body>
|
||||
<release version="1.5.1-SNAPSHOT" date="In CVS">
|
||||
<action dev="aheritier" type="fix" issue="MPJAVADOC-24">doc-files directories contents are correctly copied.</action>
|
||||
<action dev="brett" type="fix" issue="MPJAVADOC-5">Add support for multiple source directories.</action>
|
||||
</release>
|
||||
<release version="1.5" date="2004-05-15">
|
||||
<action dev="dion" type="fix">javadoc:jar changed to place the jar in maven.build.dir</action>
|
||||
|
||||
Reference in New Issue
Block a user