maven-plugins/aspectj/plugin.jelly.1.1.0
jvanzyl 6b86d20c6d o I am adding these which are my attempt to upgrade to 1.1.0 but nothing
seems to be working. I'm sure it's a matter of some configuration or some
  bad information going between Jelly and Ant but I'll hold off for now
  and find a day to upgrade AspectJ properly.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113648 13f79535-47bb-0310-9956-ffa450edef68
2003-07-13 17:10:35 +00:00

135 lines
4.6 KiB
XML

<?xml version="1.0"?>
<project xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:util="jelly:util">
<!--==================================================================-->
<!-- Compile all source code, weaving the Aspects -->
<!--==================================================================-->
<goal name="aspectj"
description="Compile code with AspectJ"
prereqs="aspectj:compile"/>
<goal name="aspectj:compile"
description="Compile code with AspectJ">
<j:if test="${sourcesPresent == 'true'}">
<ant:taskdef
name="ajc"
classname="org.aspectj.tools.ant.taskdefs.AjcTask"/>
<ant:available property="aspectSourcesPresent"
file="${pom.build.aspectSourceDirectory}"/>
<ant:uptodate property="aspectj.compile.notRequired"
targetfile="${maven.build.dir}/${maven.final.name}.jar">
<ant:srcfiles dir="${pom.build.sourceDirectory}"/>
<j:if test="${aspectSourcesPresent == 'true'}">
<ant:srcfiles dir="${pom.build.aspectSourceDirectory}"/>
</j:if>
</ant:uptodate>
<j:set var="aspectjCompileNotRequired" value="${aspectj.compile.notRequired}"/>
<j:if test="${aspectjCompileNotRequired == null}">
<j:set
var="ajcEmacssymFlag"
value="${maven.aspectj.ajc.option.emacssym}"/>
<ant:ajc
destdir="${maven.build.dest}"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}"
emacssym="${ajcEmacssymFlag}">
<ant:src>
<ant:path refid="maven.compile.src.set"/>
<j:if test="${aspectSourcesPresent == 'true'}">
<ant:pathelement location="${pom.build.aspectSourceDirectory}"/>
</j:if>
</ant:src>
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach>
</j:if>
</j:forEach>
<ant:classpath>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
<ant:pathelement path="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
</ant:classpath>
</ant:ajc>
</j:if>
</j:if>
</goal>
<goal name="aspectj:ajdoc" description="Javadoc source using ajdoc">
<j:if test="${sourcesPresent == 'true'}">
<ant:taskdef name="ajdoc" classname="org.aspectj.tools.ant.taskdefs.Ajdoc" />
<ant:available property="aspectSourcesPresent"
file="${pom.build.aspectSourceDirectory}"/>
<!-- retrieve various javadoc plugin vars -->
<util:tokenize var="javadocVarList" delim=",">
maven.javadoc.author,maven.javadoc.destdir,
maven.javadoc.links,maven.javadoc.maxmemory,
maven.javadoc.private,maven.javadoc.stylesheet,
maven.javadoc.use,maven.javadoc.version
</util:tokenize>
<j:forEach var="javadocVar" items="${javadocVarList}">
<j:set var="javadocVar" value="${javadocVar.trim()}" />
<j:set var="${javadocVar}"
value="${pom.getPluginContext('maven-javadoc-plugin').getVariable(javadocVar)}"/>
</j:forEach>
<ant:ajdoc packagenames="${pom.package}.*"
destdir="${maven.javadoc.destdir}"
author="${maven.javadoc.author}"
private="${maven.javadoc.private}"
version="${maven.javadoc.version}"
use="${maven.javadoc.use}"
windowtitle="${title}"
doctitle="${title}"
bottom="${copyright}"
stylesheetfile="${maven.javadoc.stylesheet}">
<j:forEach var="link" items="${links}">
<ant:link href="${link.trim()}"/>
</j:forEach>
<ant:classpath>
<ant:path refid="maven.dependency.classpath"/>
<ant:path location="${maven.build.dest}"/>
<ant:pathelement path="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
</ant:classpath>
<ant:sourcepath>
<ant:path refid="maven.compile.src.set"/>
<j:if test="${aspectSourcesPresent == 'true'}">
<pathelement location="${pom.build.aspectSourceDirectory}"/>
</j:if>
</ant:sourcepath>
</ant:ajdoc>
</j:if>
</goal>
</project>