You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by James CE Johnson <jc...@tragus.org> on 2007/04/24 17:34:03 UTC
Oddness with the site plugin
Apparently I have something of an odd use-case in the way I'm structuring my
projects. I'm open to advice...
I have the following project structure:
.../util/pom.xml
.../util/build/pom.xml
.../util/lang/pom.xml
.../util/io/pom.xml
.../util/misc/pom.xml
.../util/build/pom.xml defines my common dependencies, properties, etc.
Every other pom.xml in .../util (including .../util/pom.xml) extends this
one.
In .../util/pom.xml I have a <modules> tag that defines build, lang, io and
misc so that everything is built.
All good so far.
Now, when I do 'mvn site' it will happily build target/site in all of the
modules but when I point my browser to .../util/target/site/index.html I
have a 'Modules' heading but no links to modules.
After playing around a bit I realized that the only way to get the modules
into .../util/target/site/index.html is for each one to extend
.../util/pom.xml instead of .../util/build/pom.xml.
FWIW: I use .../util/build/pom.xml because Eclipse is stupid and won't let
me setup a project at .../util as well as each of .../util/(lang|io|misc).
Is there a way to leverage the goodness of inheritance without loosing the
multi-project site functionality?
Thanks,
James
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Oddness with the site plugin
Posted by James CE Johnson <jc...@tragus.org>.
> Not sure if it'd work, but you could try to move the contents of
> util/pom.xml into util/build/pom.xml. This would make "build" your parent
> project. Then you would eliminate util/pom.xml.
Yes, that's a good idea. But I need util/pom.xml because I have another
layer above that and I want it to be able to build the whole tree. That is,
my full tree looks something like:
/myCo
/myCo/common
/myCo/common/build
/myCo/common/build/pom.xml
/myCo/common/util
/myCo/common/util/...
/myCo/common/tools
/myCo/common/tools/...
/myCo/common/build/pom.xml is, ultimately, my ancestral pom that holds all
of my common build configuration. e.g. -- configuration of common plugins,
commonly used dependencies and properties, etc... Every project extends that
either directly or indirectly.
I need to point my continuous integration to /myCo/common to build my
"common world" and the resulting site should, ideally, reflect all of the
subprojects.
I *think* I can rearrange the lineage such that it all works out without too
much pain. I was just a bit surprised to discover that the modules<->parent
linkage is bi-directional. In fact, now that I know that, I'm a little
surprised that maven didn't throw an exception because I had, effectively,
project A with child (module) B which had parent C.
> James CE Johnson wrote:
>> Apparently I have something of an odd use-case in the way I'm
>> structuring my projects. I'm open to advice...
>>
>> I have the following project structure:
>> .../util/pom.xml
>> .../util/build/pom.xml
>> .../util/lang/pom.xml
>> .../util/io/pom.xml
>> .../util/misc/pom.xml
>>
>> .../util/build/pom.xml defines my common dependencies, properties, etc.
>> Every other pom.xml in .../util (including .../util/pom.xml) extends
>> this one.
>>
>> In .../util/pom.xml I have a <modules> tag that defines build, lang, io
>> and misc so that everything is built.
>>
>> All good so far.
>>
>> Now, when I do 'mvn site' it will happily build target/site in all of
>> the modules but when I point my browser to
>> .../util/target/site/index.html I have a 'Modules' heading but no links
>> to modules.
>>
>> After playing around a bit I realized that the only way to get the
>> modules into .../util/target/site/index.html is for each one to extend
>> .../util/pom.xml instead of .../util/build/pom.xml.
>>
>> FWIW: I use .../util/build/pom.xml because Eclipse is stupid and won't
>> let me setup a project at .../util as well as each of
>> .../util/(lang|io|misc).
>>
>> Is there a way to leverage the goodness of inheritance without loosing
>> the multi-project site functionality?
>>
>> Thanks,
>> James
>>
>> --------------------------------------------------------------------- To
>> unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> --
> Dennis Lundberg
>
> --------------------------------------------------------------------- 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
Re: Oddness with the site plugin
Posted by Dennis Lundberg <de...@apache.org>.
Not sure if it'd work, but you could try to move the contents of
util/pom.xml into util/build/pom.xml. This would make "build" your
parent project. Then you would eliminate util/pom.xml.
James CE Johnson wrote:
> Apparently I have something of an odd use-case in the way I'm structuring my
> projects. I'm open to advice...
>
> I have the following project structure:
> .../util/pom.xml
> .../util/build/pom.xml
> .../util/lang/pom.xml
> .../util/io/pom.xml
> .../util/misc/pom.xml
>
> .../util/build/pom.xml defines my common dependencies, properties, etc.
> Every other pom.xml in .../util (including .../util/pom.xml) extends this
> one.
>
> In .../util/pom.xml I have a <modules> tag that defines build, lang, io and
> misc so that everything is built.
>
> All good so far.
>
> Now, when I do 'mvn site' it will happily build target/site in all of the
> modules but when I point my browser to .../util/target/site/index.html I
> have a 'Modules' heading but no links to modules.
>
> After playing around a bit I realized that the only way to get the modules
> into .../util/target/site/index.html is for each one to extend
> .../util/pom.xml instead of .../util/build/pom.xml.
>
> FWIW: I use .../util/build/pom.xml because Eclipse is stupid and won't let
> me setup a project at .../util as well as each of .../util/(lang|io|misc).
>
> Is there a way to leverage the goodness of inheritance without loosing the
> multi-project site functionality?
>
> Thanks,
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org