Applied patch (FELIX-198) to create a pom file that separates the
subprojects by their packaging type to avoid the dreaded maven bug. This
will hopefully only be temporary.
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@506501 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
index a321b1a..95b3180 100644
--- a/build.xml
+++ b/build.xml
@@ -19,26 +19,44 @@
<project default="all">
<target name="clean">
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-new-plugin.xml clean" />
+ <arg line="-Dpackaging=bundle clean" />
</exec>
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-old-plugin.xml clean" />
+ <arg line="-Dpackaging=osgi-bundle clean" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=ipojo-bundle clean" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=osgi-bundle-mosgi clean" />
</exec>
</target>
<target name="install">
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-new-plugin.xml install" />
+ <arg line="-Dpackaging=bundle install" />
</exec>
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-old-plugin.xml install" />
+ <arg line="-Dpackaging=osgi-bundle install" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=ipojo-bundle install" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=osgi-bundle-mosgi install" />
</exec>
</target>
<target name="all">
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-new-plugin.xml clean install" />
+ <arg line="-Dpackaging=bundle clean install" />
</exec>
<exec executable="mvn" failonerror="true">
- <arg line="-f pom-old-plugin.xml clean install" />
+ <arg line="-Dpackaging=osgi-bundle clean install" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=ipojo-bundle clean install" />
+ </exec>
+ <exec executable="mvn" failonerror="true">
+ <arg line="-Dpackaging=osgi-bundle-mosgi clean install" />
</exec>
</target>
</project>
diff --git a/pom-new-plugin.xml b/pom-new-plugin.xml
deleted file mode 100644
index 24262ca..0000000
--- a/pom-new-plugin.xml
+++ /dev/null
@@ -1,249 +0,0 @@
-<!--
- 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>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.felix</groupId>
- <artifactId>felix</artifactId>
- <packaging>pom</packaging>
- <name>Apache Felix</name>
- <version>0.9.0-incubator-SNAPSHOT</version>
- <url>http://incubator.apache.org/felix/</url>
- <description>Apache felix is an OSGi implementation.</description>
-
- <issueManagement>
- <system>Jira</system>
- <url>http://issues.apache.org/jira/browse/FELIX</url>
- </issueManagement>
-
- <mailingLists>
- <mailingList>
- <name>Felix Dev</name>
- <subscribe>felix-dev-subscribe@incubator.apache.org</subscribe>
- <unsubscribe>felix-dev-unsubscribe@incubator.apache.org</unsubscribe>
- <post>-</post>
- <archive>http://www.mail-archive.com/felix-dev%40incubator.apache.org/</archive>
- </mailingList>
- <mailingList>
- <name>Felix Commits</name>
- <subscribe>felix-commits-subscribe@incubator.apache.org</subscribe>
- <unsubscribe>felix-commits-unsubscribe@incubator.apache.org</unsubscribe>
- <post>-</post>
- <archive>http://www.mail-archive.com/felix-commits%40incubator.apache.org/</archive>
- </mailingList>
- </mailingLists>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/felix</connection>
- <developerConnection>scm:svn:http://svn.apache.org/repos/asf/incubator/felix</developerConnection>
- <url>http://cvs.apache.org/viewcvs.cgi/incubator/felix/?root=Apache-SVN</url>
- </scm>
-
- <modules>
- <module>org.osgi.foundation</module>
- <module>tools/maven2/maven-bundle-plugin</module>
- <module>javax.servlet</module>
- <module>org.osgi.core</module>
- <module>org.osgi.compendium</module>
- <module>framework</module>
- <module>main</module>
- <module>shell</module>
- <module>shell.tui</module>
- <module>bundlerepository</module>
- <module>log</module>
- <module>eventadmin</module>
- <module>eventadmin.bridge.upnp</module>
- <module>eventadmin.bridge.configuration</module>
- <module>eventadmin.bridge.useradmin</module>
- <module>eventadmin.bridge.wireadmin</module>
- </modules>
-
- <!-- Specify a default version number for dependencies -->
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.framework</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.bundlerepository</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.mosgi.jmx.registry</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.mosgi.jmx.agent</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.mosgi.console.ifc</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <repositories>
- <!-- For snapshots (no release jars or non-apache jars) -->
- <repository>
- <id>apache.snapshots</id>
- <name>Apache Snapshot Repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository</url>
- </repository>
-
- <repository>
- <id>safehaus</id>
- <name>Alternate Repository for Missing Ibiblio Artifacts</name>
- <url>http://m2.safehaus.org</url>
- </repository>
- </repositories>
-
- <distributionManagement>
- <site>
- <id>felix website</id>
- <url>file:///${user.dir}/target/site-deployed/</url>
- </site>
- <snapshotRepository>
- <id>apache.snapshots</id>
- <name>Apache Snapshot Repository</name>
- <url>
- scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository
- </url>
- </snapshotRepository>
- <repository>
- <name>ASF Mirrored M2 Distributions</name>
- <id>apache.distributions</id>
- <url>
- scp://people.apache.org/www/people.apache.org/repo/m2-incubating-repository
- </url>
- </repository>
- </distributionManagement>
-
- <pluginRepositories>
- <pluginRepository>
- <id>apache.snapshots</id>
- <name>snapshot plugins</name>
- <url>
- http://people.apache.org/repo/m2-snapshot-repository
- </url>
- </pluginRepository>
- </pluginRepositories>
-
- <!-- definitions for testing -->
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>1.2_Java1.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <!-- plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin -->
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <templateDirectory>${user.dir}/src/site/</templateDirectory>
- <template>maven-site.vm</template>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jxr-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>index</report>
- <report>dependencies</report>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <!--plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin-->
- </plugins>
- </reporting>
-</project>
diff --git a/pom-old-plugin.xml b/pom.xml
similarity index 71%
rename from pom-old-plugin.xml
rename to pom.xml
index f28d884..31cb776 100644
--- a/pom-old-plugin.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<issueManagement>
<system>Jira</system>
<url>http://issues.apache.org/jira/browse/FELIX</url>
- </issueManagement>
+ </issueManagement>
<mailingLists>
<mailingList>
@@ -55,47 +55,121 @@
<distribution>repo</distribution>
</license>
</licenses>
-
+
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/incubator/felix</connection>
<developerConnection>scm:svn:http://svn.apache.org/repos/asf/incubator/felix</developerConnection>
<url>http://cvs.apache.org/viewcvs.cgi/incubator/felix/?root=Apache-SVN</url>
</scm>
-
- <modules>
- <module>tools/maven2/maven-osgi-plugin</module>
- <module>shell.gui</module>
- <module>shell.gui.plugin</module>
- <module>org.apache.felix.daemon</module>
- <module>org.apache.felix.dependencymanager</module>
- <module>examples</module>
+ <!--
+ Felix contains 3 custom maven packaging plugins. Each creates a jar file
+ as an artifact.
+
+ maven-bundle-plugin
+ (bundle packaging - latest prefered plugin for generating OSGi bundles.)
+ maven-osgi-plugin
+ (osgi-bundle packaging - old plugin for generating OSGi bundles.)
+ org.apache.felix.ipojo.plugin
+ (plugin for generating iPOJO OSGi bundles.)
+
+ But with maven bug https://issues.apache.org/jira/browse/FELIX-198 files
+ are not always created with the correct extension in the repository.
- <module>servicebinder</module>
- <module>wireadmin</module>
- <module>upnp.extra</module>
- <module>upnp.basedriver</module>
- <module>upnp.tester</module>
- <module>upnp.sample.tv</module>
- <module>upnp.sample.clock</module>
- <module>upnp.sample.binaryLight</module>
-<!-- <module>http.jetty</module> -->
- <module>scr</module>
+ As a work around, this pom creates different profiles for building the
+ different types of felix modules.
-<!-- <module>tools/mangen</module> -->
-
- <module>ipojo</module>
- <module>ipojo.metadata</module>
- <module>ipojo.plugin</module>
- <module>ipojo.arch</module>
-
- </modules>
+ Usage:
+ mvn -Dpackaging=<type> clean install
+ -->
<profiles>
+
<profile>
- <id>jdk1.5</id>
+ <id>packaging-ipojo-bundle</id>
<activation>
- <jdk>1.5</jdk>
+ <property>
+ <name>packaging</name>
+ <value>ipojo-bundle</value>
+ </property>
+ </activation>
+ <modules>
+ <module>ipojo.arch</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>packaging-bundle</id>
+ <activation>
+ <property>
+ <name>packaging</name>
+ <value>bundle</value>
+ </property>
+ </activation>
+ <modules>
+ <module>org.osgi.foundation</module>
+ <module>tools/maven2/maven-bundle-plugin</module>
+ <module>javax.servlet</module>
+ <module>org.osgi.core</module>
+ <module>org.osgi.compendium</module>
+ <module>framework</module>
+ <module>main</module>
+ <module>shell</module>
+ <module>shell.tui</module>
+ <module>bundlerepository</module>
+ <module>log</module>
+ <module>eventadmin</module>
+ <module>eventadmin.bridge.upnp</module>
+ <module>eventadmin.bridge.configuration</module>
+ <module>eventadmin.bridge.useradmin</module>
+ <module>eventadmin.bridge.wireadmin</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>packaging-osgi-bundle</id>
+ <activation>
+ <property>
+ <name>packaging</name>
+ <value>osgi-bundle</value>
+ </property>
+ </activation>
+ <modules>
+ <module>tools/maven2/maven-osgi-plugin</module>
+ <module>shell.gui</module>
+ <module>shell.gui.plugin</module>
+ <module>org.apache.felix.daemon</module>
+ <module>org.apache.felix.dependencymanager</module>
+
+ <module>examples</module>
+
+ <module>servicebinder</module>
+ <module>wireadmin</module>
+ <module>upnp.extra</module>
+ <module>upnp.basedriver</module>
+ <module>upnp.tester</module>
+ <module>upnp.sample.tv</module>
+ <module>upnp.sample.clock</module>
+ <module>upnp.sample.binaryLight</module>
+ <!-- <module>http.jetty</module> -->
+ <module>scr</module>
+
+ <!-- <module>tools/mangen</module> -->
+
+ <module>ipojo</module>
+ <module>ipojo.metadata</module>
+ <module>ipojo.plugin</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>osgi-bundle-mosgi</id>
+ <activation>
+ <property>
+ <name>packaging</name>
+ <value>osgi-bundle-mosgi</value>
+ </property>
+ <!--Two activation elements don't AND. <jdk>1.5</jdk>-->
</activation>
<modules>
<module>mosgi.console.ifc</module>
@@ -137,8 +211,8 @@
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.bundlerepository</artifactId>
- <version>0.9.0-incubator-SNAPSHOT</version>
+ <artifactId>org.apache.felix.bundlerepository</artifactId>
+ <version>0.9.0-incubator-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
@@ -165,7 +239,7 @@
<name>Apache Snapshot Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
-
+
<repository>
<id>safehaus</id>
<name>Alternate Repository for Missing Ibiblio Artifacts</name>