Fix issue Felix-828
The JMX Handler name attribute creates correctly the name part of the MBean objectname.

Fix issue Felix-829
The JMX Handler property and method sub-elements should use the JMX handler namespace to be compliant with the XML Schema.

Fix issue Felix-830
Simplify the custom annotation processing to avoid using id/parent attributes.

Fix issue Felix-825
Provide annotations for the JMX handler

Update pom files to use the RAT plugin (allowing to automatically check missing license)
Update pom files to use the Checkstyle plugin (check automatically code format)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@719260 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/composite/composite-runtime/pom.xml b/ipojo/tests/composite/composite-runtime/pom.xml
index a74ffb4..d2e2c92 100644
--- a/ipojo/tests/composite/composite-runtime/pom.xml
+++ b/ipojo/tests/composite/composite-runtime/pom.xml
@@ -42,7 +42,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/composite/import-export/pom.xml b/ipojo/tests/composite/import-export/pom.xml
index a009a68..71b7cca 100644
--- a/ipojo/tests/composite/import-export/pom.xml
+++ b/ipojo/tests/composite/import-export/pom.xml
@@ -42,7 +42,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/composite/service-instance/pom.xml b/ipojo/tests/composite/service-instance/pom.xml
index 89c42da..3961b5c 100644
--- a/ipojo/tests/composite/service-instance/pom.xml
+++ b/ipojo/tests/composite/service-instance/pom.xml
@@ -42,7 +42,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/composite/service-providing/pom.xml b/ipojo/tests/composite/service-providing/pom.xml
index 8cb40a4..ea5343b 100644
--- a/ipojo/tests/composite/service-providing/pom.xml
+++ b/ipojo/tests/composite/service-providing/pom.xml
@@ -42,7 +42,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/annotations/pom.xml b/ipojo/tests/core/annotations/pom.xml
index 911f031..92151fd 100644
--- a/ipojo/tests/core/annotations/pom.xml
+++ b/ipojo/tests/core/annotations/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
index 5b58924..edea2a5 100644
--- a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
@@ -43,6 +43,7 @@
         

         // External handler annotations

         ots.addTestSuite(TemporalDependencies.class);

+        ots.addTestSuite(JMX.class);

         return ots;

     }

 

diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/JMX.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/JMX.java
new file mode 100644
index 0000000..7714d3b
--- /dev/null
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/JMX.java
@@ -0,0 +1,14 @@
+package org.apache.felix.ipojo.test.scenarios.annotations;
+
+import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+import org.apache.felix.ipojo.metadata.Element;
+import org.apache.felix.ipojo.test.scenarios.util.Utils;
+
+public class JMX extends OSGiTestCase {
+    
+    public void testSimple() {
+        Element meta = Utils.getMetatadata(context, "org.apache.felix.ipojo.test.scenarios.component.jmx.JMXSimple");
+        System.out.println("meta: " + meta);
+    }
+
+}
diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/jmx/JMXSimple.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/jmx/JMXSimple.java
new file mode 100644
index 0000000..54cbbe7
--- /dev/null
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/jmx/JMXSimple.java
@@ -0,0 +1,25 @@
+package org.apache.felix.ipojo.test.scenarios.component.jmx;
+
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.handlers.jmx.Config;
+import org.apache.felix.ipojo.handlers.jmx.Method;
+import org.apache.felix.ipojo.handlers.jmx.Property;
+
+@Component
+@Config(domain="my-domain", usesMOSGi=false)
+public class JMXSimple {
+
+    @Property(name="prop", notification=true, rights="w")
+    String m_foo;
+    
+    @Method(description="set the foo prop")
+    public void setFoo(String mes) {
+        System.out.println("Set foo to " + mes);
+        m_foo = mes;
+    }
+    
+    @Method(description="get the foo prop")
+    public String getFoo() {
+        return m_foo;
+    }
+}
diff --git a/ipojo/tests/core/bad-configurations/pom.xml b/ipojo/tests/core/bad-configurations/pom.xml
index 41c8fc4..06dcf85 100644
--- a/ipojo/tests/core/bad-configurations/pom.xml
+++ b/ipojo/tests/core/bad-configurations/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/configadmin/pom.xml b/ipojo/tests/core/configadmin/pom.xml
index 9a74801..26ef7c7 100644
--- a/ipojo/tests/core/configadmin/pom.xml
+++ b/ipojo/tests/core/configadmin/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/configuration/pom.xml b/ipojo/tests/core/configuration/pom.xml
index 2f9b6d8..10044c2 100644
--- a/ipojo/tests/core/configuration/pom.xml
+++ b/ipojo/tests/core/configuration/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/external-handlers/pom.xml b/ipojo/tests/core/external-handlers/pom.xml
index 8ae8e35..85140ca 100644
--- a/ipojo/tests/core/external-handlers/pom.xml
+++ b/ipojo/tests/core/external-handlers/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/factories/pom.xml b/ipojo/tests/core/factories/pom.xml
index 892b3c9..6766a34 100644
--- a/ipojo/tests/core/factories/pom.xml
+++ b/ipojo/tests/core/factories/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/lifecycle-callback/pom.xml b/ipojo/tests/core/lifecycle-callback/pom.xml
index d788add..349b700 100644
--- a/ipojo/tests/core/lifecycle-callback/pom.xml
+++ b/ipojo/tests/core/lifecycle-callback/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/lifecycle-controller/pom.xml b/ipojo/tests/core/lifecycle-controller/pom.xml
index b2f7e62..86a0419 100644
--- a/ipojo/tests/core/lifecycle-controller/pom.xml
+++ b/ipojo/tests/core/lifecycle-controller/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/service-dependency-bindingpolicy/pom.xml b/ipojo/tests/core/service-dependency-bindingpolicy/pom.xml
index 5de12d3..add922a 100644
--- a/ipojo/tests/core/service-dependency-bindingpolicy/pom.xml
+++ b/ipojo/tests/core/service-dependency-bindingpolicy/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/service-dependency-comparator/pom.xml b/ipojo/tests/core/service-dependency-comparator/pom.xml
index 56ab721..4d13407 100644
--- a/ipojo/tests/core/service-dependency-comparator/pom.xml
+++ b/ipojo/tests/core/service-dependency-comparator/pom.xml
@@ -19,8 +19,8 @@
 <project>

 	<modelVersion>4.0.0</modelVersion>

 	<packaging>bundle</packaging>

-	<name>iPOJO Service Dependency (Binding Policy) Test Suite</name>

-	<artifactId>tests.core.service.dependency.bindingpolicy</artifactId>

+	<name>iPOJO Service Dependency Comparator Test Suite</name>

+	<artifactId>tests.core.service.dependency.comparator</artifactId>

 	<groupId>ipojo.tests</groupId>

 	<version>1.1.0-SNAPSHOT</version>

 	<dependencies>

@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

@@ -68,7 +68,8 @@
 							${pom.artifactId}

 						</Bundle-SymbolicName>

 						<Private-Package>

-							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator

+							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator,

+							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator.component

 						</Private-Package>

 						<Test-Suite>

 							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator.ComparatorTestCase						

diff --git a/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/ComparatorTestCase.java b/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/ComparatorTestCase.java
index 6cde37c..c58acf3 100644
--- a/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/ComparatorTestCase.java
+++ b/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/ComparatorTestCase.java
@@ -26,7 +26,7 @@
     }
     
     public void tearDown() {
-        dynInstance.dispose();
+       dynInstance.dispose();
        dpInstance.dispose();
     }
     
@@ -46,6 +46,8 @@
         assertEquals("fs grade -1", 2, fsGrade);
         assertEquals("fs2 grade -1", 2, fs2Grade);
         assertEquals("fss grade size -1", 2, fssGrades.length);
+        
+
         assertEquals("fss grade[0] -1", 2, fssGrades[0]);
         assertEquals("fss grade[1] -1", 1, fssGrades[1]);
         
diff --git a/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/component/CheckServiceProvider.java b/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/component/CheckServiceProvider.java
index 0ce96ff..9881e1f 100644
--- a/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/component/CheckServiceProvider.java
+++ b/ipojo/tests/core/service-dependency-comparator/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/comparator/component/CheckServiceProvider.java
@@ -42,6 +42,11 @@
 		props.put("fs2", new Integer(fs2.getInt()));

 		

 		int[] grades = new int[fss.length];

