ÿþcvs server: Diffing . Index: plugin.jelly =================================================================== RCS file: /home/cvspublic/maven-plugins/aspectj/plugin.jelly,v retrieving revision 1.11 diff -u -r1.11 plugin.jelly --- plugin.jelly 10 May 2004 18:23:05 -0000 1.11 +++ plugin.jelly 15 May 2004 18:00:16 -0000 @@ -74,14 +74,9 @@ </j:forEach> </j:if> - <j:choose> - <j:when test="${(aspectSourcesPresent == 'true') || (aspectLibrariesPresent == 'true')}"> - <j:set var="shouldWeave" value="true"/> - </j:when> - <j:otherwise> - <echo>No Aspects to weave</echo> - </j:otherwise> - </j:choose> + <j:if test="${(aspectSourcesPresent == 'true') || (aspectLibrariesPresent == 'true')}"> + <j:set var="shouldWeave" value="true"/> + </j:if> </goal> @@ -93,11 +88,12 @@ <goal name="aspectj:compile" prereqs="aspectj:init" description="Weave with AspectJ"> - <j:if test="${shouldWeave == 'true'}"> + <j:choose> + + <j:when test="${shouldWeave == 'true'}"> - <ant:iajc + <ant:iajc fork="${maven.aspectj.fork}" - maxmem="${maven.aspectj.maxmem}" incremental="${maven.aspectj.incremental}" destDir="${maven.build.dest}" sourceRootCopyFilter="${maven.aspectj.sourceRootCopyFilter}" @@ -105,44 +101,57 @@ emacssym="${maven.aspectj.emacssym}" verbose="${maven.aspectj.verbose}"> - <ant:sourceroots> - <ant:path refid="maven.compile.src.set"/> - <j:if test="${aspectSourcesPresent == 'true'}"> - <ant:pathelement location="${pom.build.aspectSourceDirectory}"/> + <j:if test="${context.getVariable('maven.aspectj.fork') == true}"> + <j:if test="${context.getVariable('maven.aspectj.maxmem') != null}"> + <ant:setProperty name="maxmem" value="${maven.aspectj.maxmem}" /> + </j:if> </j:if> - </ant:sourceroots> - <ant:classpath> - <ant:path refid="maven.dependency.classpath"/> - <ant:pathelement path="${plugin.getDependencyPath('aspectj:aspectjrt')}"/> - <ant:pathelement path="${maven.build.dest}"/> - </ant:classpath> - - <!-- Look for aspect libraries to use for weaving --> - <ant:aspectpath> - <j:forEach var="artifact" items="${pom.artifacts}"> - <j:set var="dep" value="${artifact.dependency}"/> - <j:if test="${dep.getProperty('aspectj.weaveWith')=='true'}"> - <ant:echo>Weaving with: ${dep.artifactId}</ant:echo> - <ant:pathelement location="${artifact.path}"/> + <ant:sourceroots> + <ant:path refid="maven.compile.src.set"/> + <j:if test="${aspectSourcesPresent == 'true'}"> + <ant:pathelement location="${pom.build.aspectSourceDirectory}"/> </j:if> - </j:forEach> - </ant:aspectpath> + </ant:sourceroots> - <!-- Look for libraries for weaving into --> - <ant:inpath> - <j:forEach var="artifact" items="${pom.artifacts}"> - <j:set var="dep" value="${artifact.dependency}"/> - <j:if test="${dep.getProperty('aspectj.weaveInto')=='true'}"> - <ant:echo>Weaving into: ${dep.artifactId}</ant:echo> - <ant:pathelement location="${artifact.path}"/> - </j:if> - </j:forEach> - </ant:inpath> + <ant:classpath> + <ant:path refid="maven.dependency.classpath"/> + <ant:pathelement path="${plugin.getDependencyPath('aspectj:aspectjrt')}"/> + <ant:pathelement path="${maven.build.dest}"/> + </ant:classpath> + + <!-- Look for aspect libraries to use for weaving --> + <ant:aspectpath> + <j:forEach var="artifact" items="${pom.artifacts}"> + <j:set var="dep" value="${artifact.dependency}"/> + <j:if test="${dep.getProperty('aspectj.weaveWith')=='true'}"> + <ant:echo>Weaving with: ${dep.artifactId}</ant:echo> + <ant:pathelement location="${artifact.path}"/> + </j:if> + </j:forEach> + </ant:aspectpath> + + <!-- Look for libraries for weaving into --> + <ant:inpath> + <j:forEach var="artifact" items="${pom.artifacts}"> + <j:set var="dep" value="${artifact.dependency}"/> + <j:if test="${dep.getProperty('aspectj.weaveInto')=='true'}"> + <ant:echo>Weaving into: ${dep.artifactId}</ant:echo> + <ant:pathelement location="${artifact.path}"/> + </j:if> + </j:forEach> + </ant:inpath> - </ant:iajc> + </ant:iajc> + + </j:when> + + <j:otherwise> + <ant:echo>Nothing to weave.</ant:echo> + </j:otherwise> + + </j:choose> - </j:if> </goal> </project> Index: plugin.properties =================================================================== RCS file: /home/cvspublic/maven-plugins/aspectj/plugin.properties,v retrieving revision 1.5 diff -u -r1.5 plugin.properties --- plugin.properties 10 May 2004 18:23:05 -0000 1.5 +++ plugin.properties 15 May 2004 18:00:16 -0000 @@ -44,4 +44,4 @@ # The maximum memory to use for the new VM when fork is true. Values should # have the same form as accepted by the VM, e.g., "128m". -maven.aspectj.maxmem = 128m +#maven.aspectj.maxmem = 128m cvs server: Diffing announcements cvs server: Diffing src cvs server: Diffing src/plugin-test cvs server: Diffing src/plugin-test/src cvs server: Diffing src/plugin-test/src/aspect cvs server: Diffing src/plugin-test/src/aspect/org cvs server: Diffing src/plugin-test/src/aspect/org/apache cvs server: Diffing src/plugin-test/src/aspect/org/apache/maven cvs server: Diffing src/plugin-test/src/aspect/org/apache/maven/aspectj cvs server: Diffing src/plugin-test/src/main cvs server: Diffing src/plugin-test/src/main/org cvs server: Diffing src/plugin-test/src/main/org/apache cvs server: Diffing src/plugin-test/src/main/org/apache/maven cvs server: Diffing src/plugin-test/src/main/org/apache/maven/aspectj cvs server: Diffing src/plugin-test/src/test cvs server: Diffing src/plugin-test/src/test/org cvs server: Diffing src/plugin-test/src/test/org/apache cvs server: Diffing src/plugin-test/src/test/org/apache/maven cvs server: Diffing src/plugin-test/src/test/org/apache/maven/aspectj cvs server: Diffing xdocs Index: xdocs/index.xml =================================================================== RCS file: /home/cvspublic/maven-plugins/aspectj/xdocs/index.xml,v retrieving revision 1.4 diff -u -r1.4 index.xml --- xdocs/index.xml 7 May 2004 19:19:10 -0000 1.4 +++ xdocs/index.xml 15 May 2004 18:00:16 -0000 @@ -45,11 +45,21 @@ document. </p> </section> + <section name="Installing"> <p> To install or update the plugin do the following:<br/> <code>maven plugin:download -DgroupId=maven -DartifactId=maven-aspectj-plugin -Dversion=&lt;version&gt;</code> </p> + </section> + + <section name="Compiling aspect sources"> + <p>You must add the property aspectSourceDirectory in your project.xml</p> + <source> + <![CDATA[ + <aspectSourceDirectory>src/aspectj</aspectSourceDirectory> + ]]> + </source> </section> <section name="Using aspects from other libraries"> Index: xdocs/properties.xml =================================================================== RCS file: /home/cvspublic/maven-plugins/aspectj/xdocs/properties.xml,v retrieving revision 1.7 diff -u -r1.7 properties.xml --- xdocs/properties.xml 10 May 2004 18:23:05 -0000 1.7 +++ xdocs/properties.xml 15 May 2004 18:00:16 -0000 @@ -103,7 +103,7 @@ <td> The maximum memory to use for the new VM when fork is true. Values should have the same form as accepted by the VM, e.g., "128m". - Default <code>128m</code> + By default it's not set </td> </tr>