You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sn...@apache.org on 2007/03/29 17:26:50 UTC
svn commit: r523745 -
/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java
Author: snicoll
Date: Thu Mar 29 08:26:49 2007
New Revision: 523745
URL: http://svn.apache.org/viewvc?view=rev&rev=523745
Log:
MJXR-15: Added sourcePath parameter to mimic the Javadoc plugin behavior (allow to specify a custom source directory if necessary, overriding compileSourceRoots).
Submitted by: Martin Zeltner
Reviewed by: Stephane Nicoll
Modified:
maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java
Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java?view=diff&rev=523745&r1=523744&r2=523745
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java Thu Mar 29 08:26:49 2007
@@ -23,6 +23,7 @@
import org.apache.maven.project.MavenProject;
import java.io.File;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -45,6 +46,14 @@
* @readonly
*/
private List sourceDirs;
+
+ /**
+ * Specifies the source path where the java files are located.
+ * The paths are separated by '<code>;</code>'.
+ *
+ * @parameter expression="${sourcePath}"
+ */
+ private String sourcePath;
/**
* Folder where the Xref files will be copied to.
@@ -81,7 +90,13 @@
*/
protected List getSourceRoots()
{
- return this.sourceDirs;
+ if (sourcePath != null) {
+ String[] sourcePathArray = sourcePath.split(";");
+ if (sourcePathArray.length > 0) {
+ return Arrays.asList(sourcePathArray);
+ }
+ }
+ return sourceDirs;
}
/**