[Arakhnę-Dev] [155] Make the maven module compliant to OSGi bundle ( Apache Felix implementation).

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 155
Author:   galland
Date:     2010-05-28 21:21:09 +0200 (Fri, 28 May 2010)
Log Message:
-----------
Make the maven module compliant to OSGi bundle (Apache Felix implementation).

Modified Paths:
--------------
    trunk/arakhneLog4J/pom.xml
    trunk/arakhneLogger/pom.xml
    trunk/arakhneRefs/pom.xml
    trunk/arakhneVmutils/bin.xml
    trunk/arakhneVmutils/java/pom.xml
    trunk/arakhneVmutils/native/pom.xml
    trunk/arakhneVmutils/pom.xml

Modified: trunk/arakhneLog4J/pom.xml
===================================================================
--- trunk/arakhneLog4J/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneLog4J/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -15,6 +15,10 @@
   <name>${pom.artifactId}</name>
   <url>http://www.arakhne.org/arakhneLogger/</url>
 
+	<properties>
+		<manifest.file>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifest.file>
+	</properties>
+
 	<!-- ======================================= -->
 	<!-- ====       Project Information      === -->
 	<!-- ======================================= -->
@@ -32,4 +36,45 @@
 		</dependency>
 	</dependencies>
 		
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<archive>
+						<index>false</index>
+						<manifestFile>${manifest.file}</manifestFile>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>bundle-manifest</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>manifest</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<archive>
+						<manifestFile>${manifest.file}</manifestFile>
+						<manifest>
+							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+						</manifest>
+					</archive>
+
+					<instructions>
+						<Export-Package>org.arakhne.logging.*</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
 </project>

Modified: trunk/arakhneLogger/pom.xml
===================================================================
--- trunk/arakhneLogger/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneLogger/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -15,8 +15,53 @@
   <name>${pom.artifactId}</name>
   <url>http://www.arakhne.org/arakhneLogger/</url>
 
+	<properties>
+		<manifest.file>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifest.file>
+	</properties>
+
 	<!-- ======================================= -->
 	<!-- ====       Project Information      === -->
 	<!-- ======================================= -->
 		
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<archive>
+						<index>false</index>
+						<manifestFile>${manifest.file}</manifestFile>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>bundle-manifest</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>manifest</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<archive>
+						<manifestFile>${manifest.file}</manifestFile>
+						<manifest>
+							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+						</manifest>
+					</archive>
+
+					<instructions>
+						<Export-Package>org.arakhne.logging.*</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
 </project>

Modified: trunk/arakhneRefs/pom.xml
===================================================================
--- trunk/arakhneRefs/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneRefs/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -15,6 +15,10 @@
   <name>${pom.artifactId}</name>
   <url>http://www.arakhne.org/arakhneRefs/</url>
 
+	<properties>
+		<manifest.file>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifest.file>
+	</properties>
+
 	<!-- ======================================= -->
 	<!-- ====       Project Information      === -->
 	<!-- ======================================= -->
@@ -27,4 +31,45 @@
 		</dependency>
 	</dependencies>
 
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<archive>
+						<index>false</index>
+						<manifestFile>${manifest.file}</manifestFile>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>bundle-manifest</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>manifest</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<archive>
+						<manifestFile>${manifest.file}</manifestFile>
+						<manifest>
+							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+						</manifest>
+					</archive>
+
+					<instructions>
+						<Export-Package>org.arakhne.util.ref.*</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
 </project>

Modified: trunk/arakhneVmutils/bin.xml
===================================================================
--- trunk/arakhneVmutils/bin.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneVmutils/bin.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -1,5 +1,6 @@
 <assembly>
   <formats>
+    <format>dir</format>
     <format>jar</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
@@ -12,7 +13,7 @@
       <binaries>
         <outputDirectory></outputDirectory>
         <unpack>true</unpack>
-	<includeDependencies>false</includeDependencies>
+		<includeDependencies>false</includeDependencies>
       </binaries>
     </moduleSet>
   </moduleSets>

Modified: trunk/arakhneVmutils/java/pom.xml
===================================================================
--- trunk/arakhneVmutils/java/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneVmutils/java/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -1,24 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 
-  <modelVersion>4.0.0</modelVersion>
+	<modelVersion>4.0.0</modelVersion>
 
-  <parent>
-	<artifactId>afc</artifactId>
+	<!--
+		=== CAUTION === CAUTION === CAUTION === The parent module is not
+		arakhneVmutils to avoid cyclic compilation problems
+	-->
+	<parent>
+		<artifactId>afc</artifactId>
+		<groupId>org.arakhne.afc</groupId>
+		<version>2.1-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>arakhneVmutils-java</artifactId>
+	<packaging>jar</packaging>
 	<groupId>org.arakhne.afc</groupId>
-	<version>2.1-SNAPSHOT</version>
-  </parent>
+	<version>5.0-SNAPSHOT</version>
+	<name>${pom.artifactId}</name>
 
