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 import org.apache.maven.artifact.handler.ArtifactHandler;
24
25
26
27
28 public class XarArtifactStub extends AbstractArtifactStub {
29 protected String groupId;
30
31 private ArtifactHandler artifactHandler;
32
33 public XarArtifactStub(String basedir, ArtifactHandler artifactHandler) {
34 super(basedir);
35 this.artifactHandler = artifactHandler;
36 }
37
38 public void setGroupId(String id) {
39 groupId = id;
40 }
41
42 public String getGroupId() {
43 if (groupId != null) {
44 return groupId;
45 } else {
46 return "org.sample.xar";
47 }
48 }
49
50 public String getType() {
51 return "xar";
52 }
53
54 public String getArtifactId() {
55 return "xarartifact";
56 }
57
58 public File getFile() {
59 return new File(basedir, "/target/test-classes/unit/sample_wars/simple.xar");
60 }
61
62 public ArtifactHandler getArtifactHandler() {
63 return artifactHandler;
64 }
65 }