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 java.io.File;
23
24
25
26
27 public class WarArtifactStub
28 extends AbstractArtifactStub
29 {
30
31 private String groupId;
32
33 private String artifactId;
34
35 private String classifier;
36
37 private File file;
38
39 public WarArtifactStub( String _basedir )
40 {
41 super( _basedir );
42 }
43
44 public String getType()
45 {
46 return "war";
47 }
48
49 public String getArtifactId()
50 {
51 if ( artifactId == null )
52 {
53 return "simple";
54 }
55 else
56 {
57 return artifactId;
58 }
59 }
60
61 public void setArtifactId( String _artifactId )
62 {
63 artifactId = _artifactId;
64 }
65
66
67 public String getGroupId()
68 {
69 if ( groupId == null )
70 {
71 return "wartests";
72 }
73 else
74 {
75 return groupId;
76 }
77 }
78
79 public void setGroupId( String groupId )
80 {
81 this.groupId = groupId;
82 }
83
84 public File getFile()
85 {
86 if ( file == null )
87 {
88 return new File( basedir, "/target/test-classes/unit/sample_wars/simple.war" );
89 }
90 else
91 {
92 return file;
93 }
94 }
95
96 public void setFile( File _file )
97 {
98 file = _file;
99 }
100
101 public String getClassifier()
102 {
103 return classifier;
104 }
105
106 public void setClassifier( String classifier )
107 {
108 this.classifier = classifier;
109 }
110
111 public boolean hasClassifier()
112 {
113 return classifier != null;
114 }
115 }