Automatically generate MANIFEST for eclipse ui
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 11 Jan 2011 09:05:40 +0000 (09:05 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 11 Jan 2011 09:05:40 +0000 (09:05 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4005 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

eclipse/plugins/org.argeo.eclipse.ui/pom.xml
eclipse/plugins/pom.xml

index bb1ac1f4e47e37bb58322746bf14231ed886bf52..3b8f94c3701d9a95fc02823d2c5cd5dc53959484 100644 (file)
@@ -1,4 +1,5 @@
-<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>
        <parent>
                <groupId>org.argeo.commons.eclipse</groupId>
@@ -9,6 +10,42 @@
        <artifactId>org.argeo.eclipse.ui</artifactId>
        <name>Commons Eclipse UI</name>
        <packaging>jar</packaging>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-source-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <version>${version.maven-bundle-plugin}</version>
+                               <configuration>
+                                       <instructions>
+                                               <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
+                                               <Bundle-Activator>org.argeo.eclipse.ui.ArgeoUiPlugin</Bundle-Activator>
+                                               <Require-Bundle>org.eclipse.ui;resolution:=optional,org.eclipse.rap.ui;resolution:=optional,org.eclipse.core.runtime</Require-Bundle>
+                                               <Import-Package>
+                                                       org.springframework.beans.factory,
+                                                       org.springframework.core.io.support,
+                                                       !org.eclipse.core.runtime,
+                                                       !org.eclipse.core.commands,
+                                                       !org.eclipse.ui.plugin,
+                                                       *
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
        <dependencies>
                <!-- Eclipse -->
                <dependency>
index 93d9368725542a89526ae368b4feeaf1f60bab88..b36c9365b7288d6e12c7859f2ec674593f615eba 100644 (file)
@@ -15,6 +15,9 @@
        </modules>
        <build>
                <resources>
+                       <resource>
+                               <directory>src/main/resources</directory>
+                       </resource>
                        <resource>
                                <directory>.</directory>
                                <includes>
                </resources>
                <plugins>
                        <plugin>
+                               <artifactId>maven-clean-plugin</artifactId>
+                               <configuration>
+                                       <filesets>
+                                               <fileset>
+                                                       <directory>META-INF</directory>
+                                                       <includes>
+                                                               <include>MANIFEST.MF</include>
+                                                       </includes>
+                                               </fileset>
+                                       </filesets>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <configuration>
                                        <archive>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-compiler-plugin</artifactId>
+                               <artifactId>maven-source-plugin</artifactId>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-source-plugin</artifactId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <version>${version.maven-bundle-plugin}</version>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <manifestLocation>META-INF</manifestLocation>
+                                       <instructions>
+                                               <Bundle-Version>${project.version}-r${buildNumber}</Bundle-Version>
+                                               <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                                               <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+                                               <_removeheaders>Bnd-LastModified</_removeheaders>
+                                       </instructions>
+                               </configuration>
                                <executions>
                                        <execution>
-                                               <id>attach-sources</id>
-                                               <phase>package</phase>
+                                               <id>bundle-manifest</id>
+                                               <phase>process-classes</phase>
                                                <goals>
-                                                       <goal>jar</goal>
+                                                       <goal>manifest</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                       </plugin>
                </plugins>
        </build>
 </project>