JCRVLT-405 validate that using undeclared dependencies lead to build
failure
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/commons/filevault-package-maven-plugin/trunk@1873211 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/DependencyCheckIT.java b/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/DependencyCheckIT.java
index 0eb0aed..9920700 100644
--- a/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/DependencyCheckIT.java
+++ b/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/DependencyCheckIT.java
@@ -35,6 +35,7 @@
{"fail-no-maven-deps", true},
{"fail-no-contains", true},
{"fail-no-cover", true},
+ {"fail-undeclared-dependency", true},
{"fail-repo-structure-pkg-subtree", true},
{"no-errors", false},
{"repo-structure-pkg", false},
diff --git a/src/test/resources/test-projects/validate-deps-projects/fail-undeclared-dependency/pom.xml b/src/test/resources/test-projects/validate-deps-projects/fail-undeclared-dependency/pom.xml
new file mode 100755
index 0000000..851d6c3
--- /dev/null
+++ b/src/test/resources/test-projects/validate-deps-projects/fail-undeclared-dependency/pom.xml
@@ -0,0 +1,53 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.jackrabbit.filevault</groupId>
+ <artifactId>package-plugin-test-pkg</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>content-package</packaging>
+ <name>Packaging test</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>filevault-package-maven-plugin</artifactId>
+ <version>${plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <packageType>application</packageType>
+ <failOnDependencyErrors>true</failOnDependencyErrors>
+ <filters>
+ <filter>
+ <root>/tmp/foo</root>
+ </filter>
+ </filters>
+ <dependencies>
+ <!-- this dependency is not declared in the project dependencies -->
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </dependency>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>