Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Definition

Excerpt

Deploy an OSGi bundle that will be started when the container starts

Example using the Java API

Starting JOnAS 5.x with an OSGi bundle to deploy:

Code Block

InstalledLocalContainer container = new Jonas5xInstalledLocalContainer(
    new Jonas5xStandaloneLocalConfiguration("target/jonas5x"));
container.setHome("c:/jonas/jonas-5.1.2");

Deployable bundle = new Bundle("src/data/some-bundle.jar");
container.getConfiguration().addDeployable(bundle);

container.start();

...

Starting JOnAS 5.x with an OSGi bundle to deploy:

Code Block
xml
xml

<cargo containerId="jonas5x" home="c:/jonas/jonas-5.1.2" action="start">
  <configuration>
    <deployable type="rar" file="src/data/src/data/some-bundle.jar"/>
  </configuration>
</cargo>

...

Here is the plugin configuration defining a JOnAS 5.x container with an OSGi bundle to deploy:

Code Block
xml
xml

<dependencies>
  <dependency>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>simple-bundle</artifactId>
    <version>${simple-bundle.version}</version>
    <type>bundle</type>
  </dependency>
</dependencies>

<plugins>
  <plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>${cargo.version}</version>
    <configuration>
      <containerId>jonas5x</containerId>
      <artifactInstaller>
        <groupId>org.ow2.jonas.assemblies.profiles</groupId>
        <artifactId>jonas-full</artifactId>
        <version>5.2.1</version>
        <classifier>bin</classifier>
      </artifactInstaller>
      <configuration>
        <deployables>
          <deployable>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>simple-bundle</artifactId>
            <type>bundle</type>
          </deployable>
        </deployables>
      </configuration>
    </configuration>
  </plugin>
</plugins>

For more information...

...