You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2012/12/14 15:30:22 UTC
svn commit: r1421893 [9/24] - in /felix/site/trunk/content: ./
documentation/ documentation/community/ documentation/development/
documentation/faqs/ documentation/subprojects/
documentation/subprojects/apache-felix-commons/
documentation/subprojects/a...
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,159 @@
+Title: apache-felix-ipojo-header
+
+{style:import=http://felix.apache.org/ipojo/site/superfish.css}
+{style:import=http://felix.apache.org/ipojo/site/style.css}
+
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shCore.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushCSharp.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPhp.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJScript.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushVb.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushSql.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushXml.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushShell.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushDelphi.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushPython.js"></script>
+<script class="javascript" src="http://cwiki.apache.org/confluence/download/resources/confluence.ext.code:code/shBrushJava.js"></script>
+
+<script type="text/javascript" src="http://felix.apache.org/ipojo/site/jquery-1.js"></script>
+<script type="text/javascript" src="http://felix.apache.org/ipojo/site/hoverIntent.js"></script>
+<script type="text/javascript" src="http://felix.apache.org/ipojo/site/superfish.js"></script>
+<script type="text/javascript" src="http://felix.apache.org/ipojo/site/supersubs.js"></script>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+ $("ul.sf-menu").supersubs({
+ minWidth: 14, // minimum width of sub-menus in em units
+ maxWidth: 30, // maximum width of sub-menus in em units
+ extraWidth: 1 // extra width can ensure lines don't sometimes turn over
+ // due to slight rounding differences and font-family
+ }).superfish(); // call supersubs first, then superfish, so that subs are
+ // not display:none when measuring. Call before initialising
+ // containing tabs for same reason.
+ });
+
+</script>
+<div class="main">
+<div class="page-header"/>
+<img src="http://felix.apache.org/ipojo/site/header.png" class="header">
+<a href="http://ipojo.org"><img src="http://felix.apache.org/ipojo/site/ipojo.png" width="225" class="header-logo"></a>
+<ul class="sf-menu sf-js-enabled sf-shadow" id="ipojo-menu">
+<li class="current">
+<!-- Menu Overview -->
+<a href="#" class="sf-with-ul">Overview<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+<ul>
+ <li>
+ [Home]({{ refs.apache-felix-ipojo.path }})
+ </li>
+ <li>
+ [Why choose iPOJO]({{ refs.apache-felix-ipojo-why-choose-ipojo.path }})
+ </li>
+ <li>
+ [Success stories]({{ refs.apache-felix-ipojo-successstories.path }})
+ </li>
+ <li>
+ [Features]({{ refs.apache-felix-ipojo-feature-overview.path }})
+ </li>
+</ul>
+</li>
+
+<li class="">
+<!-- Menu download -->
+<li>
+[Download ]({{ refs.-download.path }})
+</li>
+
+<li class="">
+<!-- Menu Documentation -->
+<a href="#" class="sf-with-ul">Documentation<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+<ul>
+ <!-- sub-menu : getting started -->
+ <li class="">
+ <a href="#" class="sf-with-ul">Getting Started<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+ <ul>
+ <li>[iPOJO in 10 minutes]({{ refs.ipojo-in-10-minutes.path }})</li>
+ <li>[Using Annotations]({{ refs.how-to-use-ipojo-annotations.path }})</li>
+ <li>[Maven tutorial]({{ refs.ipojo-hello-word-maven-based-tutorial.path }})</li>
+ <li>[Advanced tutorial]({{ refs.ipojo-advanced-tutorial.path }})</li>
+ <li>[Using Distributed OSGi]({{ refs.apache-felix-ipojo-dosgi.path }})</li>
+ <li>[Application Composition]({{ refs.ipojo-composition-tutorial.path }})</li>
+ </ul>
+ </li> <!-- end of getting started -->
+ <!-- sub menu : Describing Components -->
+ <li class="">
+ <a href="http://felix.apache.org/site/describing-components.html" class="sf-with-ul">Describing components<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+ <ul>
+ <li>[Requiring a service]({{ refs.service-requirement-handler.path }})</li>
+ <li>[Providing a service]({{ refs.providing-osgi-services.path }})</li>
+ <li>[Lifecycle management]({{ refs.lifecycle-callback-handler.path }})</li>
+ <li>[Configuration]({{ refs.configuration-handler.path }})</li>
+ <li>[Introspection]({{ refs.architecture-handler.path }})</li>
+ <li>[Impacting the lifecycle]({{ refs.controller-lifecycle-handler.path }})</li>
+ <li>[Asynchronous communication]({{ refs.event-admin-handlers.path }})</li>
+ <li>[JMX management]({{ refs.ipojo-jmx-handler.path }})</li>
+ <li>[Extender pattern]({{ refs.extender-pattern-handler.path }})</li>
+ <li>[Whiteboard pattern]({{ refs.white-board-pattern-handler.path }})</li>
+ <li>[Temporal dependencies]({{ refs.temporal-service-dependency.path }})</li>
+ </ul>
+ </li> <!-- End of describing components -->
+ <!-- sub-menu : User Guide -->
+ <li class="">
+ <a href="" class="sf-with-ul">User Guide<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+ <ul>
+ <li>[iPOJO and config admin]({{ refs.felix-combining-ipojo-and-configuration-admin.path }})</li>
+ <li>[Factories and Instances]({{ refs.felix-how-to-use-ipojo-factories.path }})</li>
+ <li>[XML Schemas]({{ refs.using-xml-schemas.path }})</li>
+ <li>[API]({{ refs.apache-felix-ipojo-api.path }})</li>
+ <li>[Testing components]({{ refs.apache-felix-ipojo-testing-components.path }})</li>
+ <li>[Eclipse Integration]({{ refs.apache-felix-ipojo-eclipse-integration.path }})</li>
+ <li>[FAQ]({{ refs.ipojo-faq.path }})</li>
+ <li>[Reference Card]({{ refs.ipojo-reference-card.path }})</li>
+ </ul>
+ </li> <!-- end of user guide -->
+ <!-- sub-menu : Dev Guide -->
+ <li>
+ <a href="#" class="sf-with-ul">Advanced Topics<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+ <ul>
+ <li>[Javadoc](http://felix.apache.org/ipojo/api/1.6.0)</li>
+ <li>[Handler development]({{ refs.-how-to-write-your-own-handler.path }})</li>
+ <li>[Manipulation Metadata ]({{ refs.-how-to-use-ipojo-manipulation-metadata.path }})</li>
+ <li>[Dive into the iPOJO Manipulation depths]({{ refs.dive-into-the-ipojo-manipulation-depths.path }})</li>
+ </ul>
+ </li> <!-- End of Dev guide -->
+</ul>
+</li> <!-- End of doc -->
+<!-- Menu 4 : Tools -->
+<li class="">
+<a href="#" class="sf-with-ul">Tools<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+<ul>
+ <li>[Ant Task]({{ refs.ipojo-ant-task.path }})</li>
+ <li>[Eclipse Plugin]({{ refs.ipojo-eclipse-plug-in.path }})</li>
+ <li>[Maven Plugin]({{ refs.ipojo-maven-plug-in.path }})</li>
+ <li>[`arch` shell command]({{ refs.felix-ipojo-arch-command.path }})</li>
+ <li>[Online Manipulator]({{ refs.apache-felix-ipojo-online-manipulator.path }})</li>
+ <li>[Webconsole plugin]({{ refs.ipojo-webconsole-plugin.path }})</li>
+ <li>[Junit4OSGi]({{ refs.apache-felix-ipojo-junit4osgi.path }})</li>
+</ul>
+</li><!-- End of tools -->
+<!-- Menu 5 : Support -->
+<li>
+[Support ]({{ refs.-ipojo-support.path }})
+</li>
+<!-- End of the menu 5 -->
+<!-- Menu 6 : Misc -->
+<li class="">
+<a href="#" class="sf-with-ul">Misc<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>
+<ul>
+ <li>[Supported JVMs]({{ refs.apache-felix-ipojo-supportedvms.path }})</li>
+ <li>[Supported OSGi Implementations]({{ refs.apache-felix-ipojo-supportedosgi.path }})</li>
+ <li>[iPOJO's Dark Side Blog](http://ipojo-dark-side.blogspot.com)</li>
+ <li>[Article & Presentations]({{ refs.article-presentations.path }})</li>
+ <li><a href="http://www.apache.org/">ASF</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html">Sponsors</a></li>
+</ul>
+</li><!-- End of misc -->
+</ul> <!-- End of the menu -->
+</div> <!-- Page header -->
+
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header/apache-felix-ipojo-footer.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header/apache-felix-ipojo-footer.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header/apache-felix-ipojo-footer.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-header/apache-felix-ipojo-footer.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,17 @@
+Title: apache-felix-ipojo-footer
+
+
+ </div>
+ <img src="http://felix.apache.org/ipojo/site/footer.png" class="footer">
+</div>
+
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try{
+var pageTracker = *gat.*getTracker("UA-1518442-4");
+pageTracker._trackPageview();
+} catch(err) {}
+</script>
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-issuestracker.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-issuestracker.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-issuestracker.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-issuestracker.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,20 @@
+Title: apache-felix-ipojo-issuestracker
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# Issues Tracker
+
+## Open a new issue
+* Go to the [https://issues.apache.org/jira/](https://issues.apache.org/jira/)
+* Select the Felix project
+* Open the 'create an issue' form.
+* Then, select the Felix project and the issue type
+* At the second step, select the *iPOJO* component and fill out the form (please select the affected version)
+* Finally click on the create button
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,29 @@
+Title: apache-felix-ipojo-junit4osgi
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# The JUnit4OSGi framework: a simple test framework for OSGi
+
+*JUnit4OSGi is a test framework executing JUnit tests on an OSGi runtime. JUnit4OSGi provides a JUnit++ environment specialized for OSGi, several runners and a maven plugin executing your tests during your build process*
+
+## Why JUnit4OSGi ?
+OSGi is a great technology to create modular and dynamic applications. However, creating modular applications raise the need of integration tests: How to be sure that all my modules/services... collaborate correctly. Unit test is great, but does not really check my whole system and the relation between my modules.
+Junit4OSGi is a framework allowing the execution of JUnit tests in an OSGi environment ! It stems from the fact that testing applications on top on OSGi is quite complex compared to classic Java unitary tests. With junit4osgi you will be able to test all your bundles together and check that everything works correctly (integration tests).
+
+The goal of JUnit4OSGi is to provide the same mechanisms as unitary tests in an OSGi context. It allows using the JUnit concepts, although tests are run in an OSGi framework, using all of its distinctiveness. The JUnit4OSGi framework allows you to :
+* Perform OSGi services tests.
+* Test applications on different VMs, OSGi implementations.
+* Test dynamism impact.
+
+Interested by `junit4osgi`... start the adventure !
+* [Tutorial]({{ refs.apache-felix-ipojo-junit4osgi-tutorial.path }})
+* [OSGi and firends methods]({{ refs.apache-felix-ipojo-junit4osgi-methods.path }})
+* [junit4osgi architecture]({{ refs.apache-felix-ipojo-junit4osgi-architecture.path }})
+* [Running your test in Maven]({{ refs.apache-felix-ipojo-junit4osgi-maven.path }})
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-architecture.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-architecture.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-architecture.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-architecture.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,42 @@
+Title: apache-felix-ipojo-junit4osgi-architecture
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# junit4osgi framework architecture
+
+*This page describes the architecture of the junit4osgi framework. This does not include the maven-junit4osgi-plugin.*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## Global architecture
+
+!junit4osgi-arch.png|align=center, width=50%, height=50%!
+
+A system tested with junit4OSGi is divide in three parts:
+1. The tested system composed by bundles/services/... composing the system under tests. This can be the `true` application.
+1. Tests bundles containing tests stressing/checking the system under tests.
+1. The junit4OSGi framework composed by a runtime bundle (executing tests) and a runner bundle (launching test).
+
+junit4OSGi does not impacts anything on the system under test. Test bundles interact with the system under test via services/events ... Bundle containing tests declared contained test suites in there `manifest` such as:
+
+ Test-Suite: org.apache.felix.ipojo.test.scenarios.ps.ProvidedServiceTestSuite, org.apache.felix.ipojo.scenarios.ps.StrategyTestSuite
+
+
+Thanks to this `manifest` header, the junit4OSGi runtime bundle collects tests. This bundle is the core of the test framework, and manage both collection and execution of tests. The runner bundle just launch tests. According to the runner implementation, test selection can also be done. Several runner have been developped:
+* `junit` Felix command: executing test from the Felix shell (only for Felix)
+* Swing runner: executing test from a Swing application (works for Felix, Equinox and Knopflerfish)
+* Immediate runner: executing test as soon the runner arrives in the framework (works for Felix, Equinox and Knopflerfish)
+* Maven runner: launching an embedded Felix with required bundle and launching test automatically during the Maven build process.
+
+## Why junit 3 ?
+
+The junit4OSGi framework use junit 3 because it was design and developed to test embedded systems. So, the junit4OSGi framework runs on a J2ME Foundation Profile 1.1 virtual machine (such as Mika). However, soon, junit4OSGi will evolve to support Junit4 and TestNG.
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-maven.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-maven.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-maven.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-maven.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,214 @@
+Title: apache-felix-ipojo-junit4osgi-maven
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# The Maven-junit4OSGi-plugin
+
+*junit4OSGi tests can also be executed automatically during the `integration-test` phase of a maven build process. This page describes the maven-junit4osgi-plugin allowing a seamless maven integration.*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## What does the maven-junit4osgi-plugin provide?
+ * Allows testing OSGi applications
+ * Integrated in a Maven-based build process
+ * Provides the same output as Surefire
+ * Supports Maven site generation
+
+## Using the plug-in
+
+### Download and building the plug-in
+The plug-in sources are available in the iPOJO trunk.
+However the junit4osgi and iPOJO runtime are also required. So, download the source of iPOJO:
+`svn co http://svn.apache.org/repos/asf/felix/trunk/ipojo/`
+To compile it, run the following commands:
+
+ cd ipojo
+ mvn clean install -Pexamples
+
+
+## Simple configuration
+So, first the project using the plug-in is not the project under test. It's another project containing either only integration-test packaged in a bundle, or is empty (and so depends on other bundles containing integration tests).
+Tests contained in the project are developed with junit4osgi, and are packaged in a bundle with the maven-bundle-plugin.
+In the pom file, add the following plugin configuration to use the maven-junit4osgi-plugin:
+
+ <plugin>
+ <groupid>org.apache.felix</groupid>
+ <artifactid>maven-junit4osgi-plugin</artifactid>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <deployprojectartifact>true</deployprojectartifact>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+## Plugin parameter
+The plug-in has only one parameter. The `deployProjectArtifact` parameter enables or disables the current artifact deployment. If the current project contains tests, the plug-in can deploy the built artifact (as illustrated in this pom). Otherwise, the current project artifact is not deployed. This can be useful if the project just depends on other test bundles and sets the test configuration (as this pom).
+
+### Configuring the set of bundles to deploy
+There is two different ways to configure the plug-in to deploy other bundles. If the bundle to deploy is a maven artifact, just add this artifact as a maven project dependency. Here is an example:
+
+ <dependency>
+ <artifactid>tests.manipulation.metadata</artifactid>
+ <groupid>ipojo.tests</groupid>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+
+
+If your bundle is not a maven artifact, you can configure the plugin with the bundle URL (from where the bundle will be deployed)
+
+ <configuration>
+ <deployprojectartifact>true</deployprojectartifact>
+ <bundles>
+ <param>file:/Users/clement/bundles/test-metadata.jar</param>
+ </bundles>
+ </configuration>
+
+
+Set bundles are installed and started. You can depend on bundle that does not contain test as well as bundle containing tests.
+
+### Configuring Felix
+It is also possible to set Felix properties in the configuration:
+
+ <configuration>
+ <configuration>
+ <org.osgi.http.port>8083</org.osgi.http.port>
+ </configuration>
+ </configuration>
+
+
+### Showing/hiding test trace
+The plugin collects System.out, System.err and logged messages to write them in the test report. Moreover, the plugin allows hiding traces when tests are executed. To achieve this just add the `hideOutputs` parameter.
+
+ <configuration>
+ <hideOutputs>true</hideOutputs>
+ </configuration>
+
+
+### Disabling/Enabling the Log Service
+The plugin exposed a LogService in the OSGi framework to collects logged messaged. This service enabled by default. You can diable it by launching the plugin with the `logService` property set to `false`
+
+ mvn clean integration-test -DlogService=false
+
+
+### Skipping integration-test
+Sometimes you want to skip tests :-(. The plugin uses the `maven.test.skip` property to skip tests such as
+
+ mvn clean install -Dmaven.test.skip=true
+
+
+### Ignoring failures
+If tests throws errors or have failures, the plugin breaks the Maven build. You can by-pass this behavior by ignoring errors and failures. This is useful during test generation.
+
+ mvn clean install -Dmaven.test.failure.ignore=true
+
+## Executing the plug-in
+To execute test, just launch the `mvn clean integration-test` command.
+
+ [INFO] Scanning for projects...
+ [INFO] ------------------------------------------------------------------------
+ [INFO] Building iPOJO Primitive Manipulation Test Suite
+ [INFO] task-segment: [integration-test]
+ [INFO] ------------------------------------------------------------------------
+ [INFO] [resources:resources]
+ [INFO] Using default encoding to copy filtered resources.
+ [INFO] [compiler:compile]
+ [INFO] Nothing to compile - all classes are up to date
+ [INFO] [resources:testResources]
+ [INFO] Using default encoding to copy filtered resources.
+ [INFO] [compiler:testCompile]
+ [INFO] No sources to compile
+ [INFO] [surefire:test]
+ [INFO] No tests to run.
+ [INFO] [bundle:bundle]
+ [INFO] [ipojo:ipojo-bundle {execution: default}]
+ [INFO] Start bundle manipulation
+ [INFO] Metadata file : /Users/clement/Documents/workspaces/felix-trunk/ipojo/tests/manipulator/primitives/target/classes/metadata.xml
+ [INFO] Input Bundle File : /Users/clement/Documents/workspaces/felix-trunk/ipojo/tests/manipulator/primitives/target/tests.manipulation.primitives-1.1.0-SNAPSHOT.jar
+ [INFO] Bundle manipulation - SUCCESS
+ [INFO] [junit4osgi:test {execution: default}]
+ Analyzing org.apache.felix.ipojo - compile
+ Analyzing org.apache.felix.ipojo.metadata - compile
+ Analyzing org.osgi.core - compile
+ Analyzing junit - compile
+ Analyzing org.apache.felix.ipojo.junit4osgi - compile
+ Analyzing tests.manipulation.metadata - test
+
+ -------------------------------------------------------
+ T E S T S
+ -------------------------------------------------------
+ Deploy : /Users/clement/Documents/workspaces/felix-trunk/ipojo/tests/manipulator/primitives/target/tests.manipulation.primitives-1.1.0-SNAPSHOT.jar
+ Loading org.apache.felix.ipojo.test.scenarios.manipulation.ManipulationTestSuite
+ Loading org.apache.felix.ipojo.test.scenarios.manipulation.ManipulationTestSuite
+ Junit Extender starting ...
+ Running Manipulation Metadata Test Suite
+ Tests run: 16, Failures: 0, Errors: 0, Time elapsed: 0 sec
+ Running Primitive Manipulation Test Suite
+ Tests run: 17, Failures: 0, Errors: 0, Time elapsed: 0 sec
+
+ Results :
+
+ Tests run: 33, Failures: 0, Errors:0
+
+ Unload test suites [class org.apache.felix.ipojo.test.scenarios.manipulation.ManipulationTestSuite]
+ Unload test suites [class org.apache.felix.ipojo.test.scenarios.manipulation.ManipulationTestSuite]
+ Cleaning test suites ...
+ [INFO] ------------------------------------------------------------------------
+ [INFO] BUILD SUCCESSFUL
+ [INFO] ------------------------------------------------------------------------
+ [INFO] Total time: 6 seconds
+ [INFO] Finished at: Mon Nov 10 21:30:21 CET 2008
+ [INFO] Final Memory: 9M/18M
+ [INFO] ------------------------------------------------------------------------
+
+
+Failures and errors are reported in the plugin output.
+
+## Generating the report web page
+When test are executed, the plug-in generates XML reports (int the target/junit4osgi-reports directory) using the same convention as Surefire. So, it is possible to configure Surefire to generate the web page with test results.
+To do this, add the following report configuration to the project executing tests:
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupid>org.apache.maven.plugins</groupid>
+ <artifactid>maven-surefire-report-plugin</artifactid>
+ <version>2.4.3</version>
+ <configuration>
+ <showsuccess>true</showsuccess>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+This snippet configures the maven-surefire-report-plugin to collect results from the 'target/surefire-reports' directory.
+Then execute the plugin with the following command:
+{code:none}
+mvn org.apache.maven.plugins:maven-surefire-report-plugin:2.4.3:report
+
+
+ This command generates the web page with test results in 'target/site'. This page shows an example of page generated with this command.
+
+ h2. Plug-in design
+ The plug-in is quiet simple, it just starts an embedded Felix with a special activator installing and starting the junit4osgi framework and specified bundles.
+ Then, before executing test, the plug-in waits for "stability". Indeed, as bundle activation can be asynchronous, the plug-in need to wait that the configuration is stable. Stability is obtained when all bundles are activated, and no new services appear or disappear on a 500 ms period. If after several second the stability cannot be reached, the plug-in stops.
+ Once the stability is reached, the junit4ogsi runner service is used to execute tests. Then results are collected and reports are generated.
+
+ h2. Conclusion
+ This page has presented a front-end automating the execution of junit4osgi tests. Now it is possible to integrate OSGi application tests in a build process. The presented maven plugin provides following features:
+ * An easy integration in a Maven-based build process
+ * A good flexibility allowing reproducing production execution environments to test the application
+ * Test result output is the same as surefire
+ * Is able to generate Surefire-like reports
+ \\
+ \\
+ {include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-methods.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-methods.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-methods.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-methods.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,77 @@
+Title: apache-felix-ipojo-junit4osgi-methods
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# OSGi and friends methods
+
+*Developing OSGi tests can be definitely boring. First, testing is generally not a very exciting experience, but imagine if you have to handle all the OSGi issues in your tests... Don't worry junit4osgi provides methods allowing to interact easily with OSGi!*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## OSGi methods
+
+junit4osgi test case extends the `OSGiTestCase` class. This class provides useful methods allowing to find services, get them, get the `PackageAdmin` service... The description of these methods can be found afterward.
+
+The most part of the methods are available statically and non-statically. Static methods require a `Bundle`. Non static methods use the current bundle context, and track get services to release them when the test is done. So, we advise you to use the non-static methods. Static methods just allow you to check that a specific bundle can access to services / resources.
+
+### Service interaction
+* `boolean isServiceAvailable(String svc)` : returns `true` if the service `svc` is available.
+* `boolean isServiceAvailableByPID(String itf, String pid)` : return `true` if the service `svc` is available and exposed with `pid` as `service.pid`.
+
+* `ServiceReference getServiceReference(String itf)`: returns a service reference exposing the `itf` service specification, or `null` if not available.
+* `ServiceReference getServiceReference(String itf, String filter)`: returns a service reference matching with the \<service interface, filter\> request, or `null` is not available.
+* `ServiceReference getServiceReferenceByPID(String itf, String pid)`: returns a service reference exposing the service `itf` and exposed with a `service.pid` equals to `pid`, or `null` if not available.
+* `ServiceReference[]({{ refs..path }}) getServiceReferences(String itf, String filter)`: returns all the service references matching with the \<service interface, filter\> request, or an empty array is not available.
+
+* `Object getServiceObject(String itf, String filter)`: returns a service object matching with the \<service interface, filter\> request or `null` is not available.
+* `Object getServiceObject(ServiceReference ref)`: returns the service object associated with the given `service reference` or `null` if not available.
+* `Object[]({{ refs..path }}) getServiceObjects(String itf, String filter)`: gets all the service objects matching with the \<service interface, filter\> request or an empty array is no providers are available.
+
+* `void waitForService(String itf, String filter, long timeout)`: waits for a service arrival matching with the \<service interface, filter\> request. If the timeout expires, this method fails.
+
+### Get the bundle context
+* `BundleContext getContext()` : gives access to the OSGiTestCase bundle context.
+
+### Install/Start/Uninstall bundles
+* `Bundle installBundle(String url)`: installs a bundle from the given url. This method fails if the bundle cannot be installed.
+* `Bundle installBundle(String url, InputStream stream)`: installs a bundle from the given input stream. This methods fails if the bundle cannot be installed.
+* `Bundle installAndStart(String url)`: installs a bundle from the given url and starts it. This methods fails if the bundle cannot be installed and started correctly.
+* `Bundle installAndStart(String url, InputStream stream)`: installs a bundle from the given input stream and starts it. This methods fails if the bundle cannot be installed and started correctly.
+* `Bundle getBundle(long bundleId)`: gets an installed bundle by its bundle id, or `null` if not found.
+* `Bundle getBundle(String name)`: gets an installed bundle by its symbolic name. Fails if not found.
+
+### PackageAdmin
+* `PackageAdmin getPackageAdmin()`: gives access to the `Package Admin` service exposed by the framework.
+* `refresh()`: refresh package wires.
+
+## Extensibility: Helper objects
+junit4osgi provides an extensibility mechanism to reduce the pain of testing. So, if you're interacting with specific services or environment, you can use `Helper` objects. Those object have to be created in the `setUp` method and `disposed` in the `tearDown` method.
+
+So, for example, if you write iPOJO tests, you can use the iPOJO helper providing a lot of utility functions simplifying the development of tests.
+{code:java}
+public class MyTest extends OSGiTestCase {
+ ComponentInstance fooProvider1, fooProvider2;
+
+ IPOJOHelper helper; // Helper object
+
+ public void setUp() {
+ helper = new IPOJOHelper(this); // Create the object.
+ String type2 = "PS-FooProviderType";
+
+ fooProvider1 = helper.createComponentInstance(type2, p3);
+ fooProvider2 = helper.createComponentInstance(type2, "FooProvider-4");
+ }
+
+ public void tearDown() {
+ helper.dispose(); // Dispose it, instances will be disposed too.
+ }
+
+
+ You can also implements your own helper (for specific purpose) by just implementing the {{Helper}} interface.
+ \\
+ \\
+ {include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-tutorial.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-tutorial.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-tutorial.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-junit4osgi/apache-felix-ipojo-junit4osgi-tutorial.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,314 @@
+Title: apache-felix-ipojo-junit4osgi-tutorial
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+
+# junit4osgi quick start
+
+*This page describes how using the junit4osgi framework. With the archive tutorial, a pre-configured version of Felix (with the test framework already installed) is also provided.*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## Getting JUnit4OSGi
+
+The JUnit4OSGi framework is available from the [Felix downloads](http://felix.apache.org/site/downloads.cgi). Source code is also available in the iPOJO sub-project ([sources|Download]). The JUnit4OSGi framework and the different launchers are built when you compile Felix.
+
+## How to run test?
+Firs of all to execute test you must deploy in your OSGi container:
+1. Your tests
+1. The junit4osgi runtime (executing tests)
+1. A runner launching tests
+
+Several runner are available:
+* You can use the JUnit4OSGi immediate-runner, which run tests contained in all the test-bundles. The results are displayed in the framework console output.
+* The JUnit4OSGi Felix Command (available only for the Apache Felix OSGi framework), allows you to run tests contained in a specific bundle. Test results are also displayed in the framework console output. The syntax of the command is very simple :
+** To run tests contained in the bundle with the given id :`{noformat}junit <bundle id>{noformat`}
+** To run tests contained in all the test-bundles installed in the framework :`junit all`
+* The JUnit4OSGi Swing GUI lets you select the test cases and test suites to execute and shows you graphically the result of the tests. You can double-click on a test case result to show its details.
+
+!http://felix.apache.org/site/apache-felix-ipojo-junit4osgi.data/screenshot-junit4ogsi-swing-runner.PNG!
+
+## TestCase, TestSuite
+A test case is an environment (made of conditions and variables) under which a tester will check that a requirement is satisfied. For JUnit, test cases are classes that define several test methods ; each test method tests an aspect of the targeted requirement. Test cases are often collected into test suites. A test suite aggregates several test cases (and even other test suites), including the notion of test hierarchy. Tests can be organized according to the different requirements they try to validate. The skeleton of a JUnit `TestCase` and `TestSuite` is shown just above :
+
+ /**
+ * The skeleton of a JUnit test case
+ */
+ public class MyTestCase extends junit.framework.TestCase {
+ ...
+
+ public void setUp() {
+ // Performs actions BEFORE running any test case.
+ }
+
+ public void testSomething() throws AnyException {
+ // A test method
+ ...
+ assertTrue(myTest);
+ assertEquals(myValue, expectedValue);
+ ...
+ }
+
+ public void testAnotherThing() {
+ // Another test method
+ ...
+ }
+
+
+ public void tearDown() {
+ // Performs actions AFTER running all test cases.
+ }
+ }
+
+
+
+ /**
+ * The skeleton of a JUnit test suite
+ */
+ public class MyTestSuite extends junit.framework.TestSuite {
+ /**
+ * The skeleton of a JUnit test suite
+ */
+ public static Test suite() {
+ TestSuite suite = new TestSuite("The name of the test suite");
+ suite.addTestSuite(MyTestCase.class);
+ suite.addTestSuite(AnotherTestCase.class);
+ ...
+ return suite;
+ }
+ }
+
+
+First, tests methods are declared in the test case. Their name must begin with "test", so JUnit will execute them on demand. The test are expressed in terms of JUnit assertions ; the `assert*()` methods causes JUnit test failure if the given assertion is false. The setUp() and tearDown() methods perform specific actions before and after test cases are run. Then, the test suite collect various test cases. It must implement the `suite()` method that returns the global (and organized) test suite to JUnit.
+
+## OSGiTestCase and OSGiTestSuite
+An OSGi test case, is a test case that runs in an OSGi context. `OSGiTestCase` is the class that all the OSGi test cases you write must extend. This class is a kind of bridge between the JUnit TestCase class and the OSGi environment. The only thing the `OSGiTestCase` class adds is the access to the bundle context of the bundle containing tests, and some utility methods, giving an easy access to other bundles and services registered in the OSGi framework.
+
+The structure of an `OSGiTestCase` is exactly the same as a classic JUnit `TestCase` :
+
+
+ /**
+ * The structure of an OSGiTestCase
+ */
+ public class MyOSGiTestCase extends OSGiTestCase {
+ public void setUp() {...}
+ public void testSomething() {
+ // You can access here the bundle context through
+ // the 'getContext()' method
+ getContext().getServiceReference(...);
+
+ ...
+ }
+ public void testAnotherThing() {...}
+ ...
+ public void tearDown() {...}
+ }
+
+
+By extension, OSGi test suites are collections of OSGi test cases. But you can also add classic JUnit test cases inside your `OSGiTestSuite`. The skeleton of an OSGiTestSuite is globally the same as a TestSuite, except the fact that a reference to the bundle context is passed :
+
+
+ public class MyOSGiTestSuite {
+ /**
+ * This method returns the suite of tests to run.
+ */
+ public static Test suite(BundleContext bc) {
+ OSGiTestSuite suite = new OSGiTestSuite("My OSGi test suite", bc);
+ suite.addTestSuite(MyFirstTest.class);
+ suite.addTestSuite(MySecondTest.class);
+ ...
+ // Here, we add a sub test suite in this test suite.
+ suite.addTest(AnotherTestSuite.suite(bc));
+ ...
+ return suite;
+ }
+ }
+
+
+## How to declare test suites
+This section explains how to declare your test suites in order to expose them to the JUnit4OSGi bundle.
+
+The written OSGi test suites must be declared by the bundle containing them. To do so, you define add the Test-Suite property in your bundle's header. The following snippets show you how to configure your bundle generation tool to add this property in the header. You can even declare test cases in it. The Junit4OSGi bundle will detect such an header in installed bundle (using the extender pattern) and execute contained tests on demand.
+
+With the maven-bundle-plugin, add the following lines in your project's pom :
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ ...
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ ...
+ <!-- Declare here the test cases and test suites of your bundle -->
+ <Test-Suite>
+ a.package.MyFirstTestSuite,
+ yet.another.package.MySingleTestCase
+ ...
+ </Test-Suite>
+ </instructions>
+ </configuration>
+ </plugin>
+
+
+With the aQute Bnd Ant task, add the following lines in your project bnd file:
+
+ Test-Suite: a.package.MyFirstTestSuite, yet.another.package.MySingleTestCase, ...
+
+
+## Quick examples
+The following examples show you how to perform unitary tests on your OSGi platform. The first example recovers the example given in the JUnit Cookbook, "bundlizes" it so tests can be run in an OSGi environment. None of the JUnit4OSGi specific features is used, but it shows how to adapt classic JUnit tests. The second example is more OSGi-oriented, and shows how a unitary test can access to the framework via its bundle context.
+
+These examples can be downloaded [here](http://people.apache.org/~clement/ipojo/tutorials/junit4osgi/junit4osgi-tutorial.zip).
+
+### Bundles to deploy to use junit4osgi
+
+If you don't use the archive, you can deploy the junit4osgi framework manually. Here is the list of the bundles to deploy and start:
+* org.apache.felix.ipojo-1.6.0.jar: iPOJO Core bundle
+* org.apache.felix.ipojo.handler.extender-1.6.0.jar: iPOJO Extender pattern handler
+* org.apache.felix.ipojo.junit4osgi-1.1.0-SNAPSHOT.jar: the JUnit4OSGi framework
+* org.apache.felix.ipojo.junit4osgi.felix-command-1.1.0-SNAPSHOT.jar: the command line junit4osgi runner
+
+
+### The remixed JUnit example
+This example is a simple conversion of a classic JUnit example derived from the JUnit Cookbook. The test case and the test suite are shown to remind you JUnit principles.
+
+ package junit.example;
+ import junit.framework.TestCase;
+ import junit.money.Money;
+
+ public class SimpleTestCase extends TestCase {
+ private Money f12CHF;
+ private Money f14CHF;
+ public void setUp() {
+ f12CHF= new Money(12, "CHF");
+ f14CHF= new Money(14, "CHF");
+ }
+ public void testEquals() {
+ assertTrue(!f12CHF.equals(null));
+ assertEquals(f12CHF, f12CHF);
+ assertEquals(f12CHF, new Money(12, "CHF"));
+ assertTrue(!f12CHF.equals(f14CHF));
+ }
+ public void testSimpleAdd() {
+ Money expected= new Money(26, "CHF");
+ Money result= f12CHF.add(f14CHF);
+ assertTrue(expected.equals(result));
+ }
+ }
+
+
+
+ package junit.example;
+ import junit.framework.Test;
+ import junit.framework.TestSuite;
+ public class SimpleTestSuite {
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Money Simple Test Suite");
+ suite.addTestSuite(SimpleTestCase.class);
+ return suite;
+ }
+ }
+
+
+
+The following bnd file declares the test suite in the target bundle's header :
+
+ Private-Package: junit.money, junit.example
+ Test-Suite: junit.example.SimpleTestSuite
+
+
+Once built, the bundle must be deployed in the provided Felix framework, and tests can be performed using the `'junit'` command :
+
+ -> ps
+ START LEVEL 1
+ ID State Level Name
+ ...
+ [ 12] [Active ] [ 1] Junit-Example (0)
+ ...
+ -> junit 12
+ Executing [Money Simple Test Suite]
+ ..
+ Time: 0
+ OK (2 tests)
+ ->
+
+
+As you can see above, all tests have been correctly executed !
+
+## An OSGi-based JUnit example
+This example shows you how to interact with the OSGi framework within your tests. The test bundle provide a service (HelloService) and tests its work normally. To get the service reference of the HelloService, it uses the bundle context field of the OSGiTestCase class (named `'context'`) and interacts with it like any other OSGi bundle does.
+
+ package junit.example;
+
+ import junit.service.hello.HelloService;
+
+ import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+ import org.osgi.framework.ServiceReference;
+
+ public class SimpleTestCase extends OSGiTestCase {
+
+ public void testHelloAvailability() {
+ ServiceReference ref = getServiceReference(HelloService.class.getName());
+ assertNotNull("Assert Availability", ref);
+ }
+
+ public void testHelloAvailability2() {
+ ServiceReference ref = getServiceReference(HelloService.class.getName(), null);
+ assertNotNull("Assert Availability", ref);
+ }
+
+ public void testHelloMessage() {
+ ServiceReference ref = getServiceReference(HelloService.class.getName());
+ assertNotNull("Assert Availability", ref);
+ HelloService hs = (HelloService) getContext().getService(ref);
+ String message = hs.getHelloMessage();
+ assertNotNull("Check the message existence", message);
+ assertEquals("Check the message", "hello", message);
+ // Don't need to unget references, they are unget by junit4osgi
+ }
+
+ public void testHelloMessage2() {
+ assertTrue("Check availability of the service",
+ isServiceAvailable(HelloService.class.getName()));
+ HelloService hs = (HelloService) getServiceObject(HelloService.class.getName(), null);
+ String message = hs.getHelloMessage();
+ assertNotNull("Check the message existence", message);
+ assertEquals("Check the message", "hello", message);
+ }
+ }
+
+
+The performed tests give out the following results :
+
+ -> ps
+ START LEVEL 1
+ ID State Level Name
+ ...
+ [ 17] [Active ] [ 1] Junit-OSGi-Example (0)
+ ...
+ -> services 17
+ Junit-OSGi-Example (17) provides:
+ ---------------------------------
+ objectClass = junit.service.hello.HelloService
+ service.id = 36
+ -> junit 17
+ Executing [Hello Service Test Suite]
+ ..
+ Time: 0,015
+ OK (4 tests)
+ ->
+
+
+## Simple right?
+
+So now you know everything required to run test inside OSGi. You can start developing your own test. To help you a little bit, junit4osgi provides [utilities methods]({{ refs.apache-felix-ipojo-junit4osgi-methods.path }}) greatly reducing the amount of code to write in your tests. Moreover, if you're a Maven user, the [maven-junit4osgi-plugin|apache-felix-ipojo-junit4osgi-maven] is made for you. It just runs your test directly during the maven build process.
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-keypoints.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-keypoints.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-keypoints.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-keypoints.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,45 @@
+Title: apache-felix-ipojo-keypoints
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# iPOJO Key Points
+*iPOJO is a service-oriented component model. What*'*s made iPOJO different? Just read this page.*
+
+## Used
+iPOJO is used a several and really heterogeneous domain. iPOJO is today used in mobile phone, in home gateway as well as in JEE servers! Module Fusion also proposes to use iPOJO for enterprise applications.
+
+## Philosophy
+iPOJO aims to be simple. The proposed development model is definitely simple. Do worry about all the obscured technical service and bindings details, just focus on your code. iPOJO manages the everything for you.
+Moreover, it was designed for the OSGi environment. It places the service concept as a top-level concept providing a better reusability, allowing implementation substitution and managing the dynamism.
+
+## Supported
+iPOJO is now supported by different companies and research center such as akquinet, Grenoble University, Bull...
+
+## Easy to use
+Based on the POJO concept and thanks to its different injection mechanisms, iPOJO allows you to reuse he high majority of your existing code! The business code does not depend on the OSGi environment or on specific technical services. The container manages everything for you.
+
+with iPOJO you're free! To describe your component, you have the choice among XML, Annotations or an API.
+
+## Reliable and Efficient
+iPOJO relies on:
+ * An OSGi R4.1 framework
+ * A J2ME Foundation 1.1 java virtual machine
+So, you can use iPOJO on Apache Felix, Eclipse Equinox or any OSGi implementation compliant with the OSGi R4.1 specification. Moreover, iPOJO just relies on J2ME Foundation 1.1 profile. So, you can easily embed it...
+However, this does not limit iPOJO in term of performance. iPOJO is one of the most efficient component models for OSGi.
+
+## Embeddable
+As told in the previous section, iPOJO does not required advanced Java Virtual Machine. Moreover its footprint is quite small. iPOJO Core size is only 200Kb ! No more is required to use iPOJO...
+## Adaptable
+iPOJO provides a very simple extensibility mechanism. So, you can extend iPOJO for your own requirement. Just look to the list of available handler (i.e. extension). Almost everything is possible...
+
+## Going further
+* Want to go further; read the [Why choose iPOJO page]({{ refs.apache-felix-ipojo-why-choose-ipojo.path }}).
+* Want to try; look at the [iPOJO in 10 minutes tutorial]({{ refs.ipojo-in-10-minutes.path }})
+* Want more information; feel free to send an email on [usrs@felix.apache.org]({{ refs.mailto-users-felix-apache-org.path }})
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-menu.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-menu.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-menu.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-menu.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,69 @@
+Title: apache-felix-ipojo-menu
+
+{style:import=http://people.apache.org/~clement/ipojo/ipojo.css}
+{span:class=ipojo-menu|id=ipojo-menu}
+###### *Overview*
+
+* [Home Page]({{ refs.apache-felix-ipojo.path }})
+* [Why choose iPOJO?]({{ refs.apache-felix-ipojo-why-choose-ipojo.path }})
+* [iPOJO Success Stories]({{ refs.apache-felix-ipojo-successstories.path }})
+* [iPOJO Feature Overview]({{ refs.apache-felix-ipojo-feature-overview.path }})
+* [Download & Install ]({{ refs.-download.path }})
+
+###### *Getting Started*
+
+* [iPOJO in 10 minutes]({{ refs.ipojo-in-10-minutes.path }})
+* [How to use iPOJO Annotations]({{ refs.how-to-use-ipojo-annotations.path }})
+* [iPOJO Hello Word (Maven-Based) tutorial]({{ refs.ipojo-hello-word-maven-based-tutorial.path }})
+* [iPOJO Advanced Tutorial]({{ refs.ipojo-advanced-tutorial.path }})
+* [iPOJO Composition Tutorial]({{ refs.ipojo-composition-tutorial.path }})
+
+###### *User Guide*
+
+* [Describing components (handler list) ]({{ refs.-describing-components.path }})
+* [Using XML Schemas]({{ refs.using-xml-schemas.path }})
+* [Describing components with the iPOJO-API]({{ refs.apache-felix-ipojo-api.path }})
+* [Testing components]({{ refs.apache-felix-ipojo-testing-components.path }})
+* [Advanced Topics]({{ refs.ipojo-advanced-topics.path }})
+* [Eclipse Integration]({{ refs.apache-felix-ipojo-eclipse-integration.path }})
+* [FAQ]({{ refs.ipojo-faq.path }})
+* [iPOJO Reference Card]({{ refs.ipojo-reference-card.path }})
+
+###### *Tools*
+
+* [iPOJO Eclipse Plug-in]({{ refs.ipojo-eclipse-plug-in.path }})
+* [iPOJO Ant Task]({{ refs.ipojo-ant-task.path }})
+* [iPOJO Maven Plug-in]({{ refs.ipojo-maven-plug-in.path }})
+* [Online-Manipulator]({{ refs.apache-felix-ipojo-online-manipulator.path }})
+* [iPOJO Arch Command]({{ refs.ipojo-arch-command.path }})
+* [iPOJO Webconsole plugin]({{ refs.ipojo-webconsole-plugin.path }})
+* [Junit4OSGi]({{ refs.apache-felix-ipojo-junit4osgi.path }})
+
+###### *Developer Guide*
+
+* Javadoc: [1.2](http://felix.apache.org/ipojo/api/1.2.0)
+* [How to write your own handler]({{ refs.how-to-write-your-own-handler.path }})
+* [How to use iPOJO Manipulation Metadata]({{ refs.how-to-use-ipojo-manipulation-metadata.path }})
+* [Dive into the iPOJO Manipulation depths]({{ refs.dive-into-the-ipojo-manipulation-depths.path }})
+
+###### *Misc & Contact*
+
+* [Issues Tracker]({{ refs.apache-felix-ipojo-issuestracker.path }})
+* [Supported JVMs]({{ refs.apache-felix-ipojo-supportedvms.path }})
+* [Supported OSGi Implementations]({{ refs.apache-felix-ipojo-supportedosgi.path }})
+* [iPOJO's Dark Side Blog](http://ipojo-dark-side.blogspot.com)
+* [Future Ideas]({{ refs.future-ideas.path }})
+* [Article & Presentations]({{ refs.article-presentations.path }})
+
+###### Experimentation
+
+* [ipojo-test-page]({{ refs.ipojo-test-page.path }})
+
+{span}
+
+{html:output=html}
+<script>
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+var pageTracker = *gat.*getTracker("UA-1518442-4");<br />pageTracker._trackPageview();
+</script>
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-online-manipulator.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-online-manipulator.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-online-manipulator.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-online-manipulator.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,67 @@
+Title: apache-felix-ipojo-online-manipulator
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# Apache Felix iPOJO Online Manipulator
+
+*iPOJO generally requires an additional packaging step to prepare the bundle to be managed by iPOJO. Despite this step doesn't change the class semantic, it can be a little annoying. The online manipulator avoids this offline step!*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## Features
+
+iPOJO is based on a bytecode [manipulation]({{ refs.dive-into-the-ipojo-manipulation-depths.path }}). This manipulate is `safe` and does not change the class semantics. Classes can still used after the manipulation without iPOJO. However this manipulation is required for iPOJO management. Generally, this manipulation occurs offline during the packaging time. The online manipulator allows to do this manipulation at install time.
+
+The online manipulator:
+* avoids offline manipulation
+* supports annotations
+* supports XSD schema
+{center}
+!manipulation.png|width=640|height=300!
+{center}
+This is quite useful if you don't want to add an extra packaging step, and provides the same capabilities as the "regular" way.
+
+## Usage
+
+The online-manipulator is in fact an URL Handler. So, it will process every bundle using a special URL prefix. To use it, just follows the below instructions:
+
+* Install and Start the URL Handler *
+This is a requirement. You must install and start the URL handler as well as iPOJO (core). The URL Handler is build by the online-manipulator iPOJO sub-project.
+On Felix you can either use the `start` command from the shell of OBR:
+
+| Shell Command | OBR |
+|--|--|
+
+
+start http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.ipojo.online.manipulator/1.6.0/org.apache.felix.ipojo.online.manipulator-1.6.0.jar|obr start "Apache Felix iPOJO URL Handler"|
+
+* Install a bundle using the `ipojo:` URL prefix
+Using the handler is quite easy. When you want to deploy a non-manipulated iPOJO bundle just use an url like
+
+ install ipojo:file:/.../bundle.jar
+
+
+The complete URL syntax is
+
+ install ipojo:bundle_url[!metadata_url]
+
+
+When using the `ipojo:` prefix, the OSGi platform delegates the loading to the url handler manipulating the bundle before its installation. This manipulation is exactly the same as the offline manipulation.
+
+
+## Dealing with metadata
+If the installed bundle contains a `metadata.xml` file either in its root or in the `META-INF` directory, the online manipulator will use it. However, you can also provide an external `metadata.xml` file by indicating the url of the file like in
+
+ install ipojo:bundle_url!metadata_url
+
+
+If you provide such url, it will override the contained `metadata.xml` file.
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-pagemenu.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-pagemenu.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-pagemenu.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-pagemenu.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,4 @@
+Title: apache-felix-ipojo-pagemenu
+
+{children:all=true|page=Apache Felix iPOJO}
+
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-successstories.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-successstories.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-successstories.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-successstories.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,70 @@
+Title: apache-felix-ipojo-successstories
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+
+# iPOJO Success Stories
+*On this page, you will find comments from industrial users of iPOJO. They come from different domains such as home gateways, mobile phones, or enterprise applications.*
+
+
+{quote}
+Over 90% of processors are now used for embedded applications. At Schneider Electric we believe that java is a fantastic opportunity to develop some of our applications faster and better. OSGi is an excellent way to ensure that developed java software comes with built-in best practices such as reusability, high cohesion, loose coupling, high flexibility and dynamism.But we definitely don't want our anticipation teams to spend more time on OSGi mechanisms than on Energy Management, our core business! iPOJO helps us to develop quickly, by making developing modules as simple as writing plain old java. We also use it for our open source OSGi DPWS Base Driver ('SOA for devices' forge, http://forge.soa4d.org/). And it's not just about us: partners of the SOA4D forge are using it, too.
+
+ *Sylvain Marie, Software Architect, Schneider Electric*
+{quote}
+
+
+
+{quote}
+Ubiquitous Multi-player games are one of next trends of mobile games. This type of games offers new experience: users interact with the real world and with the virtual world at the same time! So, player actions such as moves, interactions with smart objects or others players impact the virtual part of the game. The state of the virtual games also impacts the possibilities in the physical part of the games.
+Creating this kind of games requires managing several types of technologies such as embedded devices (mobile phones, PDA, sensors...), smart objects (RFID, environmental sensors...) and network connectivity (GSM, Edge, 3G, Wifi, Bluetooth...). uGasp (Ubiquitous Gaming Services Platform) is a middleware used to execute ubiquitous multi-player games. It provides an abstraction layer hiding the inherent complexity of such games. uGasp is a major evolution of the Gasp framework using a monolithic stack not suitable to embedded devices. To tackle this issue, we adopted a dynamic, modular, extensible and configurable architecture. But in order to speed up the development, uGasp is based on a service -oriented component model offering all the features "for free" and simplifying the development of dynamic applications. uGasp is based on
+Apache Felix and iPOJO. We chose iPOJO for several reasons:
+* iPOJO drastically simplifies the development of OSGi-based applications. The intuitive XML description is really simple to use even for a novice developer.
+* iPOJO allows reusing a lot of object-oriented code thanks to the field injection. So, migrating GASP to uGASP takes only three weeks!
+* The factory principles offered by iPOJO allows creating several games instance at the same time.
+* Finally, the isolation characteristic was a critical requirement in the uGasp middleware. Moreover, for the developer point of view, this is completely hidden.
+
+To get more info about uGasp, visit our [web site](http://gasp.objectweb.org/ubiquitous-osgi-middleware.html) or contact [Ubidreams|http://www.ubidreams.com].
+
+ *Romain Pellerin, Ubidreams CEO*
+{quote}
+
+
+{quote}
+JOnAS is a Java EE server developed inside the OW2 consortium. It embraces the new trend of modular and dynamic application servers and aims at implementing the entire Java EE specification by re-using third-part components. JOnAS also focuses on providing a great flexibility for the developer, for the administrator and for clustering.
+
+To enable this flexibility and dynamism in the application server components' integration, the JOnAS team chose to rely on an OSGi runtime. However, it quickly appeared that any manual management of the dynamism would be too expensive: not only very few programmers understand the complexity of the dynamism, but also manual maintaining is extremely difficult and error-prone. That's why JOnAS uses a service-oriented component model.
+
+We first chose iPOJO because this technology sounded really promising. Moreover, iPOJO is able to evolve against new requirements, thanks to the handler-based extensibility model it promotes.
+
+In the JOnAS application server all the technical services are implemented by iPOJO components. Thanks to this framework, they are pluggable and upgradeable on-demand. As iPOJO reduces drastically the impact on the code, we have reused the high majority of our code and the migration from the former JOnAS to this one has been surprisingly quick. The JOnAS team is very happy with iPOJO, and will go on using, promoting and improving it.
+
+If you want more info on [JOnAS visit our website](http://wiki.jonas.objectweb.org/xwiki/bin/view/Main/WebHome).
+
+ *Guillaume Sauthier, JOnAS Application Server Developer*
+{quote}
+
+
+
+
+
+
+<div class="box">
+ <div class="box-blue-header">
+ <div class="box-blue-title">
+ <img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Are you also using iPOJO ?</b>
+ </div>
+ </div>
+ <div class="box-blue-content">
+You are using iPOJO, and you want to be listed there to tell how you are using iPOJO. Feel free to send us <a href="mailto:clement@apache.org">a mail</a> with your story.
+ </div>
+ <div class="box-blue-footer"></div>
+</div>
+
+
+
+
+
+{include:apache-felix-ipojo-footer}
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedosgi.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedosgi.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedosgi.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedosgi.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,42 @@
+Title: apache-felix-ipojo-supportedOSGi
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# Supported OSGi Implementations
+
+*Despite iPOJO is an Apache Felix subproject, it relies only on *OSGi R4* features. So, it is possible to use it on others OSGi implementations.*
+
+{center}
+|Features| Apache Felix | Eclipse Equinox | Knoplerfish |
+|--|--|--|--|
+|Core|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Composites|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Configuration Admin|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Temporal Dependency|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Whiteboard pattern handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Extender pattern handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|Event Admin handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!
+|JMX handler (requires Java 5+)|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+{center}
+
+Feel free to send a mail on the Felix mailing list, if an implementation is not listed here.
+
+----
+
+<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr>
+<td valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td>
+<td>
+<b class="strong">Note about Knopflerfish</b><br/>
+<p>Old version of Knopflerfish does not allow getting a service during its unregistration. To enable this feature, launch the Knopflerfish framework with the
+<em>-Dorg.knopflerfish.servicereference.valid.during.unregistering=true</em> property. You can add this property in the <em>props.xargs</em> file</p>
+<p>Recent version of KF does no more require this property.</p>
+</td>
+</tr></table>
+
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedvms.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedvms.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedvms.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-supportedvms.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,46 @@
+Title: apache-felix-ipojo-supportedVMs
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# Supported Java Virtual Machines
+
+|Features| Sun JVM
+|--|
+(1.3, 1.4) || Sun JVM
+(5, 6) || Apache Harmony || JamVM || IBM J9 || BEA JRockit
+ (1.4) || BEA JRockit
+(1.5,1.6) || Mika || Dalvik (Android)
+|Core|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!yellow.gif|align=center!|
+|Composites|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!yellow.gif|align=center!|
+|Configuration Admin|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+|Temporal Dependency|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+|Whiteboard pattern handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+|Extender pattern handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+|Event Admin handler|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|!green.gif|align=center!|
+
+Feel free to send a mail on the Felix mailing list if a JVM is not listed here.
+
+----
+
+<div class="info" markdown="1">
+**Note about Android**
+iPOJO is supported on Android except for two features:
+* Nullable are not supported (Default-Implementations are supported)
+* Composites cannot provide services (but they can export services)
+
+These two limitations comes from the Android VM (Dalvik) that does not support the definition of new classes at runtime (i.e. dynamically generated classes).
+</div>
+
+<div class="info" markdown="1">
+**Note about Android**
+iPOJO 1.6+ uses smart proxy by default. On Android this is not supported, however, you can disable the proxies with:
+`proxy="false"` in the service requirements.
+</div>
+
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-testing-components.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-testing-components.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-testing-components.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-testing-components.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,92 @@
+Title: apache-felix-ipojo-testing-components
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# How to test iPOJO Components
+Testing components is a required step in the application development process. This page explains strategies to test iPOJO-based components and applications.
+
+## Introduction
+Basically, we can distinguish 2 types of tests:
+* Unitary tests
+* Integration tests
+
+Unitary tests are famous and were popularized with the proliferation of frameworks like [Junit](http://junit.org) and [TestNG|http://testng.org/doc/]. These tests check the behavior of classes. More specially, these tests check the method results according to different parameter values. These test are executed outside the execution environment, can use mock object (link) to replace/simulate missing dependencies...
+
+Integration tests focus on the execution of the application inside the execution environment. It checks the global behavior of a service or an application. In the case of iPOJO, those tests are executed on OSGi. Some dependencies can be also replaced by mock services/objects.
+
+## Executing unitary tests on iPOJO components
+Unitary tests allow checking the internal behavior of an iPOJO component. Those tests ignore the injected dependencies and focus only on the business code of the component.
+To test components, you can use Junit. A special constructor setting fields can do the dependency injection. These tests are executed before the bundlelization.
+
+Let's imagine a maven project (downloadable [here]({{ refs.-dummy-component-zip.path }})). Unitary tests are placed in the src/test/java folder. You can use mock object as illustrated in the example. When you launch the `mvn clean install` command, maven compiles your classes and executes the tests. If the tests are executed successfully, the build process continues and creates the bundle as follows:
+
+ [INFO] Scanning for projects...
+ [INFO] ------------------------------------------------------------------------
+ [INFO] Building Dummy Component
+ [INFO] task-segment: [clean, install]
+ [INFO] ------------------------------------------------------------------------
+ [INFO] [clean:clean]
+ [INFO] Deleting directory /Users/clement/Documents/workspaces/ipojo-dev/UnitaryTest/target
+ [INFO] [resources:resources]
+ [INFO] Using default encoding to copy filtered resources.
+ [INFO] [compiler:compile]
+ [INFO] Compiling 1 source file to /Users/clement/Documents/
+ workspaces/ipojo-dev/UnitaryTest/target/classes
+ [INFO] [resources:testResources]
+ [INFO] Using default encoding to copy filtered resources.
+ [INFO] [compiler:testCompile]
+ [INFO] Compiling 1 source file to /Users/clement/Documents/
+ workspaces/ipojo-dev/UnitaryTest/target/test-classes
+ [INFO] [surefire:test]
+ [INFO] Surefire report directory: /Users/clement/Documents/
+ workspaces/ipojo-dev/UnitaryTest/target/surefire-reports
+
+ -------------------------------------------------------
+ T E S T S
+ -------------------------------------------------------
+ Running org.apache.felix.ipojo.ut.component.test.MyTestCase
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 sec
+
+ Results :
+
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+ [INFO] [bundle:bundle]
+ [INFO] [ipojo:ipojo-bundle {execution: default}]
+ [INFO] Start bundle manipulation
+ [INFO] Metadata file : /Users/clement/Documents/
+ workspaces/ipojo-dev/UnitaryTest/target/classes/metadata.xml
+ [INFO] Input Bundle File : /Users/clement/Documents/workspaces/
+ ipojo-dev/UnitaryTest/target/org.apache.felix.ipojo.test.dummy.component-1.1.0-SNAPSHOT.jar
+ [INFO] Bundle manipulation - SUCCESS
+ [INFO] [install:install]
+ [INFO] Installing /Users/clement/Documents/workspaces/
+ ipojo-dev/UnitaryTest/target/org.apache.felix.ipojo.test.dummy.component-1.1.0-SNAPSHOT.jar
+ to /Users/clement/.m2/repository/ipojo/tests/org.apache.felix.ipojo.test.dummy.component/1.1.0-SNAPSHOT
+ /org.apache.felix.ipojo.test.dummy.component-1.1.0-SNAPSHOT.jar
+ [INFO] [bundle:install]
+ [INFO] Parsing file:/Users/clement/.m2/repository/repository.xml
+ [INFO] Installing ipojo/tests/org.apache.felix.ipojo.test.dummy.component/
+ 1.1.0-SNAPSHOT/org.apache.felix.ipojo.test.dummy.component-1.1.0-SNAPSHOT.jar
+ [INFO] Writing OBR metadata
+ [INFO] ------------------------------------------------------------------------
+ [INFO] BUILD SUCCESSFUL
+ [INFO] ------------------------------------------------------------------------
+ [INFO] Total time: 6 seconds
+ [INFO] Finished at: Tue Oct 21 14:03:03 CEST 2008
+ [INFO] Final Memory: 11M/25M
+ [INFO] ------------------------------------------------------------------------
+
+
+## Executing integration tests
+Once every component has its unitary test suite (isn't it?), you can go further and creates integration test. In order to check the behavior of the system, iPOJO provides the junit4osgi framework. This framework allows the executing of Junit test inside OSGi. Refer to the [Junit4OSGi page]({{ refs.apache-felix-ipojo-junit4osgi.path }}) to know how to use it.
+
+Moreover, OPS4J Pax Exam can also be used to test iPOJO components.
+
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,13 @@
+Title: apache-felix-ipojo-tools
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+# iPOJO Tools
+
+This page contains the list of provided tools helping the development of iPOJO applications:
+{children}
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file
Added: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-ant-task.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-ant-task.mdtext?rev=1421893&view=auto
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-ant-task.mdtext (added)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-ant-task.mdtext Fri Dec 14 14:29:22 2012
@@ -0,0 +1,132 @@
+Title: iPOJO Ant Task
+
+{include:apache-felix-ipojo-header}
+
+<div class="content">
+
+
+# iPOJO Ant Task
+
+*iPOJO Ant Task allows automating the iPOJO manipulation process within an Ant build process. This page explains how to use the iPOJO Ant Task and how to combine them with the BND Tasks.*
+
+{div:class=toc}
+[TOC]
+{div}
+
+## Downloading the iPOJO Ant Task
+
+The iPOJO Ant Task can ben downloaded from [here]({{ refs.download.path }}).
+
+## How to use the Ant Task
+
+The iPOJO Ant task take an input bundle and a metadata file and create the final (i.e. manipulated) bundle.
+To use the task declare a target in your build.xml as:
+{div:class=pom}
+<target name="main">
+ {color:red}<!-- Change the path to point on the iPOJO Ant task jar-->{color}
+ <taskdef name="ipojo"
+ classname="org.apache.felix.ipojo.task.IPojoTask"
+ {color:red}classpath="org.apache.felix.ipojo.ant-1.6.0.jar"{color}/>
+
+ <ipojo
+ input="foo.jar"
+ metadata = "meta.xml"
+ />
+</target>
+{div}
+First, define the new task. Then simply use it. The input argument describe the input bundle (must exists) and the metadata argument describes the metadata file (must exist too). The input bundle must be a well-formed bundle.
+
+## Ant Task Arguments
+
+The iPOJO Ant Task as three different arguments:
+* Input: describes the input bundle. This argument is mandatory.
+* Output: describes the output bundle. This argument is optional. If not present, the output file will be input file.
+* Metadata: describes the metadata file. This argument is optional. By default, it tries with a metadata.xml file (in the same directory as the build.xml file). If the default file is not present, it tries to use only iPOJO annotations.
+* IgnoreAnnotations: if set to `true`, the manipulator skips annotations processing (can reduce significantly the processing time on huge bundle).
+* IgnoreEmbeddedSchemas: if set to `true`, the manipulator doesn't use embedded XML-Schemas
+
+## Combining the iPOJO Ant Task and BND
+
+The iPOJO Ant Task requires an input bundle. BND is a tools simplifying bundle creation. So, it is possible to combine the two tools to create your bundle automatically. The following build.xml shows you an example of combination.
+{div:class=pom}
+<project default="main" basedir=".">
+ <target name="bnd">
+ {color:red}<!-- Change to use the latest BND version --{color}{color:red}>{color}
+ <taskdef resource="aQute/bnd/ant/taskdef.properties"
+ {color:red}classpath="bnd-0.0.178.jar"{color}/>
+ <bnd
+ classpath="src"
+ eclipse="true"
+ failok="false"
+ exceptions="true"
+ {color:red}files="foo.bnd"{color}/>
+ </target>
+
+ <target name="main" depends="bnd">
+ <echo message="Call main"/>
+ {color:red}<!-- Change the path to point on the iPOJO Ant task jar -->{color}
+ <taskdef name="ipojo"
+ classname="org.apache.felix.ipojo.task.IPojoTask"
+ {color:red}classpath="org.apache.felix.ipojo.ant-1.6.0.jar"{color} />
+ <ipojo
+ {color:red}input="foo.jar"{color}
+ metadata = "meta.xml"
+ />
+ </target>
+</project>
+{div}
+The first target creates the bundle with BND. More details on the BND Ant Task are available here. To combine the BND output and the iPOJO input, the iPOJO input need to be the same as the BND file but with the ".jar" extension. For instance, the BND file is foo.bnd, so the input jar must be foo.jar.
+To be sure that the BND bundle is already created, you can add the "*depends*" clause in the target using the iPOJO task to the target creating the bundle.
+
+However, it is possible to create only one target doing the two operations as:
+{div:class=pom}
+<target name="main">
+ {color:red}<!-- Change to use the latest BND version -->{color}
+ <taskdef
+ resource="aQute/bnd/ant/taskdef.properties"
+ {color:red}classpath="bnd-0.0.178.jar"/>{color}
+
+ {color:red}<!-- Change the path to point on the iPOJO Ant task jar -->{color}
+ <taskdef name="ipojo"
+ classname="org.apache.felix.ipojo.task.IPojoTask"
+ {color:red}classpath="org.apache.felix.ipojo.ant-1.6.0.jar"{color}/>
+
+ <bnd
+ classpath="src"
+ eclipse="true"
+ failok="false"
+ exceptions="true"
+ files="{color:red}foo.bnd{color}"/>
+
+ <ipojo
+ input="{color:red}foo.jar{color}"
+ metadata = "meta.xml"/>
+</target>
+{div}
+
+## Directory manipulation
+
+The manipulator can take a directory in input. In this case, classes from this folder is manipulated. You can also set the manifest file location too. Here in an example of configuration using this mode:
+
+ <target name="manipulate">
+ <ipojo
+ dir="${output..}" <!-- Manipulated directory -->
+ metadata="metadata.xml"
+ manifest="META-INF/MANIFEST.MF" <!-- Manifest location -->
+ />
+ </target>
+
+
+<div class="info" markdown="1">
+**Manifest location**
+If not set, the manifest is searched in the given `directory/META-INF` folder (*i.e.* `$dir/META-INF/MANIFEST.MF`).
+</div>
+
+## Conclusion
+
+Subscribe to the Felix users mailing list by sending a message to [mailto:users-subscribe@felix.apache.org]({{ refs.mailto-users-subscribe-felix-apache-org.path }}); after subscribing, email questions or feedback to [mailto:users@felix.apache.org].
+
+
+
+
+{include:apache-felix-ipojo-footer}
\ No newline at end of file