maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Daniels <cjdanie...@gmail.com>
Subject Re: aspectj
Date Mon, 01 Aug 2005 22:48:05 GMT
Nothing is wrong with the build. You can ignore the message.
Unfortunately, the message is an internal AspectJ message that cannot
be avoided, at least not as far as I am aware. I suppose you could
create a copy of aspecjtrt-1.2.jar in your maven local repository and
name the copy aspectjrt.jar, then add <jar>aspectjrt.jar</jar> to your
aspectj dependency. Perhaps that would satisfy the internals of
AspectJ so that is does not generate that annoying message. However,
this approach is not exactly convenient since it would require all of
your team members to do the same manual step of renaming the jar file
in the repository.

On 8/1/05, Torsten Curdt <tcurdt@apache.org> wrote:
> 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
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message