+		

+		for (int i = 0; i < grades.length; i++) {

+            grades[i] = fss[i].getInt();

+        }

+		

 		props.put("fss", grades);

 		

 		return props;

diff --git a/ipojo/tests/core/service-dependency-filter/pom.xml b/ipojo/tests/core/service-dependency-filter/pom.xml
index d5c9654..49db1d6 100644
--- a/ipojo/tests/core/service-dependency-filter/pom.xml
+++ b/ipojo/tests/core/service-dependency-filter/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/service-dependency/pom.xml b/ipojo/tests/core/service-dependency/pom.xml
index e870c5b..f8490b5 100644
--- a/ipojo/tests/core/service-dependency/pom.xml
+++ b/ipojo/tests/core/service-dependency/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/core/service-providing/pom.xml b/ipojo/tests/core/service-providing/pom.xml
index d4fbf38..cfda6a9 100644
--- a/ipojo/tests/core/service-providing/pom.xml
+++ b/ipojo/tests/core/service-providing/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/handler/eventadmin/pom.xml b/ipojo/tests/handler/eventadmin/pom.xml
index 7a10a31..a1fecaa 100644
--- a/ipojo/tests/handler/eventadmin/pom.xml
+++ b/ipojo/tests/handler/eventadmin/pom.xml
@@ -17,7 +17,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>org.apache.felix</groupId>

diff --git a/ipojo/tests/handler/temporal/pom.xml b/ipojo/tests/handler/temporal/pom.xml
index 20d7df0..54fe662 100644
--- a/ipojo/tests/handler/temporal/pom.xml
+++ b/ipojo/tests/handler/temporal/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/handler/whiteboard/pom.xml b/ipojo/tests/handler/whiteboard/pom.xml
index cd91d49..15970c8 100644
--- a/ipojo/tests/handler/whiteboard/pom.xml
+++ b/ipojo/tests/handler/whiteboard/pom.xml
@@ -14,7 +14,7 @@
 	<dependency>

 		<groupId>org.apache.felix</groupId>

 		<artifactId>org.osgi.core</artifactId>

-		<version>1.2.0</version>

+		<version>1.0.1</version>

 	</dependency>

     <dependency>

       <groupId>junit</groupId>

diff --git a/ipojo/tests/manipulator/creation/pom.xml b/ipojo/tests/manipulator/creation/pom.xml
index f83a988..c8dc414 100644
--- a/ipojo/tests/manipulator/creation/pom.xml
+++ b/ipojo/tests/manipulator/creation/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/manipulator/manipulation/pom.xml b/ipojo/tests/manipulator/manipulation/pom.xml
index c4f3f6b..0661202 100644
--- a/ipojo/tests/manipulator/manipulation/pom.xml
+++ b/ipojo/tests/manipulator/manipulation/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/manipulator/manipulator-java5/pom.xml b/ipojo/tests/manipulator/manipulator-java5/pom.xml
index e526cd6..71c90c5 100644
--- a/ipojo/tests/manipulator/manipulator-java5/pom.xml
+++ b/ipojo/tests/manipulator/manipulator-java5/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/manipulator/metadata/pom.xml b/ipojo/tests/manipulator/metadata/pom.xml
index 643c845..64d53d7 100644
--- a/ipojo/tests/manipulator/metadata/pom.xml
+++ b/ipojo/tests/manipulator/metadata/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>

diff --git a/ipojo/tests/manipulator/primitives/pom.xml b/ipojo/tests/manipulator/primitives/pom.xml
index f83df54..c0d4ad9 100644
--- a/ipojo/tests/manipulator/primitives/pom.xml
+++ b/ipojo/tests/manipulator/primitives/pom.xml
@@ -37,7 +37,7 @@
 		<dependency>

 			<groupId>org.apache.felix</groupId>

 			<artifactId>org.osgi.core</artifactId>

-			<version>1.2.0</version>

+			<version>1.0.1</version>

 		</dependency>

 		<dependency>

 			<groupId>junit</groupId>