You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/01/01 14:07:57 UTC

[jira] Created: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Provide new POM element to configure site directory (e.g. "src/site")
---------------------------------------------------------------------

                 Key: MNG-3344
                 URL: http://jira.codehaus.org/browse/MNG-3344
             Project: Maven 2
          Issue Type: New Feature
          Components: POM
    Affects Versions: 2.0.8
            Reporter: Benjamin Bentmann


As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.

For example, take the following multi-module scenario:
  project-parent/
    doc/
      site.xml
    project-module/
      src/
        site/
          site.xml
Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.

Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.

Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123220 ] 

Benjamin Bentmann commented on MNG-3344:
----------------------------------------

Another reason why such a POM element would be good: If we wanted to implement a rule [RequireSkinVersion|http://www.nabble.com/Plugin-Versions-in-the-Super-pom-to15367074s177.html#a15402554] for the Maven Enforcer Plugin, this plugin could more easily share the config with the Maven Site Plugin (needed to find the site descriptor).

> Provide new POM element to configure site directory (e.g. "src/site")
> ---------------------------------------------------------------------
>
>                 Key: MNG-3344
>                 URL: http://jira.codehaus.org/browse/MNG-3344
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: POM
>    Affects Versions: 2.0.8
>            Reporter: Benjamin Bentmann
>             Fix For: 2.1-alpha-1
>
>
> As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.
> For example, take the following multi-module scenario:
>   project-parent/
>     doc/
>       site.xml
>     project-module/
>       src/
>         site/
>           site.xml
> Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.
> Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.
> Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton updated MNG-3344:
---------------------------------

    Fix Version/s: 2.1-alpha-1

Sounds acceptable feature for 2.1

> Provide new POM element to configure site directory (e.g. "src/site")
> ---------------------------------------------------------------------
>
>                 Key: MNG-3344
>                 URL: http://jira.codehaus.org/browse/MNG-3344
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: POM
>    Affects Versions: 2.0.8
>            Reporter: Benjamin Bentmann
>             Fix For: 2.1-alpha-1
>
>
> As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.
> For example, take the following multi-module scenario:
>   project-parent/
>     doc/
>       site.xml
>     project-module/
>       src/
>         site/
>           site.xml
> Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.
> Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.
> Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3344:
-------------------------------

    Fix Version/s:     (was: 2.1-alpha-1)
                   2.1

We can put this in the general 2.1 bucket, but before we actually make the first changes to the POM we need to very carefully check compatibility with reader older versions, and actually having a strategy for reading various versions of the POM. This will take a while.

> Provide new POM element to configure site directory (e.g. "src/site")
> ---------------------------------------------------------------------
>
>                 Key: MNG-3344
>                 URL: http://jira.codehaus.org/browse/MNG-3344
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: POM
>    Affects Versions: 2.0.8
>            Reporter: Benjamin Bentmann
>             Fix For: 2.1
>
>
> As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.
> For example, take the following multi-module scenario:
>   project-parent/
>     doc/
>       site.xml
>     project-module/
>       src/
>         site/
>           site.xml
> Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.
> Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.
> Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118733 ] 

Benjamin Bentmann commented on MNG-3344:
----------------------------------------

bq. e.g. ${project.reporting.siteDirectory}
On the other hand, the maven-site-plugin is a build plugin, so maybe better ${project.build.siteDirectory}? Anyway, glad to here the suggestion is accepted.

> Provide new POM element to configure site directory (e.g. "src/site")
> ---------------------------------------------------------------------
>
>                 Key: MNG-3344
>                 URL: http://jira.codehaus.org/browse/MNG-3344
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: POM
>    Affects Versions: 2.0.8
>            Reporter: Benjamin Bentmann
>             Fix For: 2.1-alpha-1
>
>
> As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.
> For example, take the following multi-module scenario:
>   project-parent/
>     doc/
>       site.xml
>     project-module/
>       src/
>         site/
>           site.xml
> Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.
> Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.
> Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3344) Provide new POM element to configure site directory (e.g. "src/site")

Posted by "John Allen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118824 ] 

John Allen commented on MNG-3344:
---------------------------------

I think there are a few reporting plugins that have had to rely upon using the default location hardcoded due to the fact that it was not programmably retrievable from the project model or the site plugin configuration. will have to fix those up incrementally i guess.

> Provide new POM element to configure site directory (e.g. "src/site")
> ---------------------------------------------------------------------
>
>                 Key: MNG-3344
>                 URL: http://jira.codehaus.org/browse/MNG-3344
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: POM
>    Affects Versions: 2.0.8
>            Reporter: Benjamin Bentmann
>             Fix For: 2.1-alpha-1
>
>
> As requested in MSITE-91 and its various duplicates, the input location for the site generation should be configurable. Currently, this is realized by a configuration parameter (siteDirectory) for the maven-site-plugin itself but I argue that this is not sufficient/robust for all cases. The problem is that the plugin cannot access its configuration in ancestor POMs and hence can only guess.
> For example, take the following multi-module scenario:
>   project-parent/
>     doc/
>       site.xml
>     project-module/
>       src/
>         site/
>           site.xml
> Let us ignore the fact that such is layout is unusual, weird, bad-practice or whatever you would like to call it. The point is, it should be possible. The important aspect of the example is that both POMs will need to use a different configuration of the maven-site-plugin to find the site descriptor (and related files). The parent POM will have siteDirectory=doc while the module POM will have siteDirectory=src/site.
> Now consider the plugin's steps when building the site for project-module. From the plugin configuration in "project-module/pom.xml", it knows to search the site descriptor for the sub project in "src/site". To apply inheritance, the plugin then needs to locate the site descriptor of the parent project. Ups. The plugin cannot access the corresponding plugin configuration in "project-parent/pom.xml". So it can only assume that the parent uses the same directory layout for the site as the current sub module.
> Having a dedicated POM element for the site files, e.g. ${project.reporting.siteDirectory}, would allow the maven-site-plugin to properly determine the location of the site descriptor of any ancestor project. The super POM can default this element to "src/site" to get the usual behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira