Maven Antrun Plugin Usage

07-06-2015

Maven Antrun plugin usage as follows:

<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.3</version>
    <executions>
        <execution>
            <id>Hibernate bytecode optimization</id>
            <phase>process-classes</phase>
            <configuration>
                <tasks>
                    <taskdef name="instrument"  classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
                        <classpath>
                            <path refid="maven.dependency.classpath" />
                            <path refid="maven.plugin.classpath" />
                        </classpath>
                    </taskdef>
                    <instrument verbose="true">
                        <fileset dir="${project.build.outputDirectory}">
                            <include name="**/*.class" />
                            <exclude name="**/I*_.class,**/WebPageObject.class" />
                        </fileset>
                    </instrument>
                </tasks>
            </configuration>

            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>

© 2019 All rights reserved. Codesenior.COM