You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2013/04/21 13:41:28 UTC

svn commit: r1470285 - in /felix/trunk/ipojo/distributions/maven-tutorial: ./ annotations/ annotations/hello.client.annotations/ annotations/hello.client.annotations/src/ annotations/hello.client.annotations/src/main/ annotations/hello.client.annotatio...

Author: clement
Date: Sun Apr 21 11:41:27 2013
New Revision: 1470285

URL: http://svn.apache.org/r1470285
Log:
update MAven tutorial (with XML and annotations)

Added:
    felix/trunk/ipojo/distributions/maven-tutorial/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/
    felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/
    felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/Hello.java
    felix/trunk/ipojo/distributions/maven-tutorial/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/xml/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/metadata.xml
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/   (with props)
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/pom.xml
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/
    felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/metadata.xml

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,2 @@
+target
+*.iml

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <packaging>bundle</packaging>
+
+    <artifactId>hello.client.annotations</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            ipojo.example.hello.client
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-ipojo-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>ipojo-bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java Sun Apr 21 11:41:27 2013
@@ -0,0 +1,88 @@
+/*
+ * 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 ipojo.example.hello.client;
+
+import ipojo.example.hello.Hello;
+import org.apache.felix.ipojo.annotations.*;
+
+/**
+ * A simple Hello service client. This client use annotation instead of XML metadata.
+ * If no Hello provider are available, it uses a default implementation.
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+@Component(name = "AnnotatedHelloClient")
+@Instantiate
+public class HelloClient implements Runnable {
+
+    /**
+     * Delay between two invocations.
+     */
+    private static final int DELAY = 10000;
+    /**
+     * Hello services. Injected by the container.
+     */
+    @Requires(optional = true, defaultimplementation = MyDummyHello.class)
+    private Hello hello;
+    /**
+     * End flag.
+     */
+    private boolean m_end;
+
+    /**
+     * Run method.
+     *
+     * @see Runnable#run()
+     */
+    public void run() {
+        while (!m_end) {
+            try {
+                invokeHelloServices();
+                Thread.sleep(DELAY);
+            } catch (InterruptedException ie) {
+                /* will recheck end */
+            }
+        }
+    }
+
+    /**
+     * Invoke hello services.
+     */
+    public void invokeHelloServices() {
+        System.out.println(hello.sayHello("Clement "));
+    }
+
+    /**
+     * Starting.
+     */
+    @Validate
+    public void starting() {
+        Thread thread = new Thread(this);
+        m_end = false;
+        thread.start();
+    }
+
+    /**
+     * Stopping.
+     */
+    @Invalidate
+    public void stopping() {
+        m_end = true;
+    }
+}

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java Sun Apr 21 11:41:27 2013
@@ -0,0 +1,30 @@
+/*
+ * 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 ipojo.example.hello.client;
+
+import ipojo.example.hello.Hello;
+
+public class MyDummyHello implements Hello {
+
+    public String sayHello(String name) {
+        return "Bonjour";
+    }
+
+}

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.felix.annotations/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hello.felix.annotations</artifactId>
+
+    <description>A project building a Felix with the annotated Hello service and client</description>
+
+    <packaging>pom</packaging>
+
+    <dependencies>
+        <!-- our project  -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.impl.annotations</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.client.annotations</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.7</version>
+                <executions>
+
+                    <execution>
+                        <id>unpack-felix</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>org.apache.felix.main.distribution</includeArtifactIds>
+                            <outputDirectory>${project.build.directory}</outputDirectory>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>copy-bundles</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                hello.service,
+                                hello.impl.annotations,
+                                hello.client.annotations,
+                                org.apache.felix.log,org.apache.felix.ipojo,
+                                org.apache.felix.ipojo.arch.gogo
+                            </includeArtifactIds>
+                            <outputDirectory>${project.build.directory}/felix-framework-${felix.version}/bundle
+                            </outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    
+</project>
\ No newline at end of file

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hello.impl.annotations</artifactId>
+
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            ipojo.example.hello.impl
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-ipojo-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>ipojo-bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java Sun Apr 21 11:41:27 2013
@@ -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.
+ */
+package ipojo.example.hello.impl;
+
+import ipojo.example.hello.Hello;
+
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Instantiate;
+import org.apache.felix.ipojo.annotations.Provides;
+import org.apache.felix.ipojo.annotations.ServiceProperty;
+
+/**
+ * Component implementing the Hello service.
+ * This class used annotations to describe the component type. 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+@Component
+@Provides
+@Instantiate // Declare an instance of the component
+public class HelloImpl implements Hello {
+    
+    
+    @ServiceProperty
+    public String boo = "boo";
+    
+    @ServiceProperty
+    public String bla = "bla";
+
+    
+    /**
+     * Returns an 'Hello' message.
+     * @param name : name
+     * @return Hello message
+     * @see ipojo.example.hello.Hello#sayHello(String)
+     */
+    public String sayHello(String name) { return "hello " + name + " @";  }
+}

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/hello.service/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,5 @@
+target
+*.iml
+.settings
+.classpath
+.project

