You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bo...@werken.com on 2003/02/22 00:48:41 UTC

[maven-bug] Closed: (MAVEN-285) doc:performJSL breaks if basedir contains ..

Message:

   The following issue has been closed.

   Resolver: Ben Walding
       Date: Fri, 21 Feb 2003 5:48 PM

plugin.jelly.3.diff applied
---------------------------------------------------------------------
View the issue:

  http://jira.werken.com/secure/ViewIssue.jspa?key=MAVEN-285


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-285
    Summary: doc:performJSL breaks if basedir contains ..
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Time Spent: Unknown
   Estimate: 5 minutes

    Project: maven
  Component: plugin-xdoc
   Versions:
             1.0-beta-8

   Assignee: Ben Walding
   Reporter: Rafal Krzewski

    Created: Wed, 19 Feb 2003 7:42 AM
    Updated: Fri, 21 Feb 2003 5:48 PM
Environment: J2SDK 1.4.1, Linux

Description:
I tried to build one project's site with the following maven.xml markup:

  <maven:maven
    descriptor="${basedir}/../labeo-base/project.xml"
    goals="site"
    ignoreFailures="false"/>

Unfortunately, site generation failed. After some debugging I discovered 
that this was caused by the following code found in 

org.apache.maven.util.CaseInsensitiveGlobPatternMapper :

        if (fromPrefix == null
            || !sourceFileName.toLowerCase().startsWith(fromPrefix.toLowerCase())
            || !sourceFileName.toLowerCase().endsWith(fromPostfix.toLowerCase())) {
            return null;
        }

fromPrefix is in my case /home/fil/work/labeo-site/../labeo-base/target/generated-xdocs
sourceFile name, which comes form the fileScanner has the .. colapsed:
/home/fil/work/labeo-base/target/generated-xdocs/jdepend-report.xml
And thus the comparision fails.

Proposed solutions:

1) Enhance CaseInsensitiveGlobPatternMapper to handle such cases
   correctly (not very practical, would require duplicating code
   from Ant's GlobPatternMapper

2) Imrove GlobPatternMapper in Ant to handle case-insensitive
   mappings switched on/off by a property (the right way to do it,
   but a slow one - reqires interaction with Ant project)

3) Make paths used by doc:performJSL for setting up mappers absolute.
   this work because filenames being mapped, coming from FileScanners
   are absoulte too. I'm attaching a pathch that does exactly that.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.werken.com/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira