maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject aspectj
Date Mon, 01 Aug 2005 22:41:58 GMT
Hm... I am currently trying to get aspectj
properly working with maven. Maybe someone here
has an idea what's going on.

I've created a very simple project. A simple
"maven jar" works just fine. Then I've added
the dependency to the aspectj runtime

     <dependency>
       <groupId>aspectj</groupId>
       <artifactId>aspectjrt</artifactId>
       <version>1.2</version>
       <url>http://www.eclipse.org/aspectj</url>
       <properties>
         <war.bundle>true</war.bundle>
       </properties>
     </dependency>

and pointed maven to the aspects

   <build>
     <sourceDirectory>src/java</sourceDirectory>
     <aspectSourceDirectory>src/aspect</aspectSourceDirectory>
   </build>

In the maven.xml I've attached the aspectj
goal to the java:compile goal

   <project>
     <preGoal name="java:compile">
       <attainGoal name="aspectj:compile"/>
     </preGoal>
   </project>

When I call "maven clean jar" I get

  warning couldn't find aspectjrt.jar on classpath, checked:
  compiling [snip]/aop/App.java
  compiling [snip]/aop/logging/LogAspect.aj
  java:compile:
  aspectj:init:
  aspectj:compile:
     [iajc] Copied 1 empty directory to [snip]/target/classes

Strangely enough the generated jar seems to
include the aspects and does work :-/

...but what's wrong with the build?

cheers
--
Torsten

Mime
View raw message