blob: 09b09dba6136d1c44b24a3f93aef033df5e719d6 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Using the aspectpath
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>
<h1>
Using the aspectpath
</h1>
<p>The <b>aspectpath</b> enables aspects from a JAR file or an output directory to
be weaved into a project and the results output to the normal location.</p>
<p>
Using the aspectpath means that you can write your aspects in a different project
and also means that they can be re-used across multiple projects. You may wish to
build an aspect library, using the outjar setting or another method. Alternatively
you can simply add the output directory of your aspect-containing project to the aspectpath.
</p>
<p>
To setup your AspectJ project to use the aspectpath:
<ol>
<li>Select the AspectJ project in the Package Explorer</li>
<li>Right click and select <b>AspectJ Tools &gt; Configure AspectJ Build Path...</b></li>
<li>Select the <b>Aspect Path</b> tab</li>
<li>Add the necessary jar file or class folder (e.g. another project's "bin" directory) using the
<b>Add XXX</b> buttons</li>
<li>Click <b>OK</b> to close the project properties dialog</li>
</ol>
</p>
<p>
Entries added to the aspectpath are also added to the project's Java build path.
</p>
<p><img border="0" width="159" height="27" src="../images/ngrelt.gif" alt="Related tasks"><br>
<a href="aspectpathlaunching.htm">Launching a program with an aspectpath or an outjar</a><br>
<a href="inpath.htm">Using the inpath</a><br>
<a href="addoutjar.htm">Adding an outjar</a><br>
<a href="addaspectpath.htm">Adding an aspectpath</a>
</p>
</body>
</html>