You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2016/05/17 19:29:39 UTC

svn commit: r1744311 - in /commons/proper/weaver/trunk: ant/src/main/java/org/apache/commons/weaver/ant/WeaverSettings.java pom.xml

Author: mbenson
Date: Tue May 17 19:29:39 2016
New Revision: 1744311

URL: http://svn.apache.org/viewvc?rev=1744311&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/pom.xml

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=1744311&r1=1744310&r2=1744311&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 19:29:39 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,15 @@ public class WeaverSettings extends Data
     }
 
     /**
+     * Set whether to include the system classpath.
+     * @param includeSystemClasspath the includeSystemClasspath to set
+     * @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/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/pom.xml?rev=1744311&r1=1744310&r2=1744311&view=diff
==============================================================================
--- commons/proper/weaver/trunk/pom.xml (original)
+++ commons/proper/weaver/trunk/pom.xml Tue May 17 19:29:39 2016
@@ -62,7 +62,7 @@ under the License.
     <maven.compiler.target>1.6</maven.compiler.target>
 
     <ant.version>1.9.4</ant.version>
-    <asm.version>5.0.4</asm.version>
+    <asm.version>5.1</asm.version>
   </properties>
 
   <developers>