Site breadcrumbs: trouble with inheritance
Hi all, I have the following two projects: A dedicated website project for my root URL org.example:site (with urlhttp://example.org//url) and an organizational POM org.example:parent (with urlhttp://example.org/parent/url) The parent of org.example:site is the organizational POM, org.example:parent. Both projects have their own site.xml. So far, I think, that's all according to Best Practices. The trouble starts once I configure breadcrumbs. What I want to generate are the following two breadcrumb trails: Example.org Site and Example.org Site Example.org Parent for org.example:site and org.example:parent, respectively. Note that these two trails do not mirror the project's inheritance tree, but rather the users' expectations (org.example:site is the main website artifact, after all). But no matter what breadcrumbs I define in the site.xml of both projects, I cannot get the desired effect. In particular, the following doesn't work: !--org.example:parent's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// item name=Example.org Parent href=http://example.org/parent// /breadcrumbs !--org.example:site's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// /breadcrumbs While the breadcrumbs of org.example:parent are correct, the trail of org.example:site is simply too long: Example.org Site Example.org Parent It's almost as if not merging occurred at all. But it gets worse: If I change the site.xml of org.example:site just slightly, the breadcrumb trail of org.example:site grows even longer: breadcrumbs item name=Example.org *Main* Site href=http://example.org// /breadcrumbs yields Example.org Site Example.org Parent Example.org *Main* Site Can someone please explain to me what's going on here? To me, the inheritance behavior of breadcrumbs looks rather random. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site breadcrumbs: trouble with inheritance
Which version of the site plugin are you using? Please try latest snapshots (2.3- or 3.0-beta-4-) and report back. Thanks, -Lukas Andreas Sewe wrote: Hi all, I have the following two projects: A dedicated website project for my root URL org.example:site (with urlhttp://example.org//url) and an organizational POM org.example:parent (with urlhttp://example.org/parent/url) The parent of org.example:site is the organizational POM, org.example:parent. Both projects have their own site.xml. So far, I think, that's all according to Best Practices. The trouble starts once I configure breadcrumbs. What I want to generate are the following two breadcrumb trails: Example.org Site and Example.org Site Example.org Parent for org.example:site and org.example:parent, respectively. Note that these two trails do not mirror the project's inheritance tree, but rather the users' expectations (org.example:site is the main website artifact, after all). But no matter what breadcrumbs I define in the site.xml of both projects, I cannot get the desired effect. In particular, the following doesn't work: !--org.example:parent's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// item name=Example.org Parent href=http://example.org/parent// /breadcrumbs !--org.example:site's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// /breadcrumbs While the breadcrumbs of org.example:parent are correct, the trail of org.example:site is simply too long: Example.org Site Example.org Parent It's almost as if not merging occurred at all. But it gets worse: If I change the site.xml of org.example:site just slightly, the breadcrumb trail of org.example:site grows even longer: breadcrumbs item name=Example.org *Main* Site href=http://example.org// /breadcrumbs yields Example.org Site Example.org Parent Example.org *Main* Site Can someone please explain to me what's going on here? To me, the inheritance behavior of breadcrumbs looks rather random. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site breadcrumbs: trouble with inheritance
Hi Lukas, Which version of the site plugin are you using? Please try latest snapshots (2.3- or 3.0-beta-4-) and report back. thanks for the quick reply. Forget to mention that I am using 3.0-beta-4-SNAPSHOT under Maven 3.0.3. Sorry about that. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site breadcrumbs: trouble with inheritance
Andreas Sewe wrote: Hi all, I have the following two projects: A dedicated website project for my root URL org.example:site (with urlhttp://example.org//url) and an organizational POM org.example:parent (with urlhttp://example.org/parent/url) The parent of org.example:site is the organizational POM, org.example:parent. Both projects have their own site.xml. So far, I think, that's all according to Best Practices. The trouble starts once I configure breadcrumbs. What I want to generate are the following two breadcrumb trails: Example.org Site and Example.org Site Example.org Parent for org.example:site and org.example:parent, respectively. Note that these two trails do not mirror the project's inheritance tree, but rather the users' expectations (org.example:site is the main website artifact, after all). But no matter what breadcrumbs I define in the site.xml of both projects, I cannot get the desired effect. In particular, the following doesn't work: !--org.example:parent's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// item name=Example.org Parent href=http://example.org/parent// /breadcrumbs !--org.example:site's site.xml -- breadcrumbs item name=Example.org Site href=http://example.org// /breadcrumbs While the breadcrumbs of org.example:parent are correct, the trail of org.example:site is simply too long: Example.org Site Example.org Parent It's almost as if not merging occurred at all. But it gets worse: If I change the site.xml of org.example:site just slightly, the breadcrumb trail of org.example:site grows even longer: breadcrumbs item name=Example.org *Main* Site href=http://example.org// /breadcrumbs yields Example.org Site Example.org Parent Example.org *Main* Site Two things: 1) breadcrumbs always get appended, you cannot override or remove a breadcrumb that has been added in a parent 2) identical breadcrumbs are ignored In your first case above, you are trying to add the same breadcrumb (same name, same href) again that is already defined in the parent, so according to 2) it is ignored and you only get the parent breadcrumbs. In your second case the child breadcrumb is appended according to 1) so you get 3 (2 parent + 1 child) breadcrumbs. This is the currently expected behavior. The fact that one cannot override or remove breadcrumbs is annoying, you might want to file a feature request for it. HTH, -Lukas Can someone please explain to me what's going on here? To me, the inheritance behavior of breadcrumbs looks rather random. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site breadcrumbs: trouble with inheritance
Hi Lukas, Two things: 1) breadcrumbs always get appended, you cannot override or remove a breadcrumb that has been added in a parent Yes, this explains why we have breadcrumb trails like the following. Apache Maven Apache Maven Site Here, both Maven and Apache Maven Site point to the same URL. 2) identical breadcrumbs are ignored In your first case above, you are trying to add the same breadcrumb (same name, same href) again that is already defined in the parent, so according to 2) it is ignored and you only get the parent breadcrumbs. In your second case the child breadcrumb is appended according to 1) so you get 3 (2 parent + 1 child) breadcrumbs. Interesting that the notion of equality is based on *both* @href and @name; I would have expected it to only consider the former. (But that doesn't solve my problem, of course.) This is the currently expected behavior. The fact that one cannot override or remove breadcrumbs is annoying, you might want to file a feature request for it. Done: http://jira.codehaus.org/browse/MSITE-582 Thanks for you explanation. Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org