1 package org.apache.maven.plugins.ear;
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.plugins.ear.util.ArtifactRepository;
23 import org.apache.maven.plugins.ear.util.ArtifactTypeMappingService;
24 import org.apache.maven.project.MavenProject;
25
26
27
28
29
30
31 public class EarExecutionContext
32 {
33 private String defaultLibBundleDir;
34
35 private JbossConfiguration jbossConfiguration;
36
37 private String outputFileNameMapping;
38
39 private ArtifactRepository artifactRepository;
40
41
42
43
44
45
46
47
48
49 public EarExecutionContext( MavenProject project, String mainArtifactId, String defaultLibBundleDir,
50 JbossConfiguration jbossConfiguration, String fileNameMappingName,
51 ArtifactTypeMappingService typeMappingService )
52 {
53 initialize( project, mainArtifactId, defaultLibBundleDir, jbossConfiguration, fileNameMappingName,
54 typeMappingService );
55
56 }
57
58
59
60
61 public String getDefaultLibBundleDir()
62 {
63 return defaultLibBundleDir;
64 }
65
66
67
68
69 public boolean isJbossConfigured()
70 {
71 return jbossConfiguration != null;
72 }
73
74
75
76
77 public String getOutputFileNameMapping()
78 {
79 return outputFileNameMapping;
80 }
81
82
83
84
85 public ArtifactRepository getArtifactRepository()
86 {
87 return artifactRepository;
88 }
89
90 private void initialize( MavenProject project, String mainArtifactId, String defaultLibBundleDir,
91 JbossConfiguration jbossConfiguration, String outputFileNameMapping,
92 ArtifactTypeMappingService typeMappingService )
93 {
94 this.artifactRepository = new ArtifactRepository( project.getArtifacts(), mainArtifactId, typeMappingService );
95 this.defaultLibBundleDir = defaultLibBundleDir;
96 this.jbossConfiguration = jbossConfiguration;
97 this.outputFileNameMapping = outputFileNameMapping;
98 }
99 }