Correction of MAVEN-178 bug
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112738 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31f11f1b4a
commit
4c7a0c8a9e
@ -5,7 +5,7 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-jxr-plugin</id>
|
||||
<name>Maven JXR Plug-in</name>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<currentVersion>1.1-SNAPSHOT</currentVersion>
|
||||
|
||||
<description>
|
||||
</description>
|
||||
|
||||
@ -169,12 +169,20 @@ public class CodeTransform implements Serializable
|
||||
*/
|
||||
private String javadocLinkDir;
|
||||
|
||||
/*
|
||||
* Package Manager for this project.
|
||||
*/
|
||||
private PackageManager packageManager;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for the CodeTransform object
|
||||
*
|
||||
* @param packageManager PackageManager for this project
|
||||
*/
|
||||
public CodeTransform()
|
||||
public CodeTransform(PackageManager packageManager)
|
||||
{
|
||||
this.packageManager = packageManager;
|
||||
loadHash();
|
||||
}
|
||||
|
||||
@ -750,7 +758,7 @@ public class CodeTransform implements Serializable
|
||||
//get the package from teh PackageManager because this will hold
|
||||
//the version with the classes also.
|
||||
|
||||
PackageType currentImport = PackageManager.getInstance()
|
||||
PackageType currentImport = packageManager
|
||||
.getPackageType(packages[j]);
|
||||
|
||||
//the package here might in fact be null because it wasn't parsed out
|
||||
@ -791,7 +799,7 @@ public class CodeTransform implements Serializable
|
||||
//it doesn't have to be explicitly imported so this information
|
||||
//is useless. Instead just see if it was parsed out.
|
||||
|
||||
PackageType pt = PackageManager.getInstance().getPackageType(fqpn_package);
|
||||
PackageType pt = packageManager.getPackageType(fqpn_package);
|
||||
|
||||
if (pt != null)
|
||||
{
|
||||
@ -1012,7 +1020,7 @@ public class CodeTransform implements Serializable
|
||||
String pkgHREF = getHREF(pkg);
|
||||
//if this package is within the PackageManager then you can create an HREF for it.
|
||||
|
||||
if (PackageManager.getInstance().getPackageType(pkg) != null ||
|
||||
if (packageManager.getPackageType(pkg) != null ||
|
||||
isPackage)
|
||||
{
|
||||
|
||||
|
||||
@ -57,13 +57,14 @@ package org.apache.maven.jxr;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.maven.jxr.pacman.PackageManager;
|
||||
import org.apache.tools.ant.DirectoryScanner;
|
||||
|
||||
/**
|
||||
* Main entry point into Maven used to kick off the XReference code building.
|
||||
*
|
||||
* @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
|
||||
* @version $Id: JXR.java,v 1.1 2003/01/24 03:45:41 jvanzyl Exp $
|
||||
* @version $Id: JXR.java,v 1.2 2003/01/25 10:04:24 evenisse Exp $
|
||||
*/
|
||||
public class JXR
|
||||
{
|
||||
@ -93,7 +94,7 @@ public class JXR
|
||||
* Handles taking .java files and changing them into html. "More than meets
|
||||
* the eye!" :)
|
||||
*/
|
||||
private CodeTransform transformer = new CodeTransform();
|
||||
private CodeTransform transformer;
|
||||
|
||||
/**
|
||||
* The revision of the module currently being processed.
|
||||
@ -103,16 +104,19 @@ public class JXR
|
||||
/**
|
||||
* The constructor for the JXR class.
|
||||
*
|
||||
* @param packageManager The Package Manager for this project
|
||||
* @param revision The CVS revision of this file.
|
||||
* @param source The directory that files are being read from (src/java)
|
||||
* @param source
|
||||
* @param dest
|
||||
*/
|
||||
public JXR(String source,
|
||||
public JXR(PackageManager packageManager,
|
||||
String source,
|
||||
String dest,
|
||||
String javadocLinkDir,
|
||||
String revision)
|
||||
{
|
||||
this.transformer = new CodeTransform(packageManager);
|
||||
this.source = source;
|
||||
this.dest = dest;
|
||||
this.javadocLinkDir = javadocLinkDir;
|
||||
|
||||
@ -58,8 +58,6 @@ package org.apache.maven.jxr;
|
||||
|
||||
import org.apache.maven.jxr.JXR;
|
||||
import org.apache.maven.jxr.DirectoryIndexer;
|
||||
import org.apache.maven.jxr.pacman.PackageManager;
|
||||
|
||||
import org.apache.maven.jxr.pacman.PackageManager;
|
||||
import org.apache.maven.jxr.pacman.PackageType;
|
||||
import org.apache.maven.jxr.pacman.ClassType;
|
||||
@ -82,7 +80,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* @author <a href="mailto:lucas@collab.net">Josh Lucas</a>
|
||||
* @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
|
||||
* @author <a href="mailto:brian@brainslug.com">Brian Leonard</a>
|
||||
* @version $Id: JxrBean.java,v 1.1 2003/01/24 03:45:41 jvanzyl Exp $
|
||||
* @version $Id: JxrBean.java,v 1.2 2003/01/25 10:04:24 evenisse Exp $
|
||||
*/
|
||||
public class JxrBean
|
||||
{
|
||||
@ -124,7 +122,7 @@ public class JxrBean
|
||||
javadocLinkDir = getRelativeLink(destDir, javadocDir);
|
||||
|
||||
// first collect package and class info
|
||||
PackageManager pkgmgr = PackageManager.getInstance();
|
||||
PackageManager pkgmgr = new PackageManager();
|
||||
|
||||
// go through each source directory and xref the java files
|
||||
for (Iterator i = sourceDirs.iterator(); i.hasNext();)
|
||||
@ -134,7 +132,7 @@ public class JxrBean
|
||||
path = new File(getBasedir(),path).getCanonicalPath();
|
||||
pkgmgr.process(path);
|
||||
|
||||
new JXR(path, destDir, javadocLinkDir, "HEAD");
|
||||
new JXR(pkgmgr, path, destDir, javadocLinkDir, "HEAD");
|
||||
}
|
||||
|
||||
// once we have all the source files xref'd, create the index pages
|
||||
|
||||
@ -75,11 +75,6 @@ public class PackageManager
|
||||
*/
|
||||
private PackageType defaultPackage = new PackageType();
|
||||
|
||||
/**
|
||||
* The SingletonInstance of this PackageManager.
|
||||
*/
|
||||
public static PackageManager instance = new PackageManager();
|
||||
|
||||
/**
|
||||
* Given the name of a package (Ex: org.apache.maven.util) obtain it from
|
||||
* the PackageManager
|
||||
@ -191,14 +186,6 @@ public class PackageManager
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the instance attribute of the PackageManager class
|
||||
*/
|
||||
public static PackageManager getInstance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple logging facility
|
||||
*/
|
||||
|
||||
16
jxr/xdocs/changes.xml
Normal file
16
jxr/xdocs/changes.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<document>
|
||||
<properties>
|
||||
<title>Changes</title>
|
||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<release version="1.1" date="in CVS">
|
||||
<action dev="evenisse" type="fix">
|
||||
Fix for bug Maven-178.
|
||||
</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user