Hi,

Attached are 8k of files implementing a very minimal Maven Forrest
plugin. The README.txt file describes how to build it.

It will generate a website based on XML content from
src/documentation/contents/xdocs, and images from
src/documentation/resources/images. These directories are not currently
customizable.

A current 'feature' is that if no content is found (src/documentation/*),
then it will create a skeleton doc structure, and build that.

So, assuming you've installed it, you can pick any Maven project to try
it out. Output from running 'maven forrest' in Commons 'lang' is appended. By
copying the attached forrest-project.xml to the Forrest project (renaming to
project.xml), one can use Maven to build the Forrest docs.

Further progress on this plugin is dependent on progress in reorganising the
Forrest build system, currently being discussed on forrest-dev. The idea is
that Forrest maintains an Ant script whose targets will build docs in any
project, and then the Maven (and Centipede) plugins are just a thin wrapper
around this.


--Jeff


jeff@expresso:~/apache/jakarta/jakarta-commons/lang$ maven forrest
 __  __
|  \/  |__ Jakarta _ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|   v. 1.0-b5-dev

Lang (commons-lang) 1.0-dev
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang

forrest:transform:
    [echo] 
      -------------------------------------------
      |       Forrest starter script
      |
      | Using ${forrest.home} = 
/home/jeff/maven/plugins/maven-forrest-plugin-0.1/xml-forrest
      | Building docs in 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang
      -------------------------------------------
    
    [echo] Creating skeleton xdocs structure
    [mkdir] Created dir: 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/src/documentation/content/xdocs
    [copy] Copying 3 files to 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/src/documentation/content/xdocs
    [echo] Generated new project
    [echo] Now generating docs from skeleton project..
    [delete] Deleting directory 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/work/cache-dir
    [echo] 
      -------------------------------------------
      |       Forrest starter script
      |
      | Using ${forrest.home} = 
/home/jeff/maven/plugins/maven-forrest-plugin-0.1/xml-forrest
      | Building docs in 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang
      -------------------------------------------
    
    [available] DEPRECATED - <available> used to override an existing property.
  Build file should not reuse the same property name for different values.
    [echo] Running docs generation from: ./src/documentation.
    [mkdir] Created dir: 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/docs
    [copy] Copying 3 files to 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/work
    [copy] Copying 3 files to 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/work
    [echo] -------------------------------------------------------------
    [echo]   Building docs, please stand by ...
    [java] 
    [java] setup..........done.
    [java] Warming up...
    [java] ...ready, let's go:
    [java] URI: index.html
    [java]   getting links: ..
    [java] .
    [java] .
    [java]   [broken link]--> images/group-logo.gif
    [java]   [broken link]--> images/project-logo.gif
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] .
    [java] 
    [java]   processing
    [java]   [text/html]--> index.html
    [java] URI: skin/page.css
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/page.css
    [java] URI: skin/images/spacer.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/spacer.gif
    [java] URI: skin/breadcrumbs.js
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/breadcrumbs.js
    [java] URI: skin/images/search-left.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/search-left.gif
    [java] URI: skin/images/search-right.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/search-right.gif
    [java] URI: skin/images/tabSel-left.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/tabSel-left.gif
    [java] URI: skin/images/tabSel-right.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/tabSel-right.gif
    [java] URI: changes.html
    [java]   getting links: .  [broken link]--> images/group-logo.gif
    [java]   [broken link]--> images/project-logo.gif
    [java]   [broken link]--> changes.pdf
    [java]   [broken link]--> images/add.jpg
    [java] 
    [java]   processing
    [java]   [text/html]--> changes.html
    [java] URI: todo.html
    [java]   getting links: .  [broken link]--> images/group-logo.gif
    [java]   [broken link]--> images/project-logo.gif
    [java]   [broken link]--> todo.pdf
    [java] 
    [java]   processing
    [java]   [text/html]--> todo.html
    [java] URI: skin/images/menu-left.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/menu-left.gif
    [java] URI: skin/images/menu-right.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/menu-right.gif
    [java] URI: index.pdf
    [java]   getting links: .
    [java]   processing
    [java]   [application/pdf]--> index.pdf
    [java] URI: skin/images/printer.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/printer.gif
    [java] URI: skin/images/label.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/label.gif
    [java] URI: skin/images/page.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/page.gif
    [java] URI: skin/images/chapter.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/chapter.gif
    [java] URI: skin/images/chapter_open.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/chapter_open.gif
    [java] URI: skin/images/current.gif
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> skin/images/current.gif
    [java] URI: /favicon.ico
    [java]   getting links: .
    [java]   processing
    [java]   [{mime-type}]--> /favicon.ico
    [java] 
    [java] disposing....done.
    [echo]   ...docs generated successfully in 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/docs
    [echo] -------------------------------------------------------------
    [echo] 
      Done! Please point your browser at 
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/target/docs to see the 
generated
      docs, and then fill in the content by editing the XML files at
      
/old/home/jeff/homeoverflow/apache/jakarta/jakarta-commons/lang/src/documentation/content/xdocs
    

forrest:

BUILD SUCCESSFUL
Total time: 40 seconds



                            Maven Forrest plugin 0.1

                                [EMAIL PROTECTED]

                                "Don't blame me"
                            ========================

Installation instructions:
--------------------------

1) Assuming you have Maven from CVS, unpack forrest-plugin-0.1.tgz in the
$MAVEN_HOME/src/plugins-build directory, where it will create a 'forrest'
subdirectory, henceforth referred to as $PLUGIN_HOME

2) Obtain the xml-forrest CVS module, build it, and place the built project in
$PLUGIN_HOME/xml-forrest. This can be done a number of ways:

2.1) The Easy Way.

    This is for if you don't have Forrest locally. If you do, go to 2.2.1.

    Go to $PLUGIN_HOME and run:

     ant -Dforrest.home=xml-forrest -f acorn.xml get-forrest build-forrest

    This will download xml-forrest from CVS and build it.

2.2) The Hard Way.

2.2.1) Get xml-forrest CVS module

Either from CVS:

cd $PLUGIN_HOME
CVSROOT=:pserver:[EMAIL PROTECTED]:/home/cvspublic ; export CVSROOT
CVS_RSH=ssh ; export CVS_RSH
cvs login
(type 'anoncvs')
cvs co xml-forrest

Or just copy it from wherever it is on your hard disk to $PLUGIN_HOME/xml-forrest:

cp -rp $HOME/apache/xml/xml-forrest .

2.2.2) Build xml-forrest

cd xml-forrest
./build.sh jar

3) Build the Forrest plugin.

I do this by going to $MAVEN_HOME, and typing:

  maven maven:plugin -Dplugin.name=forrest

It will install the Forrest plugin to your local Maven installation.


Usage instructions:
------------------

1) Go to any Maven project, or create a project.xml in a clean directory.
2) Make sure you don't mind the contents of target/docs being messed up.
3) Type 'maven forrest'. This builds any xdocs in
src/documentation/content/xdocs, which is where Forrest expects them.

 - If that directory is empty, a skeleton doc structure will be created, and
   then Forrest invoked to build the docs.
 - If a Forrest doc structure exists, docs will be (re)built.

4) Docs will have been built in target/docs.
5) If you let Forrest 'seed' your project with it's skeleton doc structure, you
can clean it up by deleting src/documentation/content, and the status.xml file.


Attachment: forrest-plugin-0.1.tgz
Description: GNU Unix tar archive

<?xml version="1.0" encoding="ISO-8859-1"?>
<project>

  <pomVersion>3</pomVersion>
  <id>forrest</id>
  <name>Forrest</name>
  <currentVersion>1.0</currentVersion>
  <organization>
    <name>Apache Software Foundation</name>
    <url>http://jakarta.apache.org/</url>
    <logo>FOOjakarta-logo-blue.gif</logo>
  </organization>
  <inceptionYear>2001</inceptionYear>
  <package>org.apache.forrest</package>
  <logo>BAR/images/maven.jpg</logo>
  
  <!-- Gump integration -->
  <gumpRepositoryId>jakarta</gumpRepositoryId>

  <shortDescription>A project doc system based on Cocoon</shortDescription>

  <url>http://jakarta.apache.org/forrest</url>
  <siteAddress>xml.apache.org</siteAddress>

  <repository>
    <connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:xml-forrest</connection>
    <url>http://cvs.apache.org/viewcvs/xml-forrest/</url>
  </repository>

  <mailingLists/>
  <developers/>

  <!-- Need to mark these as compile-time/run-time -->

  <dependencies/>

  <build>
    <sourceDirectory>src/java</sourceDirectory>
  </build>
</project>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to