Added: felix/trunk/ipojo/distributions/maven-tutorial/hello.service/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/hello.service/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/hello.service/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/hello.service/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,48 @@
+<!--
+  ~ 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>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+    </parent>
+
+    <packaging>bundle</packaging>
+
+    <artifactId>hello.service</artifactId>
+    <name>Hello Service</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            ipojo.example.hello
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/Hello.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/Hello.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/Hello.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/hello.service/src/main/java/ipojo/example/hello/Hello.java Sun Apr 21 11:41:27 2013
@@ -0,0 +1,33 @@
+/* 
+ * 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 ipojo.example.hello;
+
+/**
+ * Hello Interface.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public interface Hello {
+
+    /**
+     * Returns a message like: "Hello $user_name".
+     * @param name the name
+     * @return the hello message
+     */
+    String sayHello(String name);
+}

Added: felix/trunk/ipojo/distributions/maven-tutorial/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.felix</groupId>
+    <artifactId>maven-tutorial</artifactId>
+    <version>1.9.0-SNAPSHOT</version>
+
+    <packaging>pom</packaging>
+
+    <description>
+        The iPOJO Maven tutorial
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.main.distribution</artifactId>
+            <type>zip</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.arch.gogo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+        </dependency>
+    </dependencies>
+
+    <modules>
+       <module>hello.service</module>
+
+        <!-- XML -->
+        <module>xml/hello.impl.xml</module>
+        <module>xml/hello.client.xml</module>
+        <module>xml/hello.felix.xml</module>
+
+        <!-- Annotation -->
+        <module>annotations/hello.impl.annotations</module>
+        <module>annotations/hello.client.annotations</module>
+        <module>annotations/hello.felix.annotations</module>
+    </modules>
+
+    <properties>
+        <felix.version>4.2.1</felix.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.ipojo</artifactId>
+                <version>1.8.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.ipojo.arch.gogo</artifactId>
+                <version>1.0.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.main.distribution</artifactId>
+                <version>4.2.1</version>
+                <type>zip</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+                <version>1.8.6</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>2.3.7</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-ipojo-plugin</artifactId>
+                    <version>1.8.6</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>2.4</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptorRefs>
+                        <ref>project</ref>
+                    </descriptorRefs>
+                    <attach>true</attach>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <packaging>bundle</packaging>
+
+    <artifactId>hello.client.xml</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            ipojo.example.hello.client
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-ipojo-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>ipojo-bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java Sun Apr 21 11:41:27 2013
@@ -0,0 +1,90 @@
+/*
+ * 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 ipojo.example.hello.client;
+
+import ipojo.example.hello.Hello;
+
+/**
+ * Hello Service simple client.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class HelloClient implements Runnable {
+
+    /**
+     *  Delay between two invocations. 
+     */
+    private static final int DELAY = 10000;
+    
+    /** 
+     * Hello services. 
+     * Injected by the container.
+     * */
+    private Hello[] hellos; // Service dependency
+
+    /** 
+     * End flag.
+     *  */
+    private boolean end;
+
+    /** 
+     * Name property.
+     * Injected by the container.
+     * */
+    private String name;
+
+    /**
+     * Run method.
+     * @see Runnable#run()
+     */
+    public void run() {
+        while (!end) {
+            try {
+                invokeHelloServices();
+                Thread.sleep(DELAY);
+            } catch (InterruptedException ie) {
+                /* will recheck end */
+            }
+        }
+    }
+
+    /**
+     * Invoke hello services.
+     */
+    public void invokeHelloServices() {
+        for (Hello hello : hellos) {
+            System.out.println(hello.sayHello(name));
+        }
+    }
+
+    /**
+     * Starting.
+     */
+    public void starting() {
+        Thread thread = new Thread(this);
+        end = false;
+        thread.start();
+    }
+
+    /**
+     * Stopping.
+     */
+    public void stopping() {
+        end = true;
+    }
+}

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/metadata.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/metadata.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.client.xml/src/main/resources/metadata.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd"
+       xmlns="org.apache.felix.ipojo">
+	<component classname="ipojo.example.hello.client.HelloClient"
+		architecture="true">
+        <!-- Declare the service dependency -->
+		<requires field="hellos" />
+
+        <!-- Lifecycle callbacks -->
+		<callback transition="validate" method="starting" />
+		<callback transition="invalidate" method="stopping" />
+
+        <!-- A simple property coming from the instance configuration -->
+        <properties>
+			<property field="name" name="name" />
+		</properties>
+	</component>
+
+    <!--
+    Declaration of an instance of the component specified above.
+    Notice the instance property 'name' setting the value of the component's property
+    -->
+	<instance component="ipojo.example.hello.client.HelloClient">
+		<property name="name" value="iPOJO" />
+	</instance>
+
+</ipojo>
\ No newline at end of file

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.felix.xml/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hello.felix.xml</artifactId>
+
+    <description>A project building a Felix with the XML Hello service and client</description>
+
+    <packaging>pom</packaging>
+
+    <dependencies>
+        <!-- our project  -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.impl.xml</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.client.xml</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.7</version>
+                <executions>
+
+                    <execution>
+                        <id>unpack-felix</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>org.apache.felix.main.distribution</includeArtifactIds>
+                            <outputDirectory>${project.build.directory}</outputDirectory>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>copy-bundles</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                hello.service,
+                                hello.impl.xml,
+                                hello.client.xml,
+                                org.apache.felix.log,org.apache.felix.ipojo,
+                                org.apache.felix.ipojo.arch.gogo
+                            </includeArtifactIds>
+                            <outputDirectory>${project.build.directory}/felix-framework-${felix.version}/bundle
+                            </outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    
+</project>
\ No newline at end of file

