PR: MPASPECTJ-23
Submitted by: Shinobu Kawai Yoshida Add a report for the plugin. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@390215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
xmlns:log="jelly:log"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:doc="doc"
|
||||
xmlns:aspectj="aspectj">
|
||||
|
||||
<!--
|
||||
@@ -213,12 +214,19 @@
|
||||
|
||||
<j:if test="${shouldWeave == 'true'}">
|
||||
|
||||
<!-- For the report -->
|
||||
<ant:mkdir dir="${maven.build.dir}/aspectj" />
|
||||
<ant:record name="${maven.build.dir}/aspectj/compile.txt" action="start" />
|
||||
|
||||
<!-- Weave classes -->
|
||||
<aspectj:compile
|
||||
sourcePathRefid="maven.compile.src.set"
|
||||
classpathRefid="maven.dependency.classpath"
|
||||
destDir="${maven.build.dest}"/>
|
||||
|
||||
<!-- For the report -->
|
||||
<ant:record name="${maven.build.dir}/aspectj/compile.txt" action="stop" />
|
||||
|
||||
</j:if>
|
||||
|
||||
</goal>
|
||||
@@ -251,5 +259,53 @@
|
||||
</j:if>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
<goal name="maven-aspectj-plugin:register" prereqs="aspectj:init">
|
||||
<j:if test="${shouldWeave == 'true'}">
|
||||
|
||||
<doc:registerReport
|
||||
name="AspectJ Compile Report"
|
||||
pluginName="maven-aspectj-plugin"
|
||||
link="aspectj-compile"
|
||||
description="Report on the compilation of AspectJ."/>
|
||||
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="maven-aspectj-plugin:deregister" prereqs="aspectj:init">
|
||||
<j:if test="${shouldWeave == 'true'}">
|
||||
<doc:deregisterReport name="AspectJ Compile Report"/>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="maven-aspectj-plugin:report"
|
||||
description="Generate AspectJ compilation result" prereqs="xdoc:init,aspectj:compile">
|
||||
<j:if test="${shouldWeave == 'true'}">
|
||||
<!-- load file in order to remove absolute paths -->
|
||||
<util:file name="${maven.build.dir}/aspectj/compile.txt" var="inputFileObject"/>
|
||||
<util:loadText var="inputText" file="${inputFileObject}"/>
|
||||
|
||||
<!-- remove [iajc] prefix from rows -->
|
||||
<j:invokeStatic var="inputText" className="org.apache.commons.lang.StringUtils" method="replace">
|
||||
<j:arg type="java.lang.String" value="${inputText}" />
|
||||
<j:arg type="java.lang.String" value=" [iajc] " />
|
||||
<j:arg type="java.lang.String" value="" />
|
||||
</j:invokeStatic>
|
||||
|
||||
<!-- trim path to basedir/ -->
|
||||
<j:set var="pathToTrim">${basedir}${file.separator}</j:set>
|
||||
<j:invokeStatic var="inputText" className="org.apache.commons.lang.StringUtils" method="replace">
|
||||
<j:arg type="java.lang.String" value="${inputText}" />
|
||||
<j:arg type="java.lang.String" value="${pathToTrim}" />
|
||||
<j:arg type="java.lang.String" value="" />
|
||||
</j:invokeStatic>
|
||||
|
||||
<doc:text-xdoc
|
||||
title="AspectJ Report"
|
||||
section="AspectJ Compile Report"
|
||||
inputText="${inputText}"
|
||||
output="${maven.gen.docs}/aspectj-compile.xml"/>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -63,4 +63,9 @@
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<aspectSourceDirectory>src/aspect</aspectSourceDirectory>
|
||||
</build>
|
||||
|
||||
<reports>
|
||||
<report>maven-aspectj-plugin</report>
|
||||
</reports>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="4.0-SNAPSHOT" date="in SVN">
|
||||
<action dev="ltheussl" type="add" issue="MPASPECTJ-23" due-to="Shinobu Kawai Yoshida">Add a report for the plugin.</action>
|
||||
<action dev="carlos" type="update" issue="MPASPECTJ-21">Upgraded to AspectJ 1.5.0</action>
|
||||
<action dev="carlos" type="add" issue="MPASPECTJ-24" due-to="Shinobu Kawai">
|
||||
Added <code>maven.aspectj.failonerror</code> property.
|
||||
|
||||
@@ -47,6 +47,15 @@
|
||||
Weaves project test classes after calling <code>aspectj:compile</code>.
|
||||
</description>
|
||||
</goal>
|
||||
<goal>
|
||||
<name>maven-aspectj-plugin:report</name>
|
||||
<description>
|
||||
Generate report of the result of <code>aspectj:compile</code>.
|
||||
In order to add this report to the site,
|
||||
add the following in the <code><reports></code> section of <code>project.xml</code>:
|
||||
<source><report>maven-aspectj-plugin</report></source>
|
||||
</description>
|
||||
</goal>
|
||||
</goals>
|
||||
</body>
|
||||
</document>
|
||||
|
||||
Reference in New Issue
Block a user