Hello, > I am currently writing a small shell script which is supposed to run > felix, install the necessary bundles with gogo, then quit and package > felix for deployment on our integration servers. > > [snip] If you are using Maven, and your bundles are deployed in Maven repositories (besides being deployed in OBR repositories), you can add bundles to a Felix installation without running Felix.
The two following sample files add a File Install 3.1.10 bundle to a Felix 4.0.1 framework, then re-package the result as a gzipped tarball: pom.xml: " <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> <packaging>pom</packaging> <name>NAME</name> <description>DESCRIPTION</description> <groupId>GROUP</groupId> <artifactId>ARTIFACT</artifactId> <version>VERSION</version> <properties> <felix.version>4.0.1</felix.version> <felix.dir>${project.build.directory}/felix-framework-${felix.version}</felix.dir> <fileinstall.version>3.1.10</fileinstall.version> </properties> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.fileinstall</artifactId> <version>${fileinstall.version}</version> </dependency> <!-- Add more dependencies here if you want --> </dependencies> <build> <plugins> <!-- 1. Unpack Felix distribution to target/${felix.dir} and install dependencies in bundle --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack-felix</id> <phase>generate-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <outputDirectory>${project.build.directory}</outputDirectory> <excludeTransitive>true</excludeTransitive> <overWrite>true</overWrite> <artifactItems> <artifactItem> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.main.distribution</artifactId> <version>${felix.version}</version> <type>tar.gz</type> </artifactItem> </artifactItems> </configuration> </execution> <execution> <id>fill-out-bundle</id> <phase>process-resources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${felix.dir}/bundle</outputDirectory> <useRepositoryLayout>false</useRepositoryLayout> <excludeTransitive>true</excludeTransitive> <overWrite>true</overWrite> </configuration> </execution> </executions> </plugin> <!-- 2. Create an assembly package of the modified Felix distribution --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <archiveBaseDirectory>${felix.dir}</archiveBaseDirectory> <tarLongFileMode>gnu</tarLongFileMode> <descriptors> <descriptor>assembly.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> " assembly.xml: " <?xml version="1.0" encoding="UTF-8"?> <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> <formats> <format>tar.gz</format> </formats> <fileSets> <fileSet> <directory>.</directory> </fileSet> </fileSets> </assembly> " Regards, Lionel. ________________________________ Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.