You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Angeshwar Deepak <an...@yahoo.com> on 2004/07/28 15:55:27 UTC
Querry reg Site structure.
Hi,
Consider I have a directory structure like this
c:\test\logging\
c:\test\logging\build\
c:\test\logging\build\test\report\html\logging\findbugs
c:\test\logging\build\test\report\html\logging\javadocs
c:\test\logging\build\test\report\html\logging\pmd
.....and so on
I dont run forrest seed, but rather simply copy
the required xml files and images from a parent
directory
above test directory i.e. I manually create
../../logging/build/tmp/context/content/xdocs
../../logging/src/documentation/content/xdocs
Under the xdocs directory, I have a directory
structure
as
../../content/xdocs/logging/findbugs
../../content/xdocs/logging/pmd
../../content/xdocs/logging/junit
and so on and on
I am presently running the forrest from the
c:\test\logging\
directory.
So I have a structure as
D:\test\logging\src\documentation\content\xdocs
is ${project.content-dir}
Where all the xml,ihtml, images are stored.
and
c:\test\logging\
is ${project.home}
The final site is genetarted in the directory
D:\test\logging\build\test\report\html\index.html
Under this I have directories
c:\test\logging\build\test\report\html\logging\findbugs
c:\test\logging\build\test\report\html\logging\javadocs
c:\test\logging\build\test\report\html\logging\pmd
So links in the index.html points to files in logging.
So far its clear.
Only now I came to know that there will be many more
dirctories like 'logging'.
i.e. I will be running the forrest not in the
c:\test\logging\
directory, but rather in c:\test\
So the properties should be generic.
i.e. under each directory like logging a site will be
generated
and all the pages should link with one another.
How do I make the set up generic.
Rightn now in my site.xml I have something like
<logmessages label="Logmessages"
href="logging/messages/logmessages.html"
description="LogMessage Report"/>
This generates a right link
However in the same file if I have
<logmessages label="Logmessages"
href="appintegration/messages/logmessages.html"
description="LogMessage Report"/>
It will show a error since I am not in the
appintegration directory and forrest cant find any
file
as I am in the logging directory.(i.e. there is no
directory as appintegration in my current working
directory)
So how can I make the links in site.xml generic so
that it forrest runs from any base directory without
any conflicts.
Kindly excuse me for the unclear explanation,
tree command does not work in my pc.
bye,
with regards,
Deepak.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
Re: Querry reg Site structure.
Posted by Dave Brondsema <da...@brondsema.net>.
Angeshwar Deepak wrote:
> Hi,
>
> I got what you said. The only problem is consider my
> site.xml file as
>
> <site>
> <reports label="Reports" href="reports/">
> <pmd label="PMD" href="pmd/index.html"/>
> <findbugs label="Findbugs"
> href="findbugs/index.html"/>
> </reports>
> </site>
>
Looks good.
> As I said earlier I will be having only 1 site.xml in
> a common folder above c:\test directory. So I will be
> copying site.xml to the working directory.
>
Good.
> In the site.xml file the 'href="reports" ' has to
> change dynamically. i.e. when I am in
>
> c:\test\logging\
>
> directory, the href should point to 'logging'
> similarly when I am in
> c:\test\integration\-it should point to 'integration'
> c:\test\dataf\-it should point to dataf
> .....and so on
>
I don't think it has to change. logging, integration, and dataf will
each have their own independent forrest sites. If you want to combine
them all, then we have a problem.. :-)
Each project will build this (replace X with projectname):
c:\test\X\build\site\index.html
c:\test\X\build\site\reports\pmd\index.html
c:\test\X\build\site\reports\findbugs\index.html
I don't know what your webserver is like, but something like this is
where you'd copy it to:
c:\web\index.html - main page with links to each project site
c:\web\logging\* - copied from c:\test\logging\build\site\
c:\web\integration\* - copied from c:\test\integration\build\site\
c:\web\dataf\* - copied from c:\test\dataf\build\site\
I hope that makes sense!
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal
Re: Querry reg Site structure.
Posted by Angeshwar Deepak <an...@yahoo.com>.
Hi,
I got what you said. The only problem is consider my
site.xml file as
<site>
<reports label="Reports" href="reports/">
<pmd label="PMD" href="pmd/index.html"/>
<findbugs label="Findbugs"
href="findbugs/index.html"/>
</reports>
</site>
As I said earlier I will be having only 1 site.xml in
a common folder above c:\test directory. So I will be
copying site.xml to the working directory.
In the site.xml file the 'href="reports" ' has to
change dynamically. i.e. when I am in
c:\test\logging\
directory, the href should point to 'logging'
similarly when I am in
c:\test\integration\-it should point to 'integration'
c:\test\dataf\-it should point to dataf
.....and so on
How can this change be made?
I do have the value of logging, integration etc as a
property like
<property name="deploy.home"
value="${build.test.report.html}/${component}"/>
where ${component} represents logging or integration
etc, depending upon the present working dir.
So if I am in logging the ${component} takes value of
logging, if I am in Integration dir then it takes that
vale.
So the only problem is how to bring in the property
from a diff xml file to the site.xml and use it here.
Any help reg this will be great!!
bye,
with regards,
Deepak.
--- Dave Brondsema <da...@brondsema.net> wrote:
> On Wed, 28 Jul 2004, Angeshwar Deepak wrote:
>
> > Hi,
> >
> > Consider I have a directory structure like this
> >
> > c:\test\logging\
> > c:\test\logging\build\
> >
>
c:\test\logging\build\test\report\html\logging\findbugs
> >
>
c:\test\logging\build\test\report\html\logging\javadocs
> > c:\test\logging\build\test\report\html\logging\pmd
> > .....and so on
>
> > So links in the index.html points to files in
> logging.
>
> > Only now I came to know that there will be many
> more
> > dirctories like 'logging'.
> > i.e. I will be running the forrest not in the
> > c:\test\logging\
> > directory, but rather in c:\test\
> >
>
> You have two logging directories and this is
> confusing things. This is
> what I would do. Have c:\test\PROJECT_NAME for each
> PROJECT_NAME and the
> site.xml for each one will be like:
>
> <site>
> <reports label="Reports" href="reports/">
> <pmd label="PMD" href="pmd/index.html"/>
> <findbugs label="Findbugs"
> href="findbugs/index.html"/>
> </reports>
> </site>
>
> Since the site.xml is the same, you probably want to
> have a simple script
> that copies the site.xml (and tab.xml and anything
> else in common) from a
> seperate, shared directory (mayb c:\test\common) and
> then run forrest.
>
> I don't think you need to change the build
> directory. After it is built
> to build/site you copy it to the final hosting
> location. (You can
> automate this using forrestbot; this corresponds to
> the 'deploy'
> workstage).
>
> Using forrestbot can also help with getting common
> files set up.
> Forrestbot uses ant, so you can use <import> to
> share common functionality
> for each projects' forrestbot buildfile. And one of
> those common tasks
> would be to copy the common files.
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
> http://csx.calvin.edu : student org
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Querry reg Site structure.
Posted by Dave Brondsema <da...@brondsema.net>.
On Wed, 28 Jul 2004, Angeshwar Deepak wrote:
> Hi,
>
> Consider I have a directory structure like this
>
> c:\test\logging\
> c:\test\logging\build\
> c:\test\logging\build\test\report\html\logging\findbugs
> c:\test\logging\build\test\report\html\logging\javadocs
> c:\test\logging\build\test\report\html\logging\pmd
> .....and so on
> So links in the index.html points to files in logging.
> Only now I came to know that there will be many more
> dirctories like 'logging'.
> i.e. I will be running the forrest not in the
> c:\test\logging\
> directory, but rather in c:\test\
>
You have two logging directories and this is confusing things. This is
what I would do. Have c:\test\PROJECT_NAME for each PROJECT_NAME and the
site.xml for each one will be like:
<site>
<reports label="Reports" href="reports/">
<pmd label="PMD" href="pmd/index.html"/>
<findbugs label="Findbugs" href="findbugs/index.html"/>
</reports>
</site>
Since the site.xml is the same, you probably want to have a simple script
that copies the site.xml (and tab.xml and anything else in common) from a
seperate, shared directory (mayb c:\test\common) and then run forrest.
I don't think you need to change the build directory. After it is built
to build/site you copy it to the final hosting location. (You can
automate this using forrestbot; this corresponds to the 'deploy'
workstage).
Using forrestbot can also help with getting common files set up.
Forrestbot uses ant, so you can use <import> to share common functionality
for each projects' forrestbot buildfile. And one of those common tasks
would be to copy the common files.
--
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org