1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.war.stub;
20
21 import java.io.File;
22
23
24
25
26 public class WarArtifactStub extends AbstractArtifactStub {
27
28 private String groupId;
29
30 private String artifactId;
31
32 private String classifier;
33
34 private File file;
35
36 public WarArtifactStub(String _basedir) {
37 super(_basedir);
38 }
39
40 public String getType() {
41 return "war";
42 }
43
44 public String getArtifactId() {
45 if (artifactId == null) {
46 return "simple";
47 } else {
48 return artifactId;
49 }
50 }
51
52 public void setArtifactId(String _artifactId) {
53 artifactId = _artifactId;
54 }
55
56 public String getGroupId() {
57 if (groupId == null) {
58 return "wartests";
59 } else {
60 return groupId;
61 }
62 }
63
64 public void setGroupId(String groupId) {
65 this.groupId = groupId;
66 }
67
68 public File getFile() {
69 if (file == null) {
70 return new File(basedir, "/target/test-classes/unit/sample_wars/simple.war");
71 } else {
72 return file;
73 }
74 }
75
76 public void setFile(File _file) {
77 file = _file;
78 }
79
80 public String getClassifier() {
81 return classifier;
82 }
83
84 public void setClassifier(String classifier) {
85 this.classifier = classifier;
86 }
87
88 public boolean hasClassifier() {
89 return classifier != null;
90 }
91 }