JBoss.org Community Documentation

11.4. Running loadtime weaving with Maven2

Running a java application in loadtime weaving is almost identical to compile time (except that you dont need to precompile it first). The only change is that we need an option to say that we want to run it loadtime.

  • loadtime - set it to true if you want loadtime weaving. Default is set to false.

A small example:

<plugin>
  <groupId>org.jboss.maven.plugins</groupId>
  <artifactId>maven-jbossaop-plugin</artifactId>
  <version>1.0.CR1</version>
  <executions>
    <execution>
      <id>run</id>
      <configuration>
        <aoppaths>
          <aoppath>src/main/resources/jboss-aop_testcase.xml</aoppath>
        </aoppaths>
        <loadtime>true</loadtime>
        <executable>Test</executable>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution> 
  </executions>
</plugin>