jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x and 3.x Site Plugin
  • MSITE-91

"src/site/site.xml" hardcoded in AbstractSiteMojo.java

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-4
  • Fix Version/s: 2.0-beta-6
  • Component/s: None
  • Labels:
    None

Description

There's a todo in the code, so this issue is more a reminder than an unknown bug.

In AbstractSiteMojo.java, there's:

protected File getSiteDescriptorFile( File basedir, Locale locale )
{
// TODO: get proper siteDirectory from site configuration of the project this relates to

File siteDescriptor = new File( basedir, "src/site/site_" + locale.getLanguage() + ".xml" );

if ( !siteDescriptor.exists() )

{ siteDescriptor = new File( basedir, "src/site/site.xml" ); }

return siteDescriptor;
}

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MSITE-91.patch
    04/Apr/06 12:51 PM
    2 kB
    Johann Reyes
  2. Text File
    MSITE-91-maven-site-plugin.patch
    13/Nov/06 9:13 PM
    8 kB
    Franz Allan Valencia See

Issue Links

depends upon

New Feature - A new feature of the product, which has yet to be developed. MNG-3344 Provide new POM element to configure site directory (e.g. "src/site")

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MSITE-246 path of site.xml not possible to configure in tag <siteDirectory>

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. MSITE-151 Ability to change the site directory in the plugin configuration in the pom.xml file.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. MSITE-204 make siteDirectory configurable

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MSHARED-18 Inheritance of elements from site descriptor quite broken

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Johann Reyes added a comment - 04/Apr/06 12:51 PM

Moved siteDirectory from AbstractSiteRenderingMojo to AbstractSiteMojo so we can get the true location for site.

Show
Johann Reyes added a comment - 04/Apr/06 12:51 PM Moved siteDirectory from AbstractSiteRenderingMojo to AbstractSiteMojo so we can get the true location for site.
Hide
Permalink
Gunther Popp added a comment - 17/May/06 2:10 AM

IMO, this issue should be re-opened. The hard-coded path src/site in AbstractSiteMojo breaks the parameter siteDirectory. In V2.0-beta-4 one could define a custome site-directory, .i.e. doc/site instead of src/site. This doesn´t work any more for V2.0-beta-5 since the plugin looks for the site descriptor excusively in src/site. Hence, it breaks existing build-processes and people have to reorganize their project structure. I am aware that there is no easy fix for this, because of the recursive lookup of site descriptors in parent projects. Personally I think that a new parameter should be introduced that specifies the relative path of the site-descriptor to the basedir of every project (this is, IMO, still better than using a hard-coded relative path).

Show
Gunther Popp added a comment - 17/May/06 2:10 AM IMO, this issue should be re-opened. The hard-coded path src/site in AbstractSiteMojo breaks the parameter siteDirectory. In V2.0-beta-4 one could define a custome site-directory, .i.e. doc/site instead of src/site. This doesn´t work any more for V2.0-beta-5 since the plugin looks for the site descriptor excusively in src/site. Hence, it breaks existing build-processes and people have to reorganize their project structure. I am aware that there is no easy fix for this, because of the recursive lookup of site descriptors in parent projects. Personally I think that a new parameter should be introduced that specifies the relative path of the site-descriptor to the basedir of every project (this is, IMO, still better than using a hard-coded relative path).
Hide
Permalink
Franz Allan Valencia See added a comment - 13/Nov/06 9:13 PM

Contents of MSITE-91-maven-site-plugin.patch

  • modified org.apache.maven.plugins.site.AbstractSiteMojo#getSiteDescriptorFile( java.io.File, java.util.Locale) to become #getSiteDescriptorFile( java.util.Locale) so that it uses the siteDirectory as the base directory to search for site_<locale lang>.xml or site.xml (and updated its javadoc).
  • changed method calls to getSiteDescriptorFile( java.io.File, java.util.Locale) to getSiteDescriptorFile( java.util.Locale)
  • updated javadoc of org.apache.maven.plugins.site.AbstractSiteMojo#siteDirectory.
  • provided a site-plugin-siteDirectory-custom under src/test/projects which has the following contents

site-plugin-siteDirectory-custom

– site
  – apt
  `-- test.apt
`-- site.xml
`-- pom.xml

where pom.xml has maven-site-plugin's siteDirectory set to "site".

Show
Franz Allan Valencia See added a comment - 13/Nov/06 9:13 PM Contents of MSITE-91-maven-site-plugin.patch
  • modified org.apache.maven.plugins.site.AbstractSiteMojo#getSiteDescriptorFile( java.io.File, java.util.Locale) to become #getSiteDescriptorFile( java.util.Locale) so that it uses the siteDirectory as the base directory to search for site_<locale lang>.xml or site.xml (and updated its javadoc).
  • changed method calls to getSiteDescriptorFile( java.io.File, java.util.Locale) to getSiteDescriptorFile( java.util.Locale)
  • updated javadoc of org.apache.maven.plugins.site.AbstractSiteMojo#siteDirectory.
  • provided a site-plugin-siteDirectory-custom under src/test/projects which has the following contents
site-plugin-siteDirectory-custom
– site
  – apt
  `-- test.apt
`-- site.xml `-- pom.xml
where pom.xml has maven-site-plugin's siteDirectory set to "site".
Hide
Permalink
Vincent Siveton added a comment - 14/Nov/06 6:39 AM

Hi Franz,

Dennis already committed stuff [1] in the past. Could you verify it?

BTW, FYI @version tag is more for files, @since is better for methods [2]

Thanks!

http://svn.apache.org/viewvc?view=rev&rev=473599
http://java.sun.com/j2se/javadoc/writingdoccomments

Show
Vincent Siveton added a comment - 14/Nov/06 6:39 AM Hi Franz, Dennis already committed stuff [1] in the past. Could you verify it? BTW, FYI @version tag is more for files, @since is better for methods [2] Thanks! http://svn.apache.org/viewvc?view=rev&rev=473599 http://java.sun.com/j2se/javadoc/writingdoccomments
Hide
Permalink
Pablo Gutierrez added a comment - 01/Oct/07 10:18 AM

Is there a snapshot version that includes this fix?

Thanks,
Pablo

Show
Pablo Gutierrez added a comment - 01/Oct/07 10:18 AM Is there a snapshot version that includes this fix? Thanks, Pablo
Hide
Permalink
Dennis Lundberg added a comment - 01/Oct/07 2:52 PM

Yes, 2.0-beta-6-SNAPSHOT

Show
Dennis Lundberg added a comment - 01/Oct/07 2:52 PM Yes, 2.0-beta-6-SNAPSHOT
Hide
Permalink
Benjamin Bentmann added a comment - 01/Jan/08 7:09 AM

A proper solution requires to lift the parameter "siteDirectory" from the plugin configuration into the POM. Otherwise, there is no reliable way for the plugin to determine the location of the site descriptors of ancestor projects for inheritance.

Show
Benjamin Bentmann added a comment - 01/Jan/08 7:09 AM A proper solution requires to lift the parameter "siteDirectory" from the plugin configuration into the POM. Otherwise, there is no reliable way for the plugin to determine the location of the site descriptors of ancestor projects for inheritance.

People

  • Assignee:
    Dennis Lundberg
    Reporter:
    Fabrice Bellingard
Vote (8)
Watch (12)

Dates

  • Created:
    16/Feb/06 9:19 AM
    Updated:
    01/Jan/08 7:09 AM
    Resolved:
    10/Nov/06 6:42 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.