Ignore package-info.java files

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@189723 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
carlos 2005-06-09 07:20:29 +00:00
parent 6be4a1475c
commit e147b54ad8
4 changed files with 28 additions and 2 deletions

View File

@ -22,8 +22,8 @@ import java.io.IOException;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.maven.jxr.ant.DirectoryScanner;
import org.apache.maven.jxr.pacman.PackageManager; 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. * Main entry point into Maven used to kick off the XReference code building.
@ -111,7 +111,6 @@ public class JXR
{ {
DirectoryScanner ds = new DirectoryScanner(); DirectoryScanner ds = new DirectoryScanner();
ds.addDefaultExcludes(); ds.addDefaultExcludes();
File dir = new File(this.getSource()); File dir = new File(this.getSource());

View File

@ -0,0 +1,25 @@
package org.apache.maven.jxr.ant;
import java.io.File;
/**
* Workaround to ignore package-info.java files.
*
* @author Carlos Sanchez
*/
public class DirectoryScanner extends org.apache.tools.ant.DirectoryScanner {
public void addDefaultExcludes() {
super.addDefaultExcludes();
int excludesLength = excludes == null ? 0 : excludes.length;
String[] newExcludes;
newExcludes = new String[excludesLength + 1];
if (excludesLength > 0) {
System.arraycopy(excludes, 0, newExcludes, 0, excludesLength);
}
newExcludes[excludesLength] = "**" + File.separatorChar
+ "package-info.java";
excludes = newExcludes;
}
}

View File

@ -0,0 +1 @@
package org.apache.maven.jxr;

View File

@ -26,6 +26,7 @@
</properties> </properties>
<body> <body>
<release version="1.4.3-SNAPSHOT" date="in SVN"> <release version="1.4.3-SNAPSHOT" date="in SVN">
<action dev="carlos" type="fix" issue="MPJXR-26">Ignore Java 5 package-info.java files</action>
<action dev="brett" type="fix" issue="MPJXR-11" due-to="Lukas Theussi">Fix malformed HTML when "package" or "import" used in the code/comments outside of the normal keyword use</action> <action dev="brett" type="fix" issue="MPJXR-11" due-to="Lukas Theussi">Fix malformed HTML when "package" or "import" used in the code/comments outside of the normal keyword use</action>
<action dev="evenisse" type="fix" issue="MPJXR-18">Remove hardcoded encoding in templates.</action> <action dev="evenisse" type="fix" issue="MPJXR-18">Remove hardcoded encoding in templates.</action>
</release> </release>