1 package org.apache.maven.plugin.announcement;
2
3 import org.apache.maven.plugin.AbstractMojo;
4 import org.apache.maven.execution.MavenSession;
5
6
7
8
9
10
11
12 public abstract class AbstractAnnouncementMojo extends AbstractMojo {
13
14
15
16
17
18
19
20 protected String basedir;
21
22
23
24
25
26
27
28
29
30 protected MavenSession mavenSession;
31
32
33
34
35
36
37
38
39
40 protected boolean runOnlyAtExecutionRoot;
41
42
43
44
45
46
47
48 protected boolean isThisTheExecutionRoot()
49 {
50 getLog().debug( "Root Folder:" + mavenSession.getExecutionRootDirectory() );
51 getLog().debug( "Current Folder:" + basedir );
52 boolean result = mavenSession.getExecutionRootDirectory().equalsIgnoreCase( basedir.toString() );
53 if ( result )
54 {
55 getLog().debug( "This is the execution root." );
56 }
57 else
58 {
59 getLog().debug( "This is NOT the execution root." );
60 }
61 return result;
62 }
63 }