this implementation of btrace instrumentation executes in process-resources 
phase


 <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.1.1</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>${java.home}/bin/java</executable>
                            <arguments>
                                <argument>-cp</argument>
                                <classpath/>
                                
<argument>com.sun.btrace.compiler.Compiler</argument>
                                <argument>-d</argument>
                                <argument>${basedir}/target/classes/</argument>
                                
<argument>${basedir}/src/main/resources/scripts/TraceScript.java</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

https://github.com/btraceio/btrace/blob/master/benchmark/pom.xml

does this answer your question?
Martin


----------------------------------------
> To: [email protected]
> From: [email protected]
> Subject: Mojos that instrument classes
> Date: Thu, 15 Sep 2016 01:45:22 -0700
>
> What should the defaultPhase be for a Maven plugin that instruments
> classes? Should it be PROCESS_CLASSES / PROCESS_TEST_CLASSES, or should
> it be COMPILE / TEST_COMPILE?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>                                         
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to