Author: mbenson
Date: Tue May 17 20:22:12 2016
New Revision: 1744318

URL: http://svn.apache.org/viewvc?rev=1744318&view=rev
Log:
[WEAVER-13] weaversettings@includesystemclasspath

Modified:
    
commons/proper/weaver/trunk/ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java
    commons/proper/weaver/trunk/ant/src/site/markdown/index.md

Modified: 
commons/proper/weaver/trunk/ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java
URL: 
http://svn.apache.org/viewvc/commons/proper/weaver/trunk/ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java?rev=1744318&r1=1744317&r2=1744318&view=diff
==============================================================================
--- 
commons/proper/weaver/trunk/ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java
 (original)
+++ 
commons/proper/weaver/trunk/ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java
 Tue May 17 20:22:12 2016
@@ -40,6 +40,7 @@ import org.apache.tools.ant.types.Proper
  * <li>{@code target} attribute - {@link File}</li>
  * <li>{@code classpath} attribute - {@link Path} (incompatible with {@code 
classpathref})</li>
  * <li>{@code classpathref} attribute - {@link String} (incompatible with 
{@code classpath})</li>
+ * <li>{@code includeSystemClasspath} attribute - {@code boolean}</li>
  * <li>nested {@code propertyset} - {@link PropertySet}</li>
  * <li>nested {@code properties} - {@link InlineProperties}</li>
  * </ul>
@@ -51,6 +52,7 @@ public class WeaverSettings extends Data
     private String classpathref;
     private PropertySet propertySet;
     private InlineProperties inlineProperties;
+    private boolean includeSystemClasspath;
 
     /**
      * Create a new {@link WeaverSettings} object.
@@ -106,8 +108,8 @@ public class WeaverSettings extends Data
     }
 
     /**
-     * Return the effective classpath (system classpath + configured 
classpath) as a {@link List} of {@link String}
-     * filesystem paths.
+     * Return the effective classpath as a {@link List} of {@link String}
+     * filesystem paths. If {@link #includeSystemClasspath}, system classpath 
will be appended.
      * @return List<String>
      */
     public List<String> getClasspathEntries() {
@@ -116,7 +118,9 @@ public class WeaverSettings extends Data
         if (classpath != null) {
             path.add(classpath);
         }
-        path.add(Path.systemClasspath);
+        if (includeSystemClasspath) {
+            path.add(Path.systemClasspath);
+        }
 
         return Arrays.asList(path.list());
     }
@@ -187,6 +191,16 @@ public class WeaverSettings extends Data
     }
 
     /**
+     * Set whether to include the system classpath.
+     * @param includeSystemClasspath the includeSystemClasspath to set
+     * @since 1.3
+     * @see Path#systemClasspath
+     */
+    public void setIncludeSystemClasspath(boolean includeSystemClasspath) {
+        this.includeSystemClasspath = includeSystemClasspath;
+    }
+
+    /**
      * Merge nested {@code propertyset} and {@code properties}; latter takes 
precedence.
      * @return Properties
      */

Modified: commons/proper/weaver/trunk/ant/src/site/markdown/index.md
URL: 
http://svn.apache.org/viewvc/commons/proper/weaver/trunk/ant/src/site/markdown/index.md?rev=1744318&r1=1744317&r2=1744318&view=diff
==============================================================================
--- commons/proper/weaver/trunk/ant/src/site/markdown/index.md (original)
+++ commons/proper/weaver/trunk/ant/src/site/markdown/index.md Tue May 17 
20:22:12 2016
@@ -41,6 +41,7 @@ custom type:
  * `classpath` attribute - path string (incompatible with `classpathref`)
  * `classpathref` attribute - refid of an Ant **path**
  (incompatible with `classpath`)
+ * `includesystemclasspath` - specifies whether to include the system classpath
  * nested `propertyset` - Ant **PropertySet**
  * nested `properties` - specifies properties using the names and text values
  of nested elements (looks like Maven POM properties)


Reply via email to