1 package org.apache.maven.plugin.war.stub;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.model.Organization;
23 import org.apache.maven.project.MavenProject;
24
25 import java.io.File;
26 import java.util.HashSet;
27 import java.util.Properties;
28 import java.util.Set;
29
30
31
32
33 public class MavenProjectBasicStub
34 extends MavenProject
35 {
36 protected String testRootDir;
37
38 protected Properties properties;
39
40 public MavenProjectBasicStub()
41 throws Exception
42 {
43 super( new ModelStub() );
44 properties = new Properties();
45 }
46
47 public Set getArtifacts()
48 {
49 return new HashSet();
50 }
51
52 public String getName()
53 {
54 return "Test Project ";
55 }
56
57 public File getBasedir()
58 {
59
60
61
62 return null;
63 }
64
65 public String getGroupId()
66 {
67 return "org.apache.maven.plugin.test";
68 }
69
70 public String getArtifactId()
71 {
72 return "maven-war-plugin-test";
73 }
74
75 public String getPackaging()
76 {
77 return "jar";
78 }
79
80 public String getVersion()
81 {
82 return "0.0-Test";
83 }
84
85 public void addProperty( String key, String value )
86 {
87 properties.put( key, value );
88 }
89
90 public Properties getProperties()
91 {
92 return properties;
93 }
94
95 public String getDescription()
96 {
97 return "Test Description";
98 }
99
100 public Organization getOrganization()
101 {
102 return new Organization()
103 {
104 public String getName()
105 {
106 return "Test Name";
107 }
108 };
109 }
110
111 }