Commit the new iPOJO version (0.7.6).

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@642265 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/plugin/pom.xml b/ipojo/plugin/pom.xml
index 39e44c6..3f5c569 100644
--- a/ipojo/plugin/pom.xml
+++ b/ipojo/plugin/pom.xml
@@ -1,68 +1,68 @@
 <!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License.  You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied.  See the License for the
+	specific language governing permissions and limitations
+	under the License.
 -->
 <project>
-  <parent>
-    <artifactId>felix</artifactId>
-    <groupId>org.apache.felix</groupId>
-    <version>1.0.2</version>
-    <relativePath>../../pom/pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>maven-ipojo-plugin</artifactId>
-  <version>0.7.5-SNAPSHOT</version>
-  <name>Apache Felix iPOJO Maven Plugin</name>
-  <packaging>maven-plugin</packaging>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-archiver</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-artifact</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <version>2.4.0</version>
-    </dependency>
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>org.apache.felix.ipojo.metadata</artifactId>
-      <version>0.7.5-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
-      <version>0.7.5-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
+	<parent>
+		<artifactId>iPOJO</artifactId>
+		<groupId>org.apache.felix</groupId>
+		<version>0.7.6-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>maven-ipojo-plugin</artifactId>
+	<name>Apache Felix iPOJO Maven Plugin</name>
+	<packaging>maven-plugin</packaging>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+			<version>2.0</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-archiver</artifactId>
+			<version>2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.plexus</groupId>
+			<artifactId>plexus-utils</artifactId>
+			<version>1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-artifact</artifactId>
+			<version>2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.4.0</version>
+		</dependency>
+		<dependency>
+			<groupId>${pom.groupId}</groupId>
+			<artifactId>org.apache.felix.ipojo.metadata</artifactId>
+			<version>${pom.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${pom.groupId}</groupId>
+			<artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+			<version>${pom.version}</version>
+		</dependency>
+	</dependencies>
 </project>
diff --git a/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java b/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
index 474eb75..a7391e1 100644
--- a/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
+++ b/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
@@ -1,4 +1,4 @@
-/*

+/* 

  * Licensed to the Apache Software Foundation (ASF) under one

  * or more contributor license agreements.  See the NOTICE file

  * distributed with this work for additional information

@@ -25,7 +25,6 @@
 import org.apache.felix.ipojo.manipulator.Pojoization;

 import org.apache.maven.plugin.AbstractMojo;

 import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.plugin.MojoFailureException;

 import org.apache.maven.project.MavenProject;

 import org.apache.maven.project.MavenProjectHelper;

 

@@ -113,11 +112,10 @@
 

     /**

      * Execute method : launch the pojoization.

-     * @throws MojoExecutionException : an exception occurs.

-     * @throws MojoFailureException : an failure occurs.

+     * @throws MojoExecutionException : an exception occurs during the manipulation.

      * @see org.apache.maven.plugin.AbstractMojo#execute()

      */

-    public void execute() throws MojoExecutionException, MojoFailureException {

+    public void execute() throws MojoExecutionException {

         // ignore project types not supported, useful when the plugin is configured in the parent pom

         if (!this.m_supportedProjectTypes.contains(this.getProject().getArtifact().getType())) {

             this.getLog().debug("Ignoring project " + this.getProject().getArtifact() + " : type " + this.getProject().getArtifact().getType() + " is not supported by ipojo plugin, supported types are " + this.m_supportedProjectTypes);

@@ -126,7 +124,15 @@
 

         getLog().info("Start bundle manipulation");

         // Get metadata file

+        

+        // Look for the metadata file in the output directory

         File meta = new File(m_outputDirectory + File.separator + m_metadata);

+        

+        // If not found look inside the pom directory

+        if (! meta.exists()) {

+            meta = new File(m_project.getBasedir() + File.separator + m_metadata);

+        }

+        

         getLog().info("Metadata File : " + meta.getAbsolutePath());

         if (!meta.exists()) {

             // Verify if annotations are ignored

diff --git a/ipojo/plugin/src/main/resources/archetype-resources/src/main/resources/metadata.xml b/ipojo/plugin/src/main/resources/archetype-resources/src/main/resources/metadata.xml
index a3d0839..cccd90d 100644
--- a/ipojo/plugin/src/main/resources/archetype-resources/src/main/resources/metadata.xml
+++ b/ipojo/plugin/src/main/resources/archetype-resources/src/main/resources/metadata.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<iPOJO>
-	<component className="$YOUR_COMPONENT_CLASS">
-   
-	</component>
-	<instance component="$YOUR_COMPONENT_CLASS"/>
+<?xml version="1.0" encoding="UTF-8"?>

+<iPOJO>

+	<component className="$YOUR_COMPONENT_CLASS">

+   

+	</component>

+	<instance component="$YOUR_COMPONENT_CLASS"/>

 </iPOJO>
\ No newline at end of file