Propchange: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 21 11:41:27 2013
@@ -0,0 +1,2 @@
+target
+*.iml

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/pom.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/pom.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/pom.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-tutorial</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>hello.impl.xml</artifactId>
+
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>hello.service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            ipojo.example.hello.impl
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-ipojo-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>ipojo-bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java Sun Apr 21 11:41:27 2013
@@ -0,0 +1,36 @@
+/*
+ * 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 ipojo.example.hello.impl;
+
+import ipojo.example.hello.Hello;
+
+/**
+ * Component implementing the Hello service.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class HelloImpl implements Hello {
+    
+    /**
+     * Returns an 'Hello' message.
+     * @param name : name
+     * @return Hello message
+     * @see ipojo.example.hello.Hello#sayHello(String)
+     */
+    public String sayHello(String name) { return "hello " + name;  }
+}

Added: felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/metadata.xml?rev=1470285&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/metadata.xml (added)
+++ felix/trunk/ipojo/distributions/maven-tutorial/xml/hello.impl.xml/src/main/resources/metadata.xml Sun Apr 21 11:41:27 2013
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<iPOJO>
+	<component className="ipojo.example.hello.impl.HelloImpl"
+		name="HelloProvider" architecture="true">
+		<provides />
+	</component>
+	<instance component="HelloProvider" name="HelloService" />
+</iPOJO>
\ No newline at end of file