Hi Tim, This might be somewhat out of topic for this list ...
Anyway, here is, what I usually do - though I do not know whether this is actually "best practices": For the groupId I use a company-internal structuring which is adapted to the project hierarchy. For the artifactId I use short "words" like "commons-logging". For this special use case of bundling existing third party libraries, I create a bundle for each library inlining the classes but excluding all dependencies. As artifactId I use the artifactId of the original library project. Generally, I started using project hierarchies to combine common definitions. Hope this helps. Regards Felix On 10/27/06, Tim Moloney <[EMAIL PROTECTED]> wrote:
I've written a pom.xml file that bundles commons-logging and all of its dependencies into a Felix bundle (see below). I'm about to start bundling other library-type jar files that I'll need so I'm looking for any comments/critiques. I'm still quite the newbie with Felix (and Maven) so I have a few questions. - I'm still fuzzy on what exact values I should use for groupId and artifactId. - Am I doing this the hard (or wrong) way? - Is there a way to automate this? - Am I missing anything in my "bundling"? - Are there any "best practices" issues that I should be aware of? Thanks, Tim Moloney <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> <groupId>org.apache.commons.logging</groupId> <artifactId>org.apache.commons.logging</artifactId> <packaging>osgi-bundle</packaging> <version>1.1</version> <name>org.apache.commons.logging OSGi Bundle</name> <dependencies> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.sun.jdmk</groupId> <artifactId>jmxtools</artifactId> <version>1.2.1</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.jms</groupId> <artifactId>jms</artifactId> <version>1.1</version> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.felix.plugins</groupId> <artifactId>maven-osgi-plugin</artifactId> <extensions>true</extensions> <configuration> <osgiManifest> <bundleName>${pom.name}</bundleName> <bundleVendor>${pom.groupId}</bundleVendor> <exportPackage>${pom.artifactId}</exportPackage> <bundleDescription>${pom.name}</bundleDescription> </osgiManifest> </configuration> </plugin> </plugins> </build> </project>