jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1868474 - in /jackrabbit/commons/filevault-package-maven-plugin/trunk/src: main/java/org/apache/jackrabbit/filevault/maven/packaging/ main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/ test/java/org/apache/jackrabbit/filevault...
Date Tue, 15 Oct 2019 08:43:15 GMT
Author: kwin
Date: Tue Oct 15 08:43:15 2019
New Revision: 1868474

URL: http://svn.apache.org/viewvc?rev=1868474&view=rev
Log:
JCRVLT-368 expect new exception

Modified:
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filter.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filters.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbedded.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilter.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilterSet.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbeddedTest.java
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filter.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filter.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filter.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filter.java
Tue Oct 15 08:43:15 2019
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.filevault.
 
 import org.apache.jackrabbit.vault.fs.api.ImportMode;
 import org.apache.jackrabbit.vault.fs.api.PathFilterSet;
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 import org.apache.jackrabbit.vault.fs.filter.DefaultPathFilter;
 
 public class Filter {
@@ -85,7 +86,7 @@ public class Filter {
         cleanupType = "cleanup".equals(type);
     }
 
-    public PathFilterSet toPathFilterSet() {
+    public PathFilterSet toPathFilterSet() throws ConfigurationException {
         PathFilterSet set = new PathFilterSet();
         set.setRoot(root);
         set.setImportMode(mode);

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filters.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filters.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filters.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/Filters.java
Tue Oct 15 08:43:15 2019
@@ -16,16 +16,17 @@
  */
 package org.apache.jackrabbit.filevault.maven.packaging;
 
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 import org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter;
 
 public class Filters extends DefaultWorkspaceFilter {
 
-    public void addFilter(Filter filter) {
+    public void addFilter(Filter filter) throws ConfigurationException {
         add(filter.toPathFilterSet());
     }
 
     // added for Maven 2.2.1 compatibility
-    public void setFilter(Filter filter) {
+    public void setFilter(Filter filter) throws ConfigurationException {
         add(filter.toPathFilterSet());
     }
 

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbedded.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbedded.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbedded.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbedded.java
Tue Oct 15 08:43:15 2019
@@ -25,6 +25,7 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import org.apache.jackrabbit.filevault.maven.packaging.impl.StringFilterSet;
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.project.MavenProject;
@@ -60,11 +61,11 @@ public class SimpleEmbedded {
 
     private boolean excludeTransitive;
     
-    public void setGroupId(String groupId) {
+    public void setGroupId(String groupId) throws ConfigurationException {
         this.groupId.addEntries(groupId);
     }
 
-    public void setArtifactId(String artifactId) {
+    public void setArtifactId(String artifactId) throws ConfigurationException {
         this.artifactId.addEntries(artifactId);
     }
 
@@ -72,11 +73,11 @@ public class SimpleEmbedded {
         this.scope = new ScopeArtifactFilter(scope);
     }
 
-    public void setType(String type) {
+    public void setType(String type) throws ConfigurationException {
         this.type.addEntries(type);
     }
 
-    public void setClassifier(String classifier) {
+    public void setClassifier(String classifier) throws ConfigurationException {
         this.classifier.addEntries(classifier);
     }
 

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilter.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilter.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilter.java
Tue Oct 15 08:43:15 2019
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.filevault.maven.packaging.impl;
 
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 import org.apache.jackrabbit.vault.fs.filter.DefaultPathFilter;
 
 /**
@@ -25,7 +26,7 @@ public class StringFilter extends Defaul
 
     private String string;
 
-    public StringFilter(String pattern) {
+    public StringFilter(String pattern) throws ConfigurationException {
         super(pattern);
     }
 
@@ -38,7 +39,7 @@ public class StringFilter extends Defaul
         }
     }
     @Override
-    public void setPattern(String pattern) {
+    public void setPattern(String pattern) throws ConfigurationException {
         if (pattern.startsWith("/")) {
             pattern = pattern.substring(1);
             if (pattern.endsWith("/")) {

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilterSet.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilterSet.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilterSet.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/StringFilterSet.java
Tue Oct 15 08:43:15 2019
@@ -19,13 +19,14 @@ package org.apache.jackrabbit.filevault.
 import java.util.List;
 
 import org.apache.jackrabbit.vault.fs.api.FilterSet;
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 
 /**
  * {@code StringFilterSet}...
  */
 public class StringFilterSet extends FilterSet<StringFilter> {
 
-    public void addEntry(String pattern) {
+    public void addEntry(String pattern) throws ConfigurationException {
         if (pattern.startsWith("~")) {
             addExclude(new StringFilter(pattern.substring(1)));
         } else {
@@ -33,7 +34,7 @@ public class StringFilterSet extends Fil
         }
     }
 
-    public void addEntries(String patterns) {
+    public void addEntries(String patterns) throws ConfigurationException {
         for (String name: patterns.split(",")) {
             addEntry(name.trim());
         }

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbeddedTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbeddedTest.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbeddedTest.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/SimpleEmbeddedTest.java
Tue Oct 15 08:43:15 2019
@@ -19,6 +19,7 @@ package org.apache.jackrabbit.filevault.
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DefaultArtifact;
 import org.hamcrest.Matchers;
@@ -47,25 +48,25 @@ public class SimpleEmbeddedTest {
     }
     
     @Test
-    public void testGroupIdOnlyFilter() {
+    public void testGroupIdOnlyFilter() throws ConfigurationException {
         embedded.setGroupId("mygroupid");
         Assert.assertThat(embedded.getMatchingArtifacts(artifacts), Matchers.containsInAnyOrder(artifacts.get(0),
artifacts.get(1), artifacts.get(4), artifacts.get(5), artifacts.get(6)));
     }
 
     @Test
-    public void testArtifactIdOnlyFilter() {
+    public void testArtifactIdOnlyFilter() throws ConfigurationException {
         embedded.setArtifactId("artifact1");
         Assert.assertThat(embedded.getMatchingArtifacts(artifacts), Matchers.containsInAnyOrder(artifacts.get(0),
artifacts.get(3), artifacts.get(4)));
     }
 
     @Test
-    public void testTypeBundleOnlyFilter() {
+    public void testTypeBundleOnlyFilter() throws ConfigurationException {
         embedded.setType("bundle");
         Assert.assertThat(embedded.getMatchingArtifacts(artifacts), Matchers.contains(artifacts.get(4),
artifacts.get(5), artifacts.get(6)));
     }
 
     @Test
-    public void testTypeBundleOrJarOnlyFilter() {
+    public void testTypeBundleOrJarOnlyFilter() throws ConfigurationException {
         // in addition filter for jar
         embedded.setType("jar");
         embedded.setType("bundle");
@@ -73,7 +74,7 @@ public class SimpleEmbeddedTest {
     }
 
     @Test
-    public void testClassifierOnlyFilter() {
+    public void testClassifierOnlyFilter() throws ConfigurationException {
         // in addition filter for jar
         embedded.setClassifier("myclassifier");
         Assert.assertThat(embedded.getMatchingArtifacts(artifacts), Matchers.contains(artifacts.get(6)));
@@ -87,7 +88,7 @@ public class SimpleEmbeddedTest {
     }
 
     @Test
-    public void testComplexFilter() {
+    public void testComplexFilter() throws ConfigurationException {
         embedded.setType("bundle");
         embedded.setArtifactId("artifact1");
         embedded.setGroupId("mygroupid");

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java?rev=1868474&r1=1868473&r2=1868474&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/impl/FilterTest.java
Tue Oct 15 08:43:15 2019
@@ -21,6 +21,8 @@ import junit.framework.TestCase;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.jackrabbit.vault.fs.config.ConfigurationException;
+
 /**
  * Test the string filter
  */
@@ -83,7 +85,7 @@ public class FilterTest extends TestCase
                 })
     };
 
-    public void testPatterns() {
+    public void testPatterns() throws ConfigurationException {
         for (TestSet test: TESTS) {
             StringFilterSet set = new StringFilterSet();
             set.addEntries(test.pattern);



Mime
View raw message