[
http://jira.codehaus.org/browse/MJAVADOC-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253498#action_253498
]
Igor Sereda commented on MJAVADOC-299:
--------------------------------------
This also works as a workaround: <additionalparam>-exclude
foo.bar.internal</additionalparam>
> excludePackageNames has no effect if subpackages is specified
> -------------------------------------------------------------
>
> Key: MJAVADOC-299
> URL: http://jira.codehaus.org/browse/MJAVADOC-299
> Project: Maven 2.x Javadoc Plugin
> Issue Type: Bug
> Affects Versions: 2.7
> Reporter: Paul Mealor
> Priority: Minor
> Attachments: MJAVADOC-299.zip, MJAVADOC-299_IT_Test.patch
>
>
> I am using a configuration something like the following:
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.7</version>
> <executions>
> <execution>
> <configuration>
> <subpackages>foo.bar.api</subpackages>
>
> <excludePackageNames>foo.bar.api.impl:*impl:*.impl</excludePackageNames>
> <debug>true</debug>
> </configuration>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> When I do this, every package under subpackages is included in my Javadoc,
> including foo.bar.api.impl. The @options file includes "-subpackages
> foo.bar.api", but does not include "-exclude". No @packages file is created.
> If I do not include <subpackages/>, the <excludePackageNames/> works as
> desired: an @packages file is produced that excludes every package named like
> *.impl. Unfortunately, in my case, this means that packages like foo.bar.qux
> is included in the Javadoc, and I do not want that included.
> It would seem sensible if <subpackages/> was used to generate the @packages
> file, the same as if no packages are specified. Then <excludePackageNames/>
> could be applied to the list of packages in that file.
> My best workaround so far is to do the following, which tricks Javadoc and
> the plugin into building only foo.bar.api and foo.bar.api.event
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.7</version>
> <executions>
> <execution>
> <configuration>
> <subpackages>none</subpackages>
> <additionalparam>foo.bar.api foo.bar.api.event</additionalparam>
> <debug>true</debug>
> </configuration>
> <goals>
> <goal>jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira