git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114508 13f79535-47bb-0310-9956-ffa450edef68
101 lines
3.6 KiB
XML
101 lines
3.6 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
=============================================================================
|
|
AspectWerkz plugin for Maven.
|
|
=============================================================================
|
|
-->
|
|
<project
|
|
xmlns:ant="jelly:ant"
|
|
xmlns:j="jelly:core"
|
|
xmlns:util="jelly:util">
|
|
|
|
<!--
|
|
========================================================================
|
|
Init.
|
|
========================================================================
|
|
-->
|
|
<goal name="aspectwerkz:init">
|
|
|
|
<ant:mkdir dir="${maven.build.dir}"/>
|
|
|
|
<path id="classpath.main">
|
|
<ant:pathelement location="${maven.dependency.classpath}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('aspectwerkz:aspectwerkz')}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('dom4j:dom4j')}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('trove:trove')}"/>
|
|
</path>
|
|
|
|
</goal>
|
|
|
|
<!--
|
|
========================================================================
|
|
Compile AW javadoc attributes.
|
|
========================================================================
|
|
-->
|
|
<goal name="aspectwerkz:attributec" prereqs="aspectwerkz:init"
|
|
description="Compile AspectWerkz javadoc attributes">
|
|
|
|
<!-- TODO: only run attributeC if sources are newer than target
|
|
XML definition file -->
|
|
|
|
<ant:java dir="${maven.build.dir}" failonerror="true" fork="true"
|
|
classname="org.codehaus.aspectwerkz.metadata.AttributeC">
|
|
|
|
<ant:sysproperty key="aspectwerkz.definition.validate"
|
|
value="${maven.aspectwerkz.definition.validate}"/>
|
|
|
|
<ant:arg file="${maven.aspectwerkz.src.dir}"/>
|
|
<ant:arg file="${maven.aspectwerkz.build.definition.file}"/>
|
|
<j:if test="${context.getVariable('maven.aspectwerkz.definition.merge.file') != null}">
|
|
<ant:arg line="-m ${maven.aspectwerkz.definition.merge.file}"/>
|
|
</j:if>
|
|
<j:if test="${context.getVariable('maven.aspectwerkz.uuid') != null}">
|
|
<ant:arg line="-u ${maven.aspectwerkz.uuid}"/>
|
|
</j:if>
|
|
|
|
<ant:classpath>
|
|
<ant:path refid="classpath.main"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('qdox:qdox')}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('jrexx:jrexx')}"/>
|
|
</ant:classpath>
|
|
|
|
</ant:java>
|
|
|
|
</goal>
|
|
|
|
<!--
|
|
========================================================================
|
|
Tranform source code by weaving aspects to them (offline mode).
|
|
========================================================================
|
|
-->
|
|
<goal name="aspectwerkz:transform"
|
|
prereqs="aspectwerkz:init,aspectwerkz:attributec,java:compile"
|
|
description="Weave aspects to sources (offline mode)">
|
|
|
|
<!-- TODO: Add support for extension classes -->
|
|
|
|
<ant:java dir="${maven.build.dir}" failonerror="true" fork="true"
|
|
classname="org.codehaus.aspectwerkz.compiler.AspectWerkzC">
|
|
|
|
<ant:sysproperty key="aspectwerkz.transform.filter"
|
|
value="${maven.aspectwerkz.transform.filter}"/>
|
|
<ant:sysproperty key="aspectwerkz.definition.file"
|
|
value="${maven.aspectwerkz.definition.file}"/>
|
|
|
|
<ant:arg value="-verify"/>
|
|
<ant:arg file="${maven.build.dest}"/>
|
|
|
|
<ant:classpath>
|
|
<ant:path refid="classpath.main"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('ant:ant')}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('aspectwerkz:aspectwerkz-core')}"/>
|
|
<ant:pathelement location="${plugin.getDependencyPath('bcel:bcel')}"/>
|
|
</ant:classpath>
|
|
|
|
</ant:java>
|
|
|
|
</goal>
|
|
|
|
</project>
|