Author: alien11689
Date: Sun Feb 11 21:59:31 2018
New Revision: 1823909

URL: http://svn.apache.org/viewvc?rev=1823909&view=rev
Log:
[ARIES-1772] Add test for transitive provided dependency

Added:
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/pom.xml
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/A.java
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/pom.xml
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/B.java
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/pom.xml
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/Api.java
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/pom.xml
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy
Modified:
    aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/pom.xml
    
aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java

Modified: aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/pom.xml?rev=1823909&r1=1823908&r2=1823909&view=diff
==============================================================================
--- aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/pom.xml (original)
+++ aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/pom.xml Sun Feb 
11 21:59:31 2018
@@ -71,7 +71,7 @@
                         <configuration>
                             <projectsDirectory>src/it</projectsDirectory>
                             <pomIncludes>
-                                <pomInclude>**/pom.xml</pomInclude>
+                                <pomInclude>*/pom.xml</pomInclude>
                             </pomIncludes>
                             <postBuildHookScript>verify</postBuildHookScript>
                             
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/pom.xml?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/pom.xml
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/pom.xml
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,72 @@
+<!--
+ 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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>a</artifactId>
+    <packaging>jar</packaging>
+    <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+            <version>1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+            <artifactId>b</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.aries.blueprint</groupId>
+                <artifactId>blueprint-maven-plugin</artifactId>
+                <version>@blueprint-maven-plugin.version@</version>
+                <configuration>
+                    <baseDir>${project.build.directory}/classes</baseDir>
+                    <generatedFileName>blueprint.xml</generatedFileName>
+                    <generatedDir>custom/my</generatedDir>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>add-resource-dir</goal>
+                            <goal>blueprint-generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        
<groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+                        <artifactId>c</artifactId>
+                        <version>1.0.0-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/A.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/A.java?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/A.java
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/a/src/main/java/a/A.java
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,32 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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 a;
+
+import javax.inject.Singleton;
+import b.B;
+
+@Singleton
+public class A {
+
+    private final B b;
+
+    public A(B b) {
+        this.b = b;
+    }
+}
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/pom.xml?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/pom.xml
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/pom.xml
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,37 @@
+<!--
+ 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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>b</artifactId>
+    <packaging>jar</packaging>
+    <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+            <artifactId>c</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/B.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/B.java?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/B.java
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/b/src/main/java/b/B.java
 Sun Feb 11 21:59:31 2018
@@ -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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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 b;
+
+import c.Api;
+
+public class B implements Api {
+
+}
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/pom.xml?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/pom.xml
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/pom.xml
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,59 @@
+<!--
+ 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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>c</artifactId>
+    <packaging>jar</packaging>
+    <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+            <version>1</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.aries.blueprint</groupId>
+                <artifactId>blueprint-maven-plugin</artifactId>
+                <version>@blueprint-maven-plugin.version@</version>
+                <configuration>
+                    <baseDir>${project.build.directory}/classes</baseDir>
+                    <generatedFileName>blueprint.xml</generatedFileName>
+                    <generatedDir>custom/my</generatedDir>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>add-resource-dir</goal>
+                            <goal>blueprint-generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/Api.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/Api.java?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/Api.java
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/c/src/main/java/c/Api.java
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,23 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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 c;
+
+public interface Api {
+
+}
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/pom.xml?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/pom.xml
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/pom.xml
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,34 @@
+<!--
+ 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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.aries.blueprint.plugin.itest</groupId>
+    <artifactId>with-provide</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+   <modules>
+       <module>a</module>
+       <module>b</module>
+       <module>c</module>
+   </modules>
+</project>
\ No newline at end of file

Added: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy?rev=1823909&view=auto
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy
 (added)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy
 Sun Feb 11 21:59:31 2018
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+def file = new File(basedir, 'a/target/classes/custom/my/blueprint.xml')
+assert file.exists()
+def xml = new groovy.util.XmlSlurper().parse(file)
+assert xml.name() == 'blueprint'
+assert xml.bean.@class == 'a.A'
+assert xml.bean.@id == 'a'
+assert xml.bean.argument[0].@ref == 'b'

Modified: 
aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java?rev=1823909&r1=1823908&r2=1823909&view=diff
==============================================================================
--- 
aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java
 (original)
+++ 
aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java
 Sun Feb 11 21:59:31 2018
@@ -126,7 +126,7 @@ public class GenerateMojo extends Abstra
             getLog().info("Skipping blueprint generation because source files 
were not changed");
             return;
         }
-        
+
         try {
             BlueprintConfigurationImpl blueprintConfiguration = new 
BlueprintConfigurationImpl(namespaces, defaultActivation, customParameters, 
defaultAvailability, defaultTimeout);
             generateBlueprint(toScan, blueprintConfiguration);


Reply via email to