You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rob Greene <ro...@gmail.com> on 2010/05/15 16:59:57 UTC

Adding application generated content to site

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?  I imagine I would need to invoke my Java to generate the content
as well as dynamically add links into the menu structure.

Thanks!
-Rob

Re: Adding application generated content to site

Posted by Rob Greene <ro...@gmail.com>.
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 <ms...@schor.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Adding application generated content to site

Posted by Marshall Schor <ms...@schor.com>.

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Adding application generated content to site

Posted by Martin Gainty <mg...@hotmail.com>.
Rob-

 

have you looked comunidus
at http://opencms-maven.comundus.com/comundus/opencms/html/main/documentation/setup/index.html#introduction


?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Sat, 15 May 2010 09:59:57 -0500
> Subject: Adding application generated content to site
> From: robgreene@gmail.com
> To: users@maven.apache.org
> 
> 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? I imagine I would need to invoke my Java to generate the content
> as well as dynamically add links into the menu structure.
> 
> Thanks!
> -Rob
 		 	   		  
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4