felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1470471 - in /felix/trunk/ipojo/distributions/ten-minutes-tutorial: ./ src/ src/main/ src/main/skeleton/ src/main/skeleton/spell.checker.gui/ src/main/skeleton/spell.checker.gui/src/ src/main/skeleton/spell.checker.gui/src/spell/ src/main/...
Date Mon, 22 Apr 2013 12:12:35 GMT
Author: clement
Date: Mon Apr 22 12:12:33 2013
New Revision: 1470471

URL: http://svn.apache.org/r1470471
Log:
added a maven build creating the 10 minutes tutorial

Added:
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/   (with props)
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/pom.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/spell.checker.gui.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/SpellCheckerGui.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/spell.checker.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/SpellCheck.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/spell.english.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/EnglishDictionary.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/spell.services.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/DictionaryService.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/SpellChecker.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/spell.checker.gui.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/SpellCheckerGui.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/spell.checker.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/SpellCheck.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/spell.english.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/EnglishDictionary.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/build.xml
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/spell.services.bnd
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java
    felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/SpellChecker.java

Propchange: felix/trunk/ipojo/distributions/ten-minutes-tutorial/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr 22 12:12:33 2013
@@ -0,0 +1,3 @@
+target
+*.iml
+

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/pom.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/pom.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/pom.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,251 @@
+<?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>org.apache.felix.ipojo.distributions</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>ten-minutes-tutorial</artifactId>
+    <version>1.9.0-SNAPSHOT</version>
+
+    <description>This project builds the 10 minutes tutorial package</description>
+
+
+    <properties>
+        <felix.version>4.2.1</felix.version>
+        <ipojo.ant.version>1.9.0-SNAPSHOT</ipojo.ant.version>
+        <ipojo.runtime.version>1.9.0-SNAPSHOT</ipojo.runtime.version>
+        <bnd.version>1.50.0</bnd.version>
+    </properties>
+
+    <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}/dist</outputDirectory>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>copy-ant-tasks</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                org.apache.felix.ipojo.ant,
+                                bnd
+                            </includeArtifactIds>
+                            <outputDirectory>${project.build.directory}/dist/tasks
+                            </outputDirectory>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>copy-bundles</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                org.apache.felix.ipojo.properties.handler,
+                                org.apache.felix.ipojo.properties.consumer,
+                                org.apache.felix.ipojo,
+                                org.apache.felix.ipojo.arch.gogo
+                            </includeArtifactIds>
+                            <outputDirectory>${project.build.directory}/dist/felix-framework-${felix.version}/bundle
+                            </outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!--
+             we also copy properties file to the distribution folder,
+             the properties are stored in src/main/resources/props
+             -->
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-skeleton</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>
+                                ${project.build.directory}/dist
+                            </outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/skeleton</directory>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                            <includeEmptyDirs>true</includeEmptyDirs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-solution</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>
+                                ${project.build.directory}/dist/solution
+                            </outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/solution</directory>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                            <includeEmptyDirs>true</includeEmptyDirs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.7</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <configuration>
+                            <target>
+                                <ant dir="target/dist" target="clean"/>
+                                <ant dir="target/dist" target="package"/>
+                                <ant dir="target/dist" target="dist"/>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/dist/dist/tutorial.zip</file>
+                                    <type>zip</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.ant</artifactId>
+            <version>${ipojo.ant.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>biz.aQute</groupId>
+            <artifactId>bnd</artifactId>
+            <version>${bnd.version}</version>
+        </dependency>
+
+        <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>
+            <version>${ipojo.runtime.version}</version>
+        </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>
+
+    <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>
+    
+</project>
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.checker.example" default="package" basedir=".">
+	
+	<target name="clean">
+		<ant dir="spell.services" target="clean"/>
+		<ant dir="spell.english" target="clean"/>
+		<ant dir="spell.checker" target="clean"/>
+		<ant dir="spell.checker.gui" target="clean"/>
+		<ant dir="solution" target="clean"/>
+		<delete dir="felix-framework-${felix.version}/felix-cache"/>
+		<delete dir="dist"/>
+	</target>
+	
+	<target name="package">
+		<ant dir="spell.services" target="package"/>
+		<ant dir="spell.english" target="package"/>
+		<ant dir="spell.checker" target="package"/>
+		<ant dir="spell.checker.gui" target="package"/>
+		<ant dir="solution" target="package"/>	
+	</target>
+	
+	<target name="dist" depends="clean">
+		<mkdir dir="dist"/>
+		<zip destfile="dist/tutorial.zip">
+			<fileset dir=".">
+				<exclude name="build.xml"/>
+				<exclude name="dist"/>
+				<exclude name=".*"/>
+				<exclude name="*/_*"/>
+			</fileset>	
+		</zip>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.checker.gui" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/spell.checker.gui.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/spell.checker.gui.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/spell.checker.gui.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/spell.checker.gui.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.gui
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/SpellCheckerGui.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/SpellCheckerGui.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/SpellCheckerGui.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker.gui/src/spell/gui/SpellCheckerGui.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,133 @@
+/*
+ * 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 spell.gui;
+
+import org.apache.felix.ipojo.annotations.*;
+import spell.services.SpellChecker;
+
+import javax.swing.*;
+
+/**
+ * A very simple Gui interacting with the CheckSpeller service
+ */
+@Component // It's a component
+@Instantiate // We declarare an instance
+public class SpellCheckerGui extends JFrame {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Swing component where the user write the passage to check.
+     */
+    private JTextField passage = null;
+
+    /**
+     * Area where the result is displayed.
+     */
+    private JLabel result = null;
+
+    /**
+     * Service dependency on the SpellChecker.
+     */
+    @Requires // It's a service dependency
+    private SpellChecker checker;
+
+    /**
+     * Constructor.
+     * Initialize the GUI.
+     */
+    public SpellCheckerGui() {
+        super();
+        initComponents();
+        this.setTitle("Spellchecker Gui");
+    }
+
+    /**
+     * Initialize the Swing Gui.
+     */
+    private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
+
+        // The check button
+        JButton checkButton = new JButton();
+        result = new JLabel();
+        passage = new JTextField();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); // Stop Felix...
+        getContentPane().setLayout(new java.awt.GridBagLayout());
+
+        checkButton.setText("Check");
+        checkButton.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent e) {
+                check();
+            }
+        });
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(checkButton, gridBagConstraints);
+
+        result.setPreferredSize(new java.awt.Dimension(175, 20));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(result, gridBagConstraints);
+
+        passage.setPreferredSize(new java.awt.Dimension(175, 20));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(passage, gridBagConstraints);
+
+        pack();
+    }
+
+    /**
+     * Check Button action.
+     * Collects the user input and checks it.
+     */
+    private void check() {
+        // TODO
+    }
+
+    /**
+     * Start callback.
+     * This method will be called when the instance becomes valid.
+     * It set the Gui visibility to true.
+     */
+    @Validate
+    public void start() {
+        // TODO
+    }
+
+    /**
+     * Stop callback.
+     * This method will be called when the instance becomes invalid or stops.
+     * It deletes the Gui.
+     */
+    @Invalidate
+    public void stop() {
+        // TODO
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.checker" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+	<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/spell.checker.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/spell.checker.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/spell.checker.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/spell.checker.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.checker
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/SpellCheck.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/SpellCheck.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/SpellCheck.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.checker/src/spell/checker/SpellCheck.java Mon Apr 22 12:12:33 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.
+ */
+
+package spell.checker;
+
+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.Requires;
+import spell.services.DictionaryService;
+import spell.services.SpellChecker;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+//TODO
+public class SpellCheck implements SpellChecker {
+
+    //TODO
+
+    /**
+     * Implements SpellChecker.check(). Checks the given passage for misspelled words.
+     *
+     * @param passage the passage to spell check.
+     * @return An array of misspelled words or null if no words are misspelled.
+     */
+    public String[] check(String passage) {
+        //TODO
+        return new String[] {};
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.english" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}"
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/spell.english.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/spell.english.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/spell.english.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/spell.english.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.english
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/EnglishDictionary.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/EnglishDictionary.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/EnglishDictionary.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/src/spell/english/EnglishDictionary.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,46 @@
+/*
+ * 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 spell.english;
+
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Instantiate;
+import org.apache.felix.ipojo.annotations.Provides;
+import spell.services.DictionaryService;
+
+/**
+ * An implementation of the Dictionary service containing English words
+ * see DictionaryService for details of the service.
+ **/
+@Component // It's an iPOJO Component
+@Provides // We provide a service
+@Instantiate // We declare an instance of our component
+public class EnglishDictionary implements DictionaryService {
+
+    /**
+     * Implements DictionaryService.checkWord(). Determines
+     * if the passed in word is contained in the dictionary.
+     * @param word the word to be checked.
+     * @return true if the word is in the dictionary,
+     *         false otherwise.
+     **/
+    public boolean checkWord(String word) {
+        //TODO
+        return false;
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.services" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-${bnd.version}.jar"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+	</target>
+
+	<target name="compile" depends="clean">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+		  />
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/spell.services.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/spell.services.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/spell.services.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/spell.services.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Export-Package: spell.services
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/DictionaryService.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/DictionaryService.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/DictionaryService.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/DictionaryService.java Mon Apr 22 12:12:33 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 spell.services;
+
+public interface DictionaryService {
+
+    /**
+     * Check for the existence of a word.
+     * @param word the word to be checked.
+     * @return true if the word is in the dictionary,
+     *         false otherwise.
+     **/
+    public boolean checkWord(String word);
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/SpellChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/SpellChecker.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/SpellChecker.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/skeleton/spell.services/src/spell/services/SpellChecker.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,24 @@
+/*
+ * 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 spell.services;
+
+public interface SpellChecker
+{
+    //TODO
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.checker.example" default="package" basedir=".">
+	
+	<target name="clean">
+		<ant dir="spell.services" target="clean"/>
+		<ant dir="spell.english" target="clean"/>
+		<ant dir="spell.checker" target="clean"/>
+		<ant dir="spell.checker.gui" target="clean"/>
+	</target>
+	
+	<target name="package">
+		<ant dir="spell.services" target="package"/>
+		<ant dir="spell.english" target="package"/>
+		<ant dir="spell.checker" target="package"/>
+		<ant dir="spell.checker.gui" target="package"/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.checker.gui" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/spell.checker.gui.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/spell.checker.gui.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/spell.checker.gui.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/spell.checker.gui.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.gui
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/SpellCheckerGui.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/SpellCheckerGui.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/SpellCheckerGui.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker.gui/src/spell/gui/SpellCheckerGui.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,138 @@
+/*
+ * 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 spell.gui;
+
+import org.apache.felix.ipojo.annotations.*;
+import spell.services.SpellChecker;
+
+import javax.swing.*;
+
+/**
+ * A very simple Gui interacting with the CheckSpeller service
+ */
+@Component
+@Instantiate
+public class SpellCheckerGui extends JFrame {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Swing component where the user write the passage to check.
+     */
+    private JTextField passage = null;
+
+    /**
+     * Area where the result is displayed.
+     */
+    private JLabel result = null;
+
+    /**
+     * Service dependency on the SpellChecker.
+     */
+    @Requires
+    private SpellChecker checker;
+
+    /**
+     * Constructor.
+     * Initialize the GUI.
+     */
+    public SpellCheckerGui() {
+        super();
+        initComponents();
+        this.setTitle("Spellchecker Gui");
+    }
+
+    /**
+     * Initialize the Swing Gui.
+     */
+    private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
+
+        // The check button
+        JButton checkButton = new JButton();
+        result = new JLabel();
+        passage = new JTextField();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); // Stop Felix...
+        getContentPane().setLayout(new java.awt.GridBagLayout());
+
+        checkButton.setText("Check");
+        checkButton.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent e) {
+                check();
+            }
+        });
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(checkButton, gridBagConstraints);
+
+        result.setPreferredSize(new java.awt.Dimension(175, 20));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(result, gridBagConstraints);
+
+        passage.setPreferredSize(new java.awt.Dimension(175, 20));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+        getContentPane().add(passage, gridBagConstraints);
+
+        pack();
+    }
+
+    /**
+     * Check Button action.
+     * Collects the user input and checks it.
+     */
+    private void check() {
+        String[] result = checker.check(passage.getText());
+        if (result != null) {
+            this.result.setText(result.length + " word(s) are misspelled");
+        } else {
+            this.result.setText("All words are correct");
+        }
+    }
+
+    /**
+     * Start callback.
+     * This method will be called when the instance becomes valid.
+     * It set the Gui visibility to true.
+     */
+    @Validate
+    public void start() {
+        this.setVisible(true);
+    }
+
+    /**
+     * Stop callback.
+     * This method will be called when the instance becomes invalid or stops.
+     * It deletes the Gui.
+     */
+    @Invalidate
+    public void stop() {
+        this.dispose();
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+
+<project name="spell.checker" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+	<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/spell.checker.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/spell.checker.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/spell.checker.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/spell.checker.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.checker
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/SpellCheck.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/SpellCheck.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/SpellCheck.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.checker/src/spell/checker/SpellCheck.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,78 @@
+/*
+ * 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 spell.checker;
+
+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.Requires;
+import spell.services.DictionaryService;
+import spell.services.SpellChecker;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+@Component
+@Provides
+@Instantiate
+public class SpellCheck implements SpellChecker {
+
+    @Requires // This is a service dependency.
+    private DictionaryService dictionary;
+
+    /**
+     * Implements SpellChecker.check(). Checks the given passage for misspelled words.
+     *
+     * @param passage the passage to spell check.
+     * @return An array of misspelled words or null if no words are misspelled.
+     */
+    public String[] check(String passage) {
+        // No misspelled words for an empty string.
+        if ((passage == null) || (passage.length() == 0)) {
+            return null;
+        }
+
+        List<String> errorList = new ArrayList<String>();
+
+        // Tokenize the passage using spaces and punctuation.
+        StringTokenizer st = new StringTokenizer(passage, " ,.!?;:");
+
+        // Loop through each word in the passage.
+        while (st.hasMoreTokens()) {
+            String word = st.nextToken();
+
+            // Check the current word.
+            if (!dictionary.checkWord(word)) {
+                // If the word is not correct, then add it
+                // to the incorrect word list.
+                errorList.add(word);
+            }
+        }
+
+        // Return null if no words are incorrect.
+        if (errorList.size() == 0) {
+            return null;
+        }
+
+        // Return the array of incorrect words.
+        System.out.println("Wrong words:" + errorList);
+        return errorList.toArray(new String[errorList.size()]);
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.english" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../../tasks/bnd-${bnd.version}.jar"/>
+	<taskdef name="ipojo" classpath="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar"
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+		<delete dir="${lib.dir}"/>
+	</target>
+	
+	<target name="buildclasspath">
+		<copy file="../spell.services/output/spell.services.jar" todir="${lib.dir}"/>
+        <copy file="../../tasks/org.apache.felix.ipojo.ant-${ipojo.ant.version}.jar" todir="${lib.dir}"/>
+	</target>
+
+    <path id="classpath">
+        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+    </path>
+
+	<target name="compile" depends="clean, buildclasspath">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpathref="classpath"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}"
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+		
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+		/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/spell.english.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/spell.english.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/spell.english.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/spell.english.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Private-Package: spell.english
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/EnglishDictionary.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/EnglishDictionary.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/EnglishDictionary.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.english/src/spell/english/EnglishDictionary.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,56 @@
+/*
+ * 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 spell.english;
+
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Instantiate;
+import org.apache.felix.ipojo.annotations.Provides;
+import spell.services.DictionaryService;
+
+/**
+ * An implementation of the Dictionary service containing English words
+ * see DictionaryService for details of the service.
+ **/
+@Component // It's an iPOJO Component
+@Provides // We provide a service
+@Instantiate // We declare an instance of our component
+public class EnglishDictionary implements DictionaryService {
+
+    // The set of words contained in the dictionary.
+    String[] dictionary = { "welcome", "to", "the", "ipojo", "tutorial" };
+
+    /**
+     * Implements DictionaryService.checkWord(). Determines
+     * if the passed in word is contained in the dictionary.
+     * @param word the word to be checked.
+     * @return true if the word is in the dictionary,
+     *         false otherwise.
+     **/
+    public boolean checkWord(String word) {
+        word = word.toLowerCase();
+
+        // This is very inefficient
+        for (String dict : dictionary) {
+            if (dict.equals(word)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/build.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/build.xml?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/build.xml (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/build.xml Mon Apr 22 12:12:33 2013
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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 name="spell.services" default="package" basedir="">
+	
+	<property name="src.dir" value="src"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../../tasks/bnd-${bnd.version}.jar"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+	</target>
+
+	<target name="compile" depends="clean">
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+		  />
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+	</target>
+
+</project>

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/spell.services.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/spell.services.bnd?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/spell.services.bnd (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/spell.services.bnd Mon Apr 22 12:12:33 2013
@@ -0,0 +1 @@
+Export-Package: spell.services
\ No newline at end of file

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,31 @@
+/*
+ * 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 spell.services;
+
+public interface DictionaryService {
+    
+    /**
+     * Check for the existence of a word.
+     * @param word the word to be checked.
+     * @return true if the word is in the dictionary,
+     *         false otherwise.
+     **/
+    public boolean checkWord(String word);
+
+}

Added: felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/SpellChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/SpellChecker.java?rev=1470471&view=auto
==============================================================================
--- felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/SpellChecker.java (added)
+++ felix/trunk/ipojo/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/SpellChecker.java Mon Apr 22 12:12:33 2013
@@ -0,0 +1,40 @@
+/*
+ * 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 spell.services;
+
+/**
+ * A simple service interface that defines a spell checker service.
+ * A spell checker service checks the spelling of all words in a
+ * given passage. A passage is any number of words separated by
+ * a space character and the following punctuation marks: comma,
+ * period, exclamation mark, question mark, semi-colon, and colon.
+**/
+public interface SpellChecker
+{
+    /**
+     * Checks a given passage for spelling errors. A passage is any
+     * number of words separated by a space and any of the following
+     * punctuation marks: comma (,), period (.), exclamation mark (!),
+     * question mark (?), semi-colon (;), and colon(:).
+     * @param passage the passage to spell check.
+     * @return An array of misspelled words or null if no
+     *         words are misspelled.
+    **/
+    public String[] check(String passage);
+}



Mime
View raw message