Add missing OSGI manifests and use dependencyManagement to achieve convergence

git-svn-id: https://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-autotag@1310864 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index bcfdd3d..c9d1c48 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,6 +67,52 @@
             <url>scp://people.apache.org/www/tiles.apache.org/tiles-autotag</url>
         </site>
     </distributionManagement>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.7</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.thoughtworks.qdox</groupId>
+                <artifactId>qdox</artifactId>
+                <version>1.10.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-request-api</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.easymock</groupId>
+                <artifactId>easymock</artifactId>
+                <version>3.0</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-autotag-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-autotag-core-runtime</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity</artifactId>
+                <version>1.6.3</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>2.0</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     <profiles>
         <profile>
             <id>apache-release</id>
diff --git a/tiles-autotag-core-runtime/pom.xml b/tiles-autotag-core-runtime/pom.xml
index 1bf492d..93a45c3 100644
--- a/tiles-autotag-core-runtime/pom.xml
+++ b/tiles-autotag-core-runtime/pom.xml
@@ -31,22 +31,99 @@
   <version>1.0-SNAPSHOT</version>
   <name>Autotag - Core runtime</name>
   <description>Autotag: runtime core classes.</description>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${tiles.manifestfile}</manifestFile>
+                            <manifest>
+                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                            </manifest>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>2.3.7</version>
+                    <inherited>true</inherited>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <excludeDependencies>true</excludeDependencies>
+                    <manifestLocation>target/osgi</manifestLocation>
+                    <instructions>
+                        <_nouses>true</_nouses>
+                        <Bundle-SymbolicName>${tiles.osgi.symbolicName}</Bundle-SymbolicName>
+                        <Export-Package>${tiles.osgi.export}</Export-Package>
+                        <Private-Package>${tiles.osgi.private}</Private-Package>
+                        <Import-Package>${tiles.osgi.import}</Import-Package>
+                        <DynamicImport-Package>${tiles.osgi.dynamicImport}</DynamicImport-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                        <Specification-Title>${project.name}</Specification-Title>
+                        <Specification-Version>${project.version}</Specification-Version>
+                        <Specification-Vendor>${project.organization.name}</Specification-Vendor>
+                        <Implementation-Title>${project.name}</Implementation-Title>
+                        <Implementation-Version>${project.version}</Implementation-Version>
+                        <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+                        <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <releaseProfiles>apache-release</releaseProfiles><!-- xxx tiles still uses "release" instead of "apache-release" -->
+                    <goals>deploy site-deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <defaultGoal>install</defaultGoal>
+    </build>
+
+    <properties>
+        <tiles.osgi.symbolicName>org.apache.${project.artifactId}</tiles.osgi.symbolicName>
+        <tiles.osgi.export>org.apache.tiles.*;version=${project.version}</tiles.osgi.export>
+        <tiles.osgi.import>*</tiles.osgi.import>
+        <tiles.osgi.dynamicImport />
+        <tiles.osgi.private />
+        <tiles.manifestfile>target/osgi/MANIFEST.MF</tiles.manifestfile>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
   <dependencies>
       <dependency>
           <groupId>org.apache.tiles</groupId>
           <artifactId>tiles-request-api</artifactId>
-          <version>1.0-SNAPSHOT</version>
       </dependency>
       <dependency>
       	<groupId>junit</groupId>
       	<artifactId>junit</artifactId>
-      	<version>4.7</version>
       	<scope>test</scope>
       </dependency>
       <dependency>
       	<groupId>org.easymock</groupId>
       	<artifactId>easymock</artifactId>
-      	<version>3.0</version>
       	<scope>test</scope>
       </dependency>
   </dependencies>
diff --git a/tiles-autotag-core/pom.xml b/tiles-autotag-core/pom.xml
index 51897e5..b9fe1ed 100644
--- a/tiles-autotag-core/pom.xml
+++ b/tiles-autotag-core/pom.xml
@@ -51,40 +51,32 @@
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
-			<version>4.7</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>com.thoughtworks.qdox</groupId>
 			<artifactId>qdox</artifactId>
-			<version>1.10.1</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.tiles</groupId>
 			<artifactId>tiles-request-api</artifactId>
-			<version>1.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>org.easymock</groupId>
 			<artifactId>easymock</artifactId>
-			<version>3.0</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.tiles</groupId>
 			<artifactId>tiles-autotag-core-runtime</artifactId>
-			<version>1.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.velocity</groupId>
 			<artifactId>velocity</artifactId>
-			<version>1.6.3</version>
 		</dependency>
 		<dependency>
 			<groupId>commons-io</groupId>
 			<artifactId>commons-io</artifactId>
-			<version>2.0</version>
-			<type>jar</type>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>
diff --git a/tiles-autotag-freemarker/pom.xml b/tiles-autotag-freemarker/pom.xml
index ec40100..481c718 100644
--- a/tiles-autotag-freemarker/pom.xml
+++ b/tiles-autotag-freemarker/pom.xml
@@ -35,24 +35,20 @@
   	<dependency>
   		<groupId>org.apache.tiles</groupId>
   		<artifactId>tiles-autotag-core</artifactId>
-  		<version>1.0-SNAPSHOT</version>
   	</dependency>
   	<dependency>
   		<groupId>junit</groupId>
   		<artifactId>junit</artifactId>
-  		<version>4.8.1</version>
   		<scope>test</scope>
   	</dependency>
   	<dependency>
   		<groupId>commons-io</groupId>
   		<artifactId>commons-io</artifactId>
-  		<version>1.4</version>
   		<scope>test</scope>
   	</dependency>
   	<dependency>
   		<groupId>org.easymock</groupId>
   		<artifactId>easymock</artifactId>
-  		<version>3.0</version>
   		<scope>test</scope>
   	</dependency>
   </dependencies>
diff --git a/tiles-autotag-jsp/pom.xml b/tiles-autotag-jsp/pom.xml
index e11826e..f6e95a9 100644
--- a/tiles-autotag-jsp/pom.xml
+++ b/tiles-autotag-jsp/pom.xml
@@ -35,24 +35,20 @@
     <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>4.7</version>
         <scope>test</scope>
     </dependency>
     <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
-        <version>1.4</version>
         <scope>test</scope>
     </dependency>
     <dependency>
     	<groupId>org.apache.tiles</groupId>
     	<artifactId>tiles-autotag-core</artifactId>
-    	<version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
     	<groupId>org.easymock</groupId>
     	<artifactId>easymock</artifactId>
-    	<version>3.0</version>
     	<scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/tiles-autotag-velocity/pom.xml b/tiles-autotag-velocity/pom.xml
index f579490..d0399ca 100644
--- a/tiles-autotag-velocity/pom.xml
+++ b/tiles-autotag-velocity/pom.xml
@@ -35,24 +35,20 @@
   	<dependency>
   		<groupId>org.apache.tiles</groupId>
   		<artifactId>tiles-autotag-core</artifactId>
-  		<version>1.0-SNAPSHOT</version>
   	</dependency>
   	<dependency>
   		<groupId>junit</groupId>
   		<artifactId>junit</artifactId>
-  		<version>4.8.1</version>
   		<scope>test</scope>
   	</dependency>
   	<dependency>
   		<groupId>commons-io</groupId>
   		<artifactId>commons-io</artifactId>
-  		<version>1.4</version>
   		<scope>test</scope>
   	</dependency>
   	<dependency>
   		<groupId>org.easymock</groupId>
   		<artifactId>easymock</artifactId>
-  		<version>3.0</version>
   		<scope>test</scope>
   	</dependency>
   </dependencies>