You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/10/27 08:11:27 UTC

svn commit: r1710725 - in /felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports: pom.xml src/main/java/org/apache/felix/test/Dummy.java verify.groovy

Author: cziegeler
Date: Tue Oct 27 07:11:27 2015
New Revision: 1710725

URL: http://svn.apache.org/viewvc?rev=1710725&view=rev
Log:
FELIX-5062 : maven-bundle-plugin includes tests dependencies in package analysis. Add test cases from Julian Sedding

Added:
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml   (with props)
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java   (with props)
    felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/verify.groovy

Added: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml?rev=1710725&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java?rev=1710725&view=auto
==============================================================================
--- felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java (added)
+++ felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java Tue Oct 27 07:11:27 2015
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+package org.apache.felix.test;
+
+import javax.servlet.Servlet;
+
+public class Dummy {
+    private Servlet servlet;
+}
\ No newline at end of file

Propchange: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/src/main/java/org/apache/felix/test/Dummy.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Added: felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/verify.groovy
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/verify.groovy?rev=1710725&view=auto
==============================================================================
--- felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/verify.groovy (added)
+++ felix/trunk/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/verify.groovy Tue Oct 27 07:11:27 2015
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+new File(basedir, "target/classes/META-INF/MANIFEST.MF").eachLine() { line ->
+    if (line.contains("Import-Package") && !line.equals("Import-Package: javax.servlet")) {
+        throw new Exception("Import-Package instruction contains version number from test dependency");
+    }
+}
+