Quick Satrt

  • download pax construct
  • setup path
  • create a new OSGi project pax-create-project -g examples -a test
  • create a Bundle pax-create-bundle -p org.example.pkg -n test.bundle
  • build and deploy mvn clean install pax:provision
  • shutdown felix server by shutdown commend

setup your own env

      <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-pax-plugin</artifactId>
        <version>1.4</version>
        <configuration>
          <!--
           | some example Pax-Runner settings
          -->
          <provision>
            <param>--platform=felix</param>
          </provision>
        </configuration>
        <executions>
          <!--
           | uncomment to auto-generate IDE files
          <execution>
            <id>ide-support</id>
            <goals>
              <goal>eclipse</goal>
            </goals>
          </execution>
          -->
        </executions>
      </plugin>
      <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
      <source>1.5</source>
      <target>1.5</target>
      <encoding>UTF-8</encoding>
    </configuration>
      </plugin>      

default pom.xml under proejct is like above. You can <param>–platform=felix</param> to <param>–platform=equinox</param> and enabled ide support by remove comment.

embed 3th party jar

  1. pax-embed-jar
  2. mvn install
  3. pax-provision

embed or wrap

embed: just put jar in container wrap: provides capability for install, resoled, unstall, update, export package ….

Enable Spring DM