just to follow up on this, here's a complete example POM that should work: (at least it works in initial tests)
================================================================= <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns=" http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <properties> <wrapped.groupId>com.microsoft</wrapped.groupId> <wrapped.artifactId>sqljdbc</wrapped.artifactId> <wrapped.version>1.1</wrapped.version> </properties> <modelVersion>4.0.0</modelVersion> <groupId>examples</groupId> <artifactId>com.microsoft.sqljdbc</artifactId> <!-- support wrapper POM versioning... --> <version>${wrapped.version}-001-SNAPSHOT</version> <name>DBCPProvider MS-SQL JDBC Driver version - ${wrapped.version}</name> <packaging>bundle</packaging> <dependencies> <dependency> <groupId>${wrapped.groupId}</groupId> <artifactId>${wrapped.artifactId}</artifactId> <version>${wrapped.version}</version> <scope>compile</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi_R4_core</artifactId> <version>1.0</version> <scope>provided</scope> <optional>true</optional> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>1.1.0-SNAPSHOT</version> <extensions>true</extensions> <configuration> <instructions> <!-- Bundle-Name/Bundle-SymbolicName are set automatically from project defaults --> <Bundle-Activator> nl.gx.webmanager.services.dbcpprovider.sqljdbc.ProviderActivator </Bundle-Activator> <Bundle-Version>${wrapped.version}</Bundle-Version> <!-- embed any compile-scope dependencies (ie. include jarfiles) --> <Embed-Dependency>*;scope=compile</Embed-Dependency> <!-- this sets the bundle exports _after_ calculating the contents if you use Export-Package then the classes would be pulled in but this isn't needed they're already in the embedded jarfile --> <_exportcontents>com.microsoft.sqlserver.jdbc;version=1.1 </_exportcontents> <!-- set this to classes not in the compile dependencies that you want in the final bundle (such as classes from src/main/java) don't set it to * otherwise _all_ classes on the compilation classpath will get pulled in... --> <Private-Package>nl.gx.webmanager.services.dbcpprovider.sqljdbc </Private-Package> </instructions> </configuration> </plugin> </plugins> </build> <pluginRepositories> <pluginRepository> <id>ops4j-snapshots</id> <url>http://repository.ops4j.org/mvn-snapshots</url> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories> </project> ================================================================= On 08/11/2007, Stuart McCulloch <[EMAIL PROTECTED]> wrote: > > On 08/11/2007, Stuart McCulloch <[EMAIL PROTECTED]> wrote: > > > On 08/11/2007, Bram de Kruijff <[EMAIL PROTECTED]> wrote: > > > > > > Hi all, > > > > > > first, sorry about the empty email I send before.. me and my outlook > > > :( > > > > > > np :) > > > > im trying to include (and export) the appropriate classes from a signed > > > jar (mssql sqljdbc 1.1) in a bundle. The maven osgi plugin just used > > > to > > > include the signed jar and everything was fine. > > > > > > Using the bundle plugin however, the resulting bundle is a little > > > strange as it does contain the jdbc classes (exploded from the jar) > > > but > > > also the original (from the driver) manifest file in the meta-inf > > > twice > > > (Manifest.mf / manifest.mf) as well as some other resources > > > (zigbert.rsa /zigbert.sf) but no OSGi compliant manifest to be found > > > anywhere. > > > > > > As this sqljdb jar is signed should I handle it in another way? > > > > > > is there anywhere I can download this particular signed jarfile? > > > > ps. could you also try the following instructions: > > > > <plugin> > > <groupId>org.apache.felix</groupId> > > <artifactId>maven-bundle-plugin</artifactId> > > <version>1.1.0-SNAPSHOT</version> > > <extensions>true</extensions> > > <configuration> > > <instructions> > > <Bundle-SymbolicName> > > com.microsoft.sqlserver.jdbc</Bundle-SymbolicName> > > <Bundle-Name>DBCPProvider MS-SQL JDBC Driver version - 1.1 > > </Bundle-Name> > > <Bundle-Activator> > > nl.gx.webmanager.services.dbcpprovider.sqljdbc.ProviderActivator</Bundle-Activator> > > > > <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency> > > > > FYI, you could also try: > > <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> > > to embed the actual (unchanged) jdbc jarfile inside the bundle... > > <_exportcontents> com.microsoft.sqlserver.jdbc > > </_exportcontents> > > <Private-Package>!*</Private-Package> <!-- just to clear > > some warnings --> > > </instructions> > > </configuration> > > </plugin> > > > > as for wrapping it's better to use <Embed-Dependency> and > > <_exportcontents>, as Private-Package > > and Export-Package only include the classes, not necessarily any > > contained resources or metadata. > > > > regards, > > > Bram > > > > > > > > > ps. Below the bundle plugin configuration I'm currently using. > > > > > > <dependencies> > > > <dependency> > > > <groupId>com.microsoft</groupId> > > > <artifactId>sqljdbc</artifactId> > > > <version>1.1</version> > > > <scope>compile</scope> > > > </dependency> > > > </dependencies> > > > <build> > > > <plugins> > > > <plugin> > > > <groupId> org.apache.felix</groupId> > > > <artifactId>maven-bundle-plugin</artifactId> > > > <version>1.1.0-SNAPSHOT</version> > > > <extensions>true</extensions> > > > <configuration> > > > <instructions> > > > <Bundle-Name>DBCPProvider MS-SQL JDBC Driver > > > version - 1.1</Bundle-Name> > > > <Bundle-Activator> > > > > > > nl.gx.webmanager.services.dbcpprovider.sqljdbc.ProviderActivator > > > </Bundle-Activator> > > > <Private-Package> > > > * > > > </Private-Package> > > > <Export-Package> > > > com.microsoft.sqlserver.jdbc > > > </Export-Package> > > > </instructions> > > > </configuration> > > > </plugin> > > > </plugins> > > > </build> > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > Cheers, Stuart > > > > > -- > Cheers, Stuart -- Cheers, Stuart

