You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by or...@io7m.com on 2014/03/31 19:47:43 UTC

Correct way to include aggregated javadocs in subproject assembly?

Hello.

I have the following projects:

  io7m-example/
    io7m-example-lib1
    io7m-example-lib2
    io7m-example-documentation

The io7m-example-documentation project contains documentation written
in a DocBook-like language which is processed into XHTML at build time
and then packaged up into a zip file using the assembly plugin. The
io7m-example-documentation has a dependency on both io7m-example-lib1
and io7m-example-lib2.

I'd like to include aggregated javadocs from io7m-example-lib1 and
io7m-example-lib2 in the assembly but am running into walls at every
step.

Firstly, the javadoc plugin states that the aggregate goal should be
run as a report. As far as I know, that's not an option here, because
the output of the goal (the aggregated HTML) needs to be available to
the assembly plugin that's going to run in the package phase, and
reports are only going to be run afterwards as part of site generation.

Secondly, the javadoc plugin stubbornly refuses to do anything at all.

I have the following in the io7m-example-documentation project:

      <!-- Produce aggregate dependency javadocs -->
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>javadoc-aggregate</id>
            <phase>package</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
              <includeDependencySources>true</includeDependencySources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Produce documentation archive -->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/documentation.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

When I run "mvn -C clean package" from the io7m-example, the
io7m-example-lib1 and io7m-example-lib2 projects are compiled and
tested. The io7m-example-documentation project is executed and an
assembly is created, but the javadoc plugin appears to do precisely
nothing. No ${project.build.directory}/apidocs is created and no
error is signalled.

Am I doing something obviously wrong here?

M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Correct way to include aggregated javadocs in subproject assembly?

Posted by or...@io7m.com.
On Mon, 31 Mar 2014 17:47:43 +0000
<or...@io7m.com> wrote:
>
> When I run "mvn -C clean package" from the io7m-example, the
> io7m-example-lib1 and io7m-example-lib2 projects are compiled and
> tested.

Additional:  io7m-example-lib1 and io7m-example-lib2 are configured
to produce source jars, as per the javadoc plugin instructions (this
is standard for all our projects anyway, as the central repository
requires it).

M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [fixed] Correct way to include aggregated javadocs in subproject assembly?

Posted by or...@io7m.com.
On Tue, 1 Apr 2014 19:48:14 +0000
<or...@io7m.com> wrote:

> Noone does this?
> 
> Here's a small example that reproduces the issue:
> 
> https://github.com/io7m/maven-javadoc-bug-20140401
> 
> $ mvn -C clean package
> 
> The javadoc:aggregate goal runs as part of the docs project, but no
> javadoc is produced.

It seems that I actually want the javadoc:javadoc goal, which is the
opposite of what the documentation suggests. I've pushed the one-line
fix the repository above in case future archaeologists dig this up and
need an answer.

M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Correct way to include aggregated javadocs in subproject assembly?

Posted by or...@io7m.com.
Noone does this?

Here's a small example that reproduces the issue:

https://github.com/io7m/maven-javadoc-bug-20140401

$ mvn -C clean package

The javadoc:aggregate goal runs as part of the docs project, but no
javadoc is produced.

M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org