This Maven plug-in lets you weave the OT/J class files of a project, so that the re-written class files can be executed without the Object Teams load-time weaver.
The load-time weaver is the preferred way to run OT/J programs if available. Currently this is supported for
On other platforms, you either have to integrate the load-time weaver into the existing class loading mechanism, or: use the built-time weaver to create a static set of classes ready to run with no further infrastructure.
To enable this plug-in add the pluginGroup "org.eclipse.objectteams" to your maven settings.
For general information on compiling OT/J programs with Maven see Using the Object Teams Parent POM
Here is a typical pom that compiles OT/J sources and weaves them using the objectteams-weaver:weave goal.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.eclipse.objectteams</groupId>
                <artifactId>objectteams-parent-pom</artifactId>
                <version>2.2.0</version>
        </parent>
        <artifactId>OTStopwatch_Built-Time_Weaver_Example</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <properties>
                <tycho.version>0.18.0</tycho.version>
                <otj.version>2.2.0</otj.version>        
        </properties>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.eclipse.objectteams</groupId>
                                <artifactId>objectteams-weaver-maven-plugin</artifactId>
                                <version>0.8.0-SNAPSHOT</version>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>weave</goal>
                                                </goals>
                                        </execution>
                                </executions>
                                <configuration>
                                        <teamClasses>
                                                <teamClass>org.eclipse.objectteams.example.stopwatch.WatchUI</teamClass>
                                                <teamClass>org.eclipse.objectteams.example.stopwatch.WatchUIAnalog</teamClass>
                                        </teamClasses>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
        <repositories>
                <repository>
                        <id>ObjectTeamsRepository</id>
                        <name>Object Teams Repository</name>
                        <url>http://download.eclipse.org/objectteams/maven/3/repository</url>
                </repository>
        </repositories>
</project>The plugin can further be configured via a build.plugins.plugin.configuration block. The following properties can be used:
| Parameter | Type | Description | Default | 
| teamClasses | list of class names | qualified names of all teams to weave | no default / required | 
| activeTeamClasses | list of class names | qualified names of teams to activate at program start | no default / optional | 
| mainClass | class name | qualified name of the main class | no default / required if activeTeamClasses is set | 
| wovenClassDirectory | path (string) | output directory for woven classes | target/woven-classes |