Bug 157335 - "AspecjtJ Runtime error:couldn't find aspectjrt.jar on classpath" in a Maven 2 project
Summary: "AspecjtJ Runtime error:couldn't find aspectjrt.jar on classpath" in a Maven ...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 11:31 EDT by Martin Börlin CLA
Modified: 2006-09-18 05:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Börlin CLA 2006-09-14 11:31:14 EDT
An Eclipse project (with maven2Nature, ajnature and javanature) with a Maven 2 defined dependency for Aspectjrt.jar version 1.5.2. 
scenario 1)
When starting Eclipse a build of the workspace starts (Build automatically is CHECKED). A pop-up with the following content is shown:

AspectJ Warning
AspecjtJ Runtime error:couldn't find aspectjrt.jar on classpath, checked: 
[some paths on disc, NOT including any Maven 2 defined dependencies]
Please place a valid aspectjrt.jar on the classpath

When trying to build again (after clicking the OK-button and the first build is done) everything works fine, i.e. no warning pop-up and my aspects seem ok.

scenario 2) 
When starting Eclipse (Build automatically is UNCHECKED) and try to build everything works fine.

My guess is that the Aspectj compiler starts compiling before the complete java build path has been loaded via the Maven 2 pom-files

Regards
-Martin Börlin

I'm using the following:
Eclipse
  Version: 3.1.2
  Build id: M20060118-1600
AJDT
  Version: 1.3.2
  Build id: 20060804095248
AspectJ 
  Version: 1.5.2
Maven 2
  Version 2.0.4
Comment 1 Helen Beeken CLA 2006-09-15 09:07:32 EDT
This may be related to bug 112098 and the problems with the checking of where aspectjrt.jar is. Has your scenario worked before on dev builds of AspectJ? If it has then it's more than likely the same problem. The latest AJDT dev build contains a fix for this. Are you able to download this and try it?
Comment 2 Martin Börlin CLA 2006-09-18 05:01:46 EDT
I downloaded the AJDT dev build 1.4.1.200609141031 for Eclipse 3.2, opened my project in Eclipse 3.2.0 (build M20060629-1905) and everything works fine!

thanks
Comment 3 Helen Beeken CLA 2006-09-18 05:42:46 EDT
Thanks Martin for trying the latest AJDT dev build :-) Since everything's ok now I'm closing this bug.