Only some jars contains API meant to be used by customers. No point in having Javadoc for internal code, that will be confusing for the customer.

For our internal use we are using Eclipse and having "projects dependencies" in the .classpath file instead of JAR dependencies so all javadoc will be available form the java source code in a IDE.

Anyway the exclude can do but since we have so many packages to exclude it is not really a good solution.

Thanks
Lucas

On 04/08/2011 04:01 PM, Anders Hammar wrote:
Although you can't exclude projects you should be able to what you want by excluding packages.

In any case, the problems you are running into is mostly because you're trying to do something isn't the Maven main road. :-) Why isn't a javadoc jar for each artifact good enough? That's how your IDE wants it in any case.

/Anders


On Fri, Apr 8, 2011 at 15:47, Lucas Persson <lucas.pers...@oracle.com> wrote:
Hi

Yes but the two things have to happen at the same time :-)

yes javadoc:aggregate-jar will produce a single jar of javadoc but I can not see that I can exclude or include projects.
It seem to take all projects the the multiproject defines.
/Lucas

On 04/08/2011 02:29 PM, Anders Hammar wrote:
I think you're asking two different things here:
1. You only want a javadoc for some projects.
2. You want a single aggrgated javadoc jar

For #2, would the aggregate-jar goal of the javadoc plugin work?


/Anders

On Fri, Apr 8, 2011 at 13:36, Lucas Persson <lucas.pers...@oracle.com> wrote:
Hi

I want to generate and release the javadoc (e.g. the javadoc.jar should be a release artefacts just like any other JAR)
But only some projects contains public java code that javadoc should be generated for.
And if I have for instance 4 projects for which I want to generate javadoc I only want one javadoc.jar in the end with the complete source tree.

I really thought that I found the solution to this in
http://stackoverflow.com/questions/4947215/maven-3-generate-javadoc-for-defined-artifacts
but the bug reported in http://jira.codehaus.org/browse/MDEP-291 seem to hinder it.

I really do not want to have some relative path from the 'javadoc project' to the projects where the source are in.


I have also played around with different combination on <skip>
like this in the multiproject
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <skip>false</skip>
        </configuration>
      </plugin>   
    </plugins>
    <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>   
    </plugins>

And in those subproject that I really want javadoc for added:
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <skip>false</skip>
        </configuration>
      </plugin>   



So I then tried to use >includePackageNames> but that does not exists.
Only <excludePackageNames> but then I need to exclude like hundred of package names, sigh.

/Lucas



--
Oracle

Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile: +46730946656
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm


Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746

Green
                                Oracle
Oracle is committed to developing practices and products that help protect the environment


--
Oracle

Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile: +46730946656
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm


Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746

Green Oracle
Oracle is committed to developing practices and products that help protect the environment


--
Oracle

Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile: +46730946656
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm


Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746

Green
            Oracle
Oracle is committed to developing practices and products that help protect the environment

Reply via email to