Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Definition

Excerpt

Deploy an EAR that will be started when the container starts

Example using the Java API

Starting Orion 2.x with an EAR to deploy:

Code Block

InstalledLocalContainer container = new Orion2xInstalledLocalContainer(
    new OrionStandaloneConfiguration("target/orion2x"));
container.setHome("c:/apps/orion-2.0.3");

Deployable ear = new EAR("src/data/some.ear");
container.getConfiguration().addDeployable(ear);

container.start();

...

Starting Orion 2.x with an EAR to deploy:

Code Block
xml
xml

<cargo containerId="orion2x" home="c:/apps/orion-2.0.3" action="start">
  <configuration>
    <deployable type="ear" file="src/data/some.ear"/>
  </configuration>
</cargo>

...

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

Code Block
xml
xml

<dependencies>
  <dependency>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>simple-ear</artifactId>
    <version>${simple-ear.version}</version>
    <type>ear</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-ear</artifactId>
            <type>ear</type>
          </deployable>
        </deployables>
      </configuration>
    </configuration>
  </plugin>
</plugins>

...