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/24 15:51:12 UTC
[maven-bug] Created: (MAVEN-292) The JxrBean class does not handle the basedir attribute properly
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://jira.werken.com/secure/ViewIssue.jspa?key=MAVEN-292
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-292
Summary: The JxrBean class does not handle the basedir attribute properly
Type: Bug
Status: Assigned
Priority: Minor
Time Spent: Unknown
Estimate: 0 minutes
Project: maven
Component: None
Versions:
1.0-beta-9
Assignee: Jason van Zyl
Reporter: Julien S
Created: Mon, 24 Feb 2003 8:51 AM
Updated: Mon, 24 Feb 2003 8:51 AM
Description:
The xref function is the JxrBean does not use the basedir anymore since version 1.4.
It used to call:
path = new File(getBasedir(),path).getCanonicalPath();
And it now calls:
path = new File(path).getCanonicalPath();
to accomodate absolute and relative paths. However, when using the reactor, this last call does not give the correct path, as it does not use the basedir.
The following patch seems to fix the problem, but feel free to do otherwise.
--- src/main/org/apache/maven/jxr/JxrBean.java 21 Feb 2003 22:33:53 -0000
1.4
+++ src/main/org/apache/maven/jxr/JxrBean.java 24 Feb 2003 13:44:17 -0000
@@ -131,7 +131,12 @@
for (Iterator i = sourceDirs.iterator(); i.hasNext();)
{
String path = (String) i.next();
- path = new File(path).getCanonicalPath();
+ File tmp = new File(path);
+ if (! tmp.isAbsolute()) {
+ path = new File(getBasedir(), path).getCanonicalPath();
+ } else {
+ path = tmp.getCanonicalPath();
+ }
---------------------------------------------------------------------
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