-  <artifactId>arakhneVmutils-java</artifactId>
-  <packaging>jar</packaging>
-  <groupId>org.arakhne.afc</groupId>
-  <version>5.0-SNAPSHOT</version>
-  <name>${pom.artifactId}</name>
+	<properties>
+		<manifest.file>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifest.file>
+	</properties>
 
 	<!-- ======================================= -->
 	<!-- ====       Project Information      === -->
 	<!-- ======================================= -->
-		
+
 	<dependencies>
 		<dependency>
 			<groupId>junit</groupId>
@@ -27,4 +36,51 @@
 		</dependency>
 	</dependencies>
 
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<archive>
+						<index>false</index>
+						<manifestFile>${manifest.file}</manifestFile>
+						<manifest>
+							<mainClass>org.arakhne.vmutil.OperatingSystemInfo</mainClass>
+						</manifest>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>bundle-manifest</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>manifest</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<archive>
+						<manifestFile>${manifest.file}</manifestFile>
+						<manifest>
+							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+						</manifest>
+					</archive>
+
+					<instructions>
+						<Export-Package>org.arakhne.vmutil.*</Export-Package>
+						<Bundle-Name>arakhneVmutils</Bundle-Name>
+						<Bundle-SymbolicName>org.arakhne.afc.arakhneVmutils</Bundle-SymbolicName>
+						<Bundle-Classpath>arakhneVmutils-${pom.version}.jar</Bundle-Classpath>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
 </project>

Modified: trunk/arakhneVmutils/native/pom.xml
===================================================================
--- trunk/arakhneVmutils/native/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneVmutils/native/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -3,6 +3,10 @@
 
   <modelVersion>4.0.0</modelVersion>
 
+	<!-- === CAUTION === CAUTION === CAUTION ===
+		The parent module is not arakhneVmutils to avoid cyclic compilation
+		problems
+	-->
   <parent>
 	<artifactId>afc</artifactId>
 	<groupId>org.arakhne.afc</groupId>

Modified: trunk/arakhneVmutils/pom.xml
===================================================================
--- trunk/arakhneVmutils/pom.xml	2010-05-20 14:14:12 UTC (rev 154)
+++ trunk/arakhneVmutils/pom.xml	2010-05-28 19:21:09 UTC (rev 155)
@@ -1,57 +1,59 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+	<modelVersion>4.0.0</modelVersion>
 
-  <parent>
-	<artifactId>afc</artifactId>
+	<parent>
+		<artifactId>afc</artifactId>
+		<groupId>org.arakhne.afc</groupId>
+		<version>2.1-SNAPSHOT</version>
+	</parent>
+
 	<groupId>org.arakhne.afc</groupId>
-	<version>2.1-SNAPSHOT</version>
-  </parent>
+	<artifactId>arakhneVmutils</artifactId>
+	<packaging>pom</packaging>
+	<version>5.0-SNAPSHOT</version>
+	<name>${pom.artifactId}</name>
+	<description>Additional tools dedicated to low-level and virtual machine features</description>
+	<url>http://www.arakhne.org/arakhneVmutils/</url>
 
-  <groupId>org.arakhne.afc</groupId>
-  <artifactId>arakhneVmutils</artifactId>
-  <packaging>pom</packaging>
-  <version>5.0-SNAPSHOT</version>
-  <name>${pom.artifactId}</name>
-  <url>http://www.arakhne.org/arakhneVmutils/</url>
-
 	<!-- ======================================= -->
 	<!-- ====       Project Information      === -->
 	<!-- ======================================= -->
 
-	<!-- The modules have not this pom as parent
-	     to avoid cyclic compilation problems -->
+	<!-- === CAUTION === CAUTION === CAUTION ===
+		The child modules have not this pom as parent to avoid cyclic compilation
+		problems
+	-->
 	<modules>
 		<module>java</module>
 		<module>native</module>
 	</modules>
-		
+
 	<build>
-	    <plugins>
-	      <plugin>
-			<artifactId>maven-assembly-plugin</artifactId>
-			<configuration>
-			  <descriptors>
-			    <descriptor>bin.xml</descriptor>
-			  </descriptors>
-              <archive>
-                <manifest>
-                  <addClasspath>true</addClasspath>
-                  <mainClass>org.arakhne.vmutil.OperatingSystemInfo</mainClass>
-                </manifest>
-              </archive>
-			</configuration>
-			<executions> 
-			  <execution>
-			    <id>make-assembly</id>
-			    <phase>package</phase>
-			    <goals>
-			      <goal>attached</goal>
-			    </goals>
-			  </execution>
-			</executions>
-	      </plugin>
-	    </plugins>
+		<plugins>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<descriptors>
+						<descriptor>bin.xml</descriptor>
+					</descriptors>
+					<archive>
+						<index>false</index>
+						<manifestFile>${project.build.directory}/${pom.artifactId}-${pom.version}/META-INF/MANIFEST.MF</manifestFile>
+					</archive>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make-assembly</id>
+						<phase>package</phase>
+						<goals>
+							<goal>attached</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
 	</build>
 
 </project>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/