David, Pure and utter laziness - I put everything together I need for a full cassandra node and I can re-use the same properties defaults as I stole them from the karaf build :)
I did this in wild panic one evening because I needed the full bundle to deploy while hiding all the jars. In the end of the day the BND would do the exact same thing. I think we do a / did a very similar thing with the servicemix Jetty6 bundles. On Jun 25, 2012, at 4:55 PM, David Jencks wrote: > Hi Johan, > > I think he'll need the parent pom's maven-bundle-plugin configuration to make > sense of the properties. > > I don't understand the shade plugin very well, are you actually changing > package names here or just putting a lot of jars together into one? > If the latter, why do you need the shade plugin rather than just using bnd? > > hoping to learn :-) > > thanks > david jencks > > On Jun 25, 2012, at 6:49 PM, Johan Edstrom wrote: > >> If I remember correctly, that is a split package. >> I think I posted a shade earlier, here is a complete bundle >> >> <?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/xsd/maven-4.0.0.xsd"> >> <parent> >> <artifactId>bundles</artifactId> >> <groupId>com.savoirtech</groupId> >> <version>1.0-SNAPSHOT</version> >> </parent> >> <modelVersion>4.0.0</modelVersion> >> <artifactId>cassandra-all</artifactId> >> <packaging>bundle</packaging> >> <dependencies> >> <dependency> >> <groupId>org.apache.cassandra</groupId> >> <artifactId>apache-cassandra</artifactId> >> <version>${cassandra.version}</version> >> <type>pom</type> >> </dependency> >> <dependency> >> <groupId>org.apache.cassandra</groupId> >> <artifactId>cassandra-all</artifactId> >> <version>${cassandra.version}</version> >> <exclusions> >> <exclusion> >> <groupId>com.googlecode.concurrentlinkedhashmap</groupId> >> <artifactId>concurrentlinkedhashmap-lru</artifactId> >> </exclusion> >> </exclusions> >> </dependency> >> <dependency> >> <groupId>com.googlecode.concurrentlinkedhashmap</groupId> >> <artifactId>concurrentlinkedhashmap-lru</artifactId> >> <version>1.3</version> >> </dependency> >> </dependencies> >> <build> >> <plugins> >> <plugin> >> <artifactId>maven-shade-plugin</artifactId> >> <executions> >> <execution> >> <phase>package</phase> >> <goals> >> <goal>shade</goal> >> </goals> >> <configuration> >> <artifactSet> >> <includes> >> <include>${pkgGroupId}:${pkgArtifactId}</include> >> </includes> >> </artifactSet> >> <filters> >> <filter> >> <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> >> <excludes> >> <exclude>**</exclude> >> </excludes> >> </filter> >> </filters> >> <promoteTransitiveDependencies>true</promoteTransitiveDependencies> >> <createDependencyReducedPom>false</createDependencyReducedPom> >> >> <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope> >> </configuration> >> </execution> >> </executions> >> </plugin> >> </plugins> >> </build> >> <properties> >> <pkgVersion>${cassandra.version}</pkgVersion> >> <pkgArtifactId>cassandra-all</pkgArtifactId> >> <savoirtech.osgi.import> >> !javax.inject, >> !javax.mail.internet, >> !jline, >> !joptsimple, >> !junit.framework, >> !sun.misc, >> com.google.inject.internal*;resolution:=optional, >> com.sun.jna ;resolution:=optional, >> com.thoughtworks.paranamer;resolution:=optional, >> edu.emory.mathcs.backport.java.util;resolution:=optional, >> javax.servlet*;resolution:=optional, >> kaffe*;resolution:=optional, >> org.apache.commons.httpclient*;resolution:=optional, >> org.apache.commons.jxpath*;resolution:=optional, >> org.apache.env*;resolution:=optional, >> org.apache.hadoop*;resolution:=optional, >> org.apache.http*;resolution:=optional, >> org.apache.log*;resolution:=optional, >> org.apache.pig*;resolution:=optional, >> org.apache.tools.ant*;resolution:=optional,, >> org.jboss.netty*;resolution:=optional, >> org.mortbay*;resolution:=optional, >> * >> </savoirtech.osgi.import> >> <savoirtech.osgi.export> >> org.apache.cassandra*;version=1.1.1, >> org.apache.thrift*;-split-package:=merge-first, >> </savoirtech.osgi.export> >> <savoirtech.osgi.private.pkg> >> antlr*, >> com.google.inject.internal*, >> com.ning.compress.lzf, >> com.sun.jna, >> org.yaml*, >> org.cliffc.high_scale_lib*, >> com.google*, >> com.googlecode*, >> com.googlecode.concurrentlinkedhashmap, >> edu.stanford.ppl.concurrent*, >> org.apache.avro*, >> org.codehaus.jackson*, >> org.antlr*, >> org.apache.commons*;-split-package:=merge-first, >> org.github*, >> org.xerial*, >> com.yammer* >> </savoirtech.osgi.private.pkg> >> <savoirtech.osgi.embed>concurrentlinkedhashmap-lru,cassandra-all</savoirtech.osgi.embed> >> <pkgGroupId>cassandra-all</pkgGroupId> >> </properties> >> </project> >> >> >> On Jun 25, 2012, at 3:16 PM, ramesh chandra wrote: >> >>> I am getting this error >>> >>> Caused by: java.lang.NoClassDefFoundError: >>> org/apache/thrift/transport/TTransportException >>> ........ >>> >>> Caused by: java.lang.ClassNotFoundException: >>> org.apache.thrift.transport.TTransportException not found by >>> me.prettyprint.hector [193] >>> >>> I have provided all the required dependencies, but for some reason , there >>> is one 'libthrift' that can not be found by the server during runtime. >>> >>> I am not sure if what I attempted below is right and please correct me if >>> there is a right way. >>> >>> in the config.properties file , I added >>> org.osgi.framework.system.packages.extra=libthrift-0.6.1; version="0.6.1" >>> >>> also I copied the jar in apache-karaf-2.2.7/lib folder >>> >>> this did not help, but I am not sure what is the right way to make karaf >>> aware of libthrift. >>> >>> I also tried to install it as a bundle, but it did not help. >>> >>> What I am trying to accomplish is to add org.apache.thrift / libthrift >>> >>> to this list on System.getProperty("java.class.path") >>> >>> >>> /home/ramesh/Documents/osgiFramework/apache-karaf-2.2.7/lib/karaf-jaas-boot.jar:/home/ramesh/Documents/osgiFramework/apache-karaf-2.2.7/lib/karaf.jar >>> >>> >>> >>> >>> >>> >>> Any help would be appreciated >>> >>> regards, >>> Ramesh >>> >>> >> >
