1 package org.codehaus.mojo.aspectj;
2
3 /**
4 * The MIT License
5 *
6 * Copyright 2005-2006 The Codehaus.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 * this software and associated documentation files (the "Software"), to deal in
10 * the Software without restriction, including without limitation the rights to
11 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 * of the Software, and to permit persons to whom the Software is furnished to do
13 * so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in all
16 * copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
27 import java.io.File;
28
29 import org.apache.maven.plugin.AbstractMojo;
30 import org.apache.maven.project.MavenProject;
31
32 /**
33 * The base class.
34 *
35 * @author Juraj Burian
36 * @version $Revision: 14246 $ by $Author: rfscholte $
37 */
38 public abstract class AbstractAjcMojo extends AbstractMojo
39 {
40 /**
41 * The maven project.
42 *
43 * @parameter default-value="${project}"
44 * @required
45 * @readonly
46 */
47 protected MavenProject project;
48
49 /**
50 * The basedir of the project.
51 *
52 * @parameter default-value="${basedir}"
53 * @required
54 * @readonly
55 */
56 protected File basedir;
57
58 /**
59 * List of of modules to weave (into target directory). Corresponds to <code>ajc
60 * -inpath</code> option (or <code>-injars</code> for pre-1.2 (which is not supported)).
61 *
62 * @parameter
63 */
64 protected Module[] weaveDependencies;
65
66 /**
67 * List of of directories with .class files to weave (into target directory).
68 * Corresponds to <code>ajc -inpath</code> option .
69 *
70 * @parameter
71 * @since 1.4
72 */
73 protected String[] weaveDirectories;
74
75 /**
76 * Weave binary aspects from the jars.
77 * The aspects should have been output by the same version of the compiler.
78 * The modules must also be dependencies of the project.
79 * Corresponds to <code>ajc -aspectpath</code> option
80 *
81 * @parameter
82 */
83 protected Module[] aspectLibraries;
84
85 /**
86 * Skip plugin execution.
87 *
88 * @parameter default-value="false" expression="${aspectj.skip}"
89 */
90 private boolean skip;
91
92 /**
93 *
94 * @return <code>true</code> if execution should be skipped, otherwise <code>false</code>
95 */
96 protected final boolean isSkip()
97 {
98 return skip;
99 }
100
101 }