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:
parent
6be4a1475c
commit
e147b54ad8
@ -22,8 +22,8 @@ import java.io.IOException;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.maven.jxr.ant.DirectoryScanner;
|
||||
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.
|
||||
@ -111,7 +111,6 @@ public class JXR
|
||||
{
|
||||
|
||||
DirectoryScanner ds = new DirectoryScanner();
|
||||
|
||||
ds.addDefaultExcludes();
|
||||
|
||||
File dir = new File(this.getSource());
|
||||
|
||||
25
jxr/src/main/org/apache/maven/jxr/ant/DirectoryScanner.java
Normal file
25
jxr/src/main/org/apache/maven/jxr/ant/DirectoryScanner.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
1
jxr/src/test/org/apache/maven/jxr/package-info.java
Normal file
1
jxr/src/test/org/apache/maven/jxr/package-info.java
Normal file
@ -0,0 +1 @@
|
||||
package org.apache.maven.jxr;
|
||||
@ -26,6 +26,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<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="evenisse" type="fix" issue="MPJXR-18">Remove hardcoded encoding in templates.</action>
|
||||
</release>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user