Thanks for the suggestions!  I found yet a ... fourth? ... method to do
this:  I used the exec-maven-plugin which runs the 'main' method in a class.

I wrote a quick app that loaded the object models to be documented
(everything here is reused, of course, so nothing new).  Once loaded, I then
write out an APT formatted document so everything has the same styling.  It
really went very quickly.

Then I decided to modify the 'site.xml' file and locate the area for the
dynamic content.  That is also a quick thing to put together.

I added the plugin to the pre-site phase which generates this stuff before
the site itself is created and remains current.

Works really slick too!  The only sad part is that the m2eclipse plugin
(Maven 3.0) doesn't handle the site plugin, so I needed a command window
while working out the details.

Thanks!
-Rob

On Sun, May 16, 2010 at 11:26 AM, Marshall Schor <[email protected]> wrote:

>
>
> On 5/15/2010 10:59 AM, Rob Greene wrote:
> > I have an application that has the ability to generate some documentation
> I
> > would like to include in the Maven generated site.  Is there some manner
> to
> > do this?
> Sure.
> >   I imagine I would need to invoke my Java to generate the content
> >
> Right.   You could write a maven plugin (it's not really very hard to
> do) that runs your Java code to generate the content.  Or you could use
> the antrun plugin for this, assuming you know how to have ant invoke
> your Java.  Or, you could use the enforcer plugin (!) because it has one
> rule called evaluateBeanshell, which you can use to run arbitrary
> beanshell code (which I think could call your Java).  Or you could use
> the gmaven plugin to run an arbitrary groovy script which could call
> your Java.
>
> You get the idea ...
>
> Any of these methods can be configured in the POM to run at a particular
> "phase" of the maven build cycle(s).
>
> > as well as dynamically add links into the menu structure.
> >
> I'm not sure what the best way to do this is...   Since you would be
> configuring this project to have the maven generated docs plus the ones
> you generate, it seems that you would be able to un-dynamically add
> links into the menu structure ahead of time.  Or, if the need for
> dynamic links comes from the Java-generated docs generating lots of
> alternatives over time, you could have a "main" static link on the site
> point to a page generated by your Java which has the dynamically altered
> information and links.
>
> HTH.  -Marshall Schor
> > Thanks!
> > -Rob
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to