carlos      2004/06/30 13:12:36

  Modified:    aspectj/xdocs changes.xml
               aspectj  project.xml plugin.jelly
  Log:
  Check that aspectSourceDirectory is defined in pom
  
  Revision  Changes    Path
  1.20      +4 -0      maven-plugins/aspectj/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/aspectj/xdocs/changes.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- changes.xml       29 Jun 2004 08:54:42 -0000      1.19
  +++ changes.xml       30 Jun 2004 20:12:36 -0000      1.20
  @@ -27,6 +27,10 @@
       <author email="[EMAIL PROTECTED]">Carlos Sanchez</author>
     </properties>
     <body>
  +    <release version="3.1.1" date="in CVS">
  +      <action dev="carlos" type="add">Output messages to log</action>
  +      <action dev="carlos" type="fix">Check that aspectSourceDirectory is defined 
in pom</action>
  +    </release>
       <release version="3.1" date="2004-06-20">
         <action dev="carlos" type="add" issue="MPASPECTJ-6">Weave test 
classes</action>
         <action dev="carlos" type="add" issue="MPASPECTJ-10">Added "Compiling aspect 
sources" section to xdoc</action>
  
  
  
  1.42      +6 -1      maven-plugins/aspectj/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/aspectj/project.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- project.xml       29 Jun 2004 08:54:42 -0000      1.41
  +++ project.xml       30 Jun 2004 20:12:36 -0000      1.42
  @@ -23,7 +23,7 @@
     <pomVersion>3</pomVersion>
     <id>maven-aspectj-plugin</id>
     <name>Maven AspectJ Plugin</name>
  -  <currentVersion>3.1</currentVersion>
  +  <currentVersion>3.1.1-SNAPSHOT</currentVersion>
     <description/>
     <shortDescription>AspectJ Plugin for Maven</shortDescription>
     <url>http://maven.apache.org/reference/plugins/aspectj/</url>
  @@ -112,6 +112,11 @@
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>commons-jelly</groupId>
  +      <artifactId>commons-jelly-tags-log</artifactId>
  +      <version>20030211.142821</version>
       </dependency>
     </dependencies>
   </project>
  
  
  
  1.15      +26 -3     maven-plugins/aspectj/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/aspectj/plugin.jelly,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- plugin.jelly      19 Jun 2004 19:14:53 -0000      1.14
  +++ plugin.jelly      30 Jun 2004 20:12:36 -0000      1.15
  @@ -32,6 +32,7 @@
     xmlns:j="jelly:core"
     xmlns:ant="jelly:ant"
     xmlns:define="jelly:define"
  +  xmlns:log="jelly:log"
     xmlns:test="test"
     xmlns:aspectj="aspectj">
   
  @@ -127,11 +128,33 @@
   
       <j:set var="shouldWeave" value="false"/>
   
  -    <!-- Are there aspect sources -->
  -    <ant:available property="aspectSourcesPresent" 
file="${pom.build.aspectSourceDirectory}"/>
  +    <!-- Check if there are aspect sources -->
  +    <j:choose>
  +        <!-- if aspectSourceDirectory is defined in pom -->
  +        <j:when test="${pom.build.aspectSourceDirectory != ''}">
  +            <ant:available property="aspectSourcesPresent" 
file="${pom.build.aspectSourceDirectory}" type="dir"/>
  +            <j:choose>
  +                <!-- if dir exists -->
  +                <j:when test="${aspectSourcesPresent == 'true'}">
  +                    <log:debug>Aspect sources present in directory: 
${pom.build.aspectSourceDirectory}</log:debug>
  +                    <j:set var="aspectSourcesPresent" value="true"/>
  +                </j:when>
  +                <!-- if dir does not exist -->
  +                <j:otherwise>
  +                    <log:error>Aspect source directory does not exist: 
${pom.build.aspectSourceDirectory}</log:error>
  +                    <j:set var="aspectSourcesPresent" value="false"/>
  +                </j:otherwise>
  +            </j:choose>
  +        </j:when>
  +        <!-- if aspectSourceDirectory is not defined in pom -->
  +        <j:otherwise>
  +            <log:info>Aspect source directory not specified</log:info>
  +            <j:set var="aspectSourcesPresent" value="false"/>
  +        </j:otherwise>
  +    </j:choose>
   
       <!-- If there aren't aspect sources check if there are aspect libraries -->
  -    <j:if test="${aspectSourcesPresent == null}">
  +    <j:if test="${aspectSourcesPresent == 'false'}">
         <j:forEach var="artifact" items="${pom.artifacts}">
           <j:set var="dep" value="${artifact.dependency}"/>
           <j:if test="${dep.getProperty('aspectj.weaveWith')=='true' and 
dep.type=='jar'}">
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to