added the maven tutorial distribution

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1505428 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/pom.xml
new file mode 100644
index 0000000..d383ed6
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/pom.xml
@@ -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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java
new file mode 100644
index 0000000..32a339a
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/HelloClient.java
@@ -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("iPOJO "));

+    }

+

+    /**

+     * Starting.

+     */

+    @Validate

+    public void starting() {

+        Thread thread = new Thread(this);

+        m_end = false;

+        thread.start();

+    }

+

+    /**

+     * Stopping.

+     */

+    @Invalidate

+    public void stopping() {

+        m_end = true;

+    }

+}

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java
new file mode 100644
index 0000000..cc72fb5
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.client.annotations/src/main/java/ipojo/example/hello/client/MyDummyHello.java
@@ -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, I'm the default-implementation";
+    }
+
+}
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.felix.annotations/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.felix.annotations/pom.xml
new file mode 100644
index 0000000..f5eef4e
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.felix.annotations/pom.xml
@@ -0,0 +1,123 @@
+<?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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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>compile</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>org.apache.felix.ipojo.distribution.quickstart</includeArtifactIds>
+                            <outputDirectory>\${project.build.directory}/tmp</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
+                            </includeArtifactIds>
+                            <outputDirectory>\${project.build.directory}/bundle</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <phase>compile</phase>
+                        <id>copy-distribution</id>
+                        <configuration>
+                            <outputDirectory>\${project.build.directory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>\${project.build.directory}/tmp/ipojo-distribution-\${project.version}</directory>
+                                    <filtering>false</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/pom.xml
new file mode 100644
index 0000000..cbc6c37
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/pom.xml
@@ -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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java
new file mode 100644
index 0000000..9818f81
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/annotations/hello.impl.annotations/src/main/java/ipojo/example/hello/impl/HelloImpl.java
@@ -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 + ".";  }

+}

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/pom.xml
new file mode 100644
index 0000000..6e84e87
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/pom.xml
@@ -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>ipojo-maven-tutorial</artifactId>

+        <version>@project.version@</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>

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/src/main/java/ipojo/example/hello/Hello.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/src/main/java/ipojo/example/hello/Hello.java
new file mode 100644
index 0000000..e0c25da
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/hello.service/src/main/java/ipojo/example/hello/Hello.java
@@ -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);

+}

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/pom.xml
new file mode 100644
index 0000000..9884587
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/pom.xml
@@ -0,0 +1,94 @@
+<?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>ipojo-maven-tutorial</artifactId>
+    <version>@project.version@</version>
+
+    <packaging>pom</packaging>
+
+    <description>
+        The iPOJO Maven tutorial
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.distribution.quickstart</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.gogo</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+            <version>${project.version}</version>
+        </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>
+
+    <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>${project.version}</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>2.4</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
\ No newline at end of file
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/pom.xml
new file mode 100644
index 0000000..3a8c114
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/pom.xml
@@ -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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java
new file mode 100644
index 0000000..85e2ff5
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/java/ipojo/example/hello/client/HelloClient.java
@@ -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;

+    }

+}

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/resources/metadata.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/resources/metadata.xml
new file mode 100644
index 0000000..e84d61b
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.client.xml/src/main/resources/metadata.xml
@@ -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
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.felix.xml/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.felix.xml/pom.xml
new file mode 100644
index 0000000..1f1d523
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.felix.xml/pom.xml
@@ -0,0 +1,124 @@
+<?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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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>compile</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>org.apache.felix.ipojo.distribution.quickstart</includeArtifactIds>
+                            <outputDirectory>\${project.build.directory}/tmp</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
+                            </includeArtifactIds>
+                            <outputDirectory>\${project.build.directory}/bundle</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <phase>compile</phase>
+                        <id>copy-distribution</id>
+                        <configuration>
+                            <outputDirectory>\${project.build.directory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>\${project.build.directory}/tmp/ipojo-distribution-\${project.version}</directory>
+                                    <filtering>false</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/pom.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/pom.xml
new file mode 100644
index 0000000..371cb69
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/pom.xml
@@ -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>ipojo-maven-tutorial</artifactId>
+        <version>@project.version@</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
diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java
new file mode 100644
index 0000000..6fd36e3
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/java/ipojo/example/hello/impl/HelloImpl.java
@@ -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;  }

+}

diff --git a/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/resources/metadata.xml b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/resources/metadata.xml
new file mode 100644
index 0000000..26803d4
--- /dev/null
+++ b/ipojo/runtime/distributions/maven-tutorial/src/main/skeleton/xml/hello.impl.xml/src/main/resources/metadata.xml
@@ -0,0 +1,28 @@
+<?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>

+	<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