Version 5

    Cargo uses its own logging configuration file which is basically derived from default/conf/jboss-log4j.xml. JBoss logs a lot of things in the default configuration (see: http://lists.jboss.org/pipermail/jboss-development/2008-November/013037.html), so you might need to reduce it to make it less verbose.

     

    You need to tell Cargo to override it's config file with your file, using:

     

    <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      <configuration>
        ...
        <configuration>
          <configfile>
            <file>${JBOSS_HOME}/server/default/conf/jboss-log4j.xml</file>
            <tofile>conf/jboss-log4j.xml</tofile>
          </configfile>
        </configuration>
      </configuration>
    <plugin>

    Cargo simply copies file A to file B. Current working dir is the dir of the container.

     

    When this is set, you can use JBoss AS 5 possibility to set overall logging limit using jboss.server.log.threshold=INFO

     

    <systemProperties>
      <!-- This is used in jboss-log4j.xml -->
      <jboss.server.log.threshold>INFO</jboss.server.log.threshold>
    </systemProperties>

     

     

    Example in the context of pom.xml

     

    <!-- Cargo plugin (for AS 5) -->
    <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      <configuration>
        <wait>false</wait>
        <container>
          <containerId>jboss5x</containerId>
          <home>${JBOSS_HOME}</home>
          <log>${basedir}/target/jboss5.x.logs/cargo.log</log>
          <timeout>300000</timeout> <!-- 5 minutes -->
          <systemProperties>
            <!-- This is used in jboss-log4j.xml -->
            <jboss.server.log.threshold>INFO</jboss.server.log.threshold>
          </systemProperties>
        </container>

        <!-- cargo-configuration - name of the element will hopefully get an alias soon -->
        <configuration>
          <configfiles>
            <!-- Override Cargo's default jboss-log4j.xml -->
            <configfile>
              <file>${JBOSS_HOME}/server/default/conf/jboss-log4j.xml</file>
              <tofile>conf/jboss-log4j.xml</tofile>
            </configfile>
          </configfiles>
        </configuration>
        <!-- /cargo-configuration -->

      </configuration>
    <plugin>