maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: javadoc plugin aggregation woes
Date Fri, 14 Aug 2009 13:33:04 GMT
<project>
  <parent>
   <artifactId>project-parent</artifactId>
 </parent>
 <artifactId>project-___</artifactId>
 <modules>
   <module>project-parent</module>
   <module>project-a</module>
   <module>project-b</module>
   ...
   <module>project-e</module>
 </modules>
  <dependencies>
    <dependency>
     <artifactId>project-a</artifactId>
    </dependency>
    <dependency>
     <artifactId>project-b</artifactId>
    </dependency>
   ...
    <dependency>
     <artifactId>project-e</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <inherited>false</inherited> <!-- not strictly speaking
necesaary, but best practice as we are binding an aggregator goal -->
        ...
      </plugin>
    </plugins>
  </build>
</project>


2009/8/14 Stephen Connolly <stephen.alan.connolly@gmail.com>:
> my understanding of aggregate is that it has to go where the <modules>
> (& by implication the dependencies) are
>
> 2009/8/14 Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>:
>> Ah. Exactly what I meant, but with the names complete and parent the other
>> way around. With the names your way around, the source and javadoc
>> aggregators would go in where?
>>
>> Stephen Connolly wrote:
>>>
>>> so to summarize:
>>>
>>> /project-complete
>>>  +- project-parent
>>>  +- project-a
>>>  +- project-b
>>>  ...
>>>  \- project-e
>>>
>>> project-complete has the following
>>>
>>> <project>
>>>  <parent>
>>>    <artifactId>project-parent</artifactId>
>>>  </parent>
>>>  <artifactId>project-___</artifactId>
>>>  <modules>
>>>    <module>project-parent</module>
>>>    <module>project-a</module>
>>>    <module>project-b</module>
>>>    ...
>>>    <module>project-e</module>
>>>  </modules>
>>> </project>
>>>
>>> project-parent has no <parent> section... or at least does not
>>> reference project-complete
>>>
>>> project-a, project-b, ..., project-e have the following
>>>
>>> <project>
>>>  <parent>
>>>    <artifactId>project-parent</artifactId>
>>>  </parent>
>>>  <artifactId>project-___</artifactId>
>>> </project>
>>>
>>>
>>>
>>>
>>> 2009/8/14 Stephen Connolly <stephen.alan.connolly@gmail.com>:
>>>>
>>>> 2009/8/14 Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>:
>>>>>
>>>>> Stephen Connolly wrote:
>>>>>>
>>>>>> sorry i'll correct that...
>>>>>>
>>>>>> you might also want to separate aggregation from inheritance and
have
>>>>>> the aggregator pom depend on the child poms, thereby ensuring that
the
>>>>>> build plan is correct.
>>>>>
>>>>> Yeah, I'm feeling that... my plan now is to have the modules, say:
>>>>>
>>>>> project-a
>>>>> project-b
>>>>> project-c
>>>>> project-d
>>>>> project-e
>>>>>
>>>>> with module/parent relationship with
>>>>
>>>> I would make project-complete the project with the <modules> section
>>>> and add project-master as a child of project-complete
>>>>
>>>>> project-master
>>>>>
>>>>> and then aggregate in
>>>>>
>>>>> project-complete
>>>>>
>>>>> So then, the dependencies of project-complete would be
>>>>> project-{a,b,c,d,e,},
>>>>> the modules of project-master would be the same, and
>>>>> project-{a,b,c,d,e,complete} would declare project-master as their
>>>>> parent.
>>>>> That make sense?
>>>>>
>>>>> Sam
>>>>>
>>>>>> 2009/8/14 Stephen Connolly <stephen.alan.connolly@gmail.com>:
>>>>>>>
>>>>>>> you might also want to separate aggregation from inheritance
and have
>>>>>>> the parent pom depend on the child poms, thereby ensuring that
the
>>>>>>> build plan is correct.
>>>>>>>
>>>>>>> 2009/8/14 David Hoffer <dhoffer6@gmail.com>:
>>>>>>>>
>>>>>>>> This works for us, try this in your parent pom:
>>>>>>>>
>>>>>>>> <build>
>>>>>>>>              <plugins>
>>>>>>>>                  <plugin>
>>>>>>>>                      <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>                      <artifactId>maven-javadoc-plugin</artifactId>
>>>>>>>>                      <version>2.5</version>
>>>>>>>>                      <executions>
>>>>>>>>                          <execution>
>>>>>>>>                              <id>attach-javadocs</id>
>>>>>>>>                              <goals>
>>>>>>>>                                  <goal>jar</goal>
>>>>>>>>                              </goals>
>>>>>>>>                          </execution>
>>>>>>>>                      </executions>
>>>>>>>>                  </plugin>
>>>>>>>>              </plugins>
>>>>>>>>          </build>
>>>>>>>>
>>>>>>>> <reporting>
>>>>>>>> ...
>>>>>>>> <plugin>
>>>>>>>>              <!--Provides javadocs-->
>>>>>>>>              <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>              <artifactId>maven-javadoc-plugin</artifactId>
>>>>>>>>              <version>2.5</version>
>>>>>>>>              <configuration>
>>>>>>>>                  <aggregate>true</aggregate>
>>>>>>>>              </configuration>
>>>>>>>>          </plugin>
>>>>>>>>
>>>>>>>> </reporting>
>>>>>>>>
>>>>>>>> -Dave
>>>>>>>>
>>>>>>>> On Fri, Aug 14, 2009 at 5:00 AM, Sam Barnett-Cormack <
>>>>>>>> s.barnett-cormack@lancaster.ac.uk> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> My first maven project, plain JavaSE. I want to build
javadoc jars,
>>>>>>>>> independent of any site - I'm trying to get that working
as well,
>>>>>>>>> but
>>>>>>>>> for
>>>>>>>>> now I'm considering them separately.
>>>>>>>>>
>>>>>>>>> For organisation purposes, I've split my work into several
projects,
>>>>>>>>> which
>>>>>>>>> I've now made modules of a parent. Creating a source
bundle with
>>>>>>>>> source:aggregate (having also done source:jar-no-fork
on the
>>>>>>>>> modules)
>>>>>>>>> was
>>>>>>>>> easy. Now I want to create a combined javadoc bundle,
and that's not
>>>>>>>>> proving
>>>>>>>>> easy.
>>>>>>>>>
>>>>>>>>> I've successfully got javadoc:jar running on the modules.
However,
>>>>>>>>> javadoc:aggregate-jar on the parent does nothing, as
far as I can
>>>>>>>>> tell.
>>>>>>>>>
>>>>>>>>> Now, since I'm using m2eclipse, I can happily create
a javadoc by
>>>>>>>>> running
>>>>>>>>> the eclipse javadoc builder over multiple projects, but
I'd rather
>>>>>>>>> integrate
>>>>>>>>> with maven if at all possible. Anyone have any ideas?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sam Barnett-Cormack
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>
>>>>> --
>>>>> Sam Barnett-Cormack
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> --
>> Sam Barnett-Cormack
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Mime
View raw message