Versions Compared

Key

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

...

Note
titleCareful with binary files!

If you want to inject binary configuration files (JAR files, for example), you should use setFileProperty (instead of setConfigFileProperty) with the Java API and <files> and <file> (instead of <configfiles> and <configfile>) with the Maven2/Maven3 Maven 3 plugin.

You might for example want to add the advanced login configuration to your JBoss instance.

...

Code Block
languagehtml/xml
<cargo containerId="@{containerId}" action="@{action}">
  <configuration home="${configuration.home}">
    <configfile file="${basedir}/src/main/jboss5/login-config.xml" todir="conf"/>
    <configfile file="${basedir}/src/main/jboss5/sample-roles.properties" todir="conf/props"/>
    <configfile file="${basedir}/src/main/jboss5/sample-users.properties" todir="conf/props"/>
  </configuration>
</cargo>

Example using

...

the Maven 3 plugin

Code Block
languagehtml/xml
<plugin>
  <groupId>org.codehaus.cargo</groupId>
  <artifactId>cargo-maven2maven3-plugin</artifactId>
  <configuration>
    <container>
      [...]
    </container>
    <configuration>
      <type>standalone</type>
      [...]
      <configfiles>
        <configfile>
          <file>${project.basedir}/src/main/jboss5/login-config.xml</file>
          <todir>conf</todir>
        </configfile>
        <configfile>
          <file>${project.basedir}/src/main/jboss5/sample-roles.properties</file>
          <todir>conf/props</todir>
        </configfile>
        <configfile>
          <file>${project.basedir}/src/main/jboss5/sample-users.properties</file>
          <todir>conf/props</todir>
        </configfile>
      </configfiles>
    </configuration>
  </configuration>
</plugin>

...