1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package io.wcm.devops.conga.tooling.maven.plugin.util;
21
22 import java.util.List;
23 import java.util.Map;
24
25 import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
26 import org.apache.maven.execution.MavenSession;
27 import org.apache.maven.plugin.logging.Log;
28 import org.apache.maven.project.MavenProject;
29 import org.eclipse.aether.RepositorySystem;
30 import org.eclipse.aether.RepositorySystemSession;
31 import org.eclipse.aether.repository.RemoteRepository;
32 import org.sonatype.plexus.build.incremental.BuildContext;
33
34
35
36
37 public final class MavenContext {
38
39 private MavenProject project;
40 private MavenSession session;
41 private org.apache.maven.repository.RepositorySystem repositorySystem;
42 private ResolutionErrorHandler resolutionErrorHandler;
43 private BuildContext buildContext;
44 private Log log;
45 private RepositorySystem repoSystem;
46 private RepositorySystemSession repoSession;
47 private List<RemoteRepository> remoteRepos;
48 private Map<String, String> artifactTypeMappings;
49
50
51
52
53 public MavenProject getProject() {
54 return this.project;
55 }
56
57
58
59
60
61 public MavenContext project(MavenProject value) {
62 this.project = value;
63 return this;
64 }
65
66
67
68
69 public MavenSession getSession() {
70 return this.session;
71 }
72
73
74
75
76
77 public MavenContext session(MavenSession value) {
78 this.session = value;
79 return this;
80 }
81
82
83
84
85 public org.apache.maven.repository.RepositorySystem getRepositorySystem() {
86 return this.repositorySystem;
87 }
88
89
90
91
92
93 public MavenContext setRepositorySystem(org.apache.maven.repository.RepositorySystem value) {
94 this.repositorySystem = value;
95 return this;
96 }
97
98
99
100
101 public ResolutionErrorHandler getResolutionErrorHandler() {
102 return this.resolutionErrorHandler;
103 }
104
105
106
107
108
109 public MavenContext resolutionErrorHandler(ResolutionErrorHandler value) {
110 this.resolutionErrorHandler = value;
111 return this;
112 }
113
114
115
116
117 public BuildContext getBuildContext() {
118 return this.buildContext;
119 }
120
121
122
123
124
125 public MavenContext buildContext(BuildContext value) {
126 this.buildContext = value;
127 return this;
128 }
129
130
131
132
133 public Log getLog() {
134 return this.log;
135 }
136
137
138
139
140
141 public MavenContext log(Log value) {
142 this.log = value;
143 return this;
144 }
145
146
147
148
149 public RepositorySystem getRepoSystem() {
150 return this.repoSystem;
151 }
152
153
154
155
156
157 public MavenContext repoSystem(RepositorySystem value) {
158 this.repoSystem = value;
159 return this;
160 }
161
162
163
164
165 public RepositorySystemSession getRepoSession() {
166 return this.repoSession;
167 }
168
169
170
171
172
173 public MavenContext repoSession(RepositorySystemSession value) {
174 this.repoSession = value;
175 return this;
176 }
177
178
179
180
181 public List<RemoteRepository> getRemoteRepos() {
182 return this.remoteRepos;
183 }
184
185
186
187
188
189 public MavenContext remoteRepos(List<RemoteRepository> value) {
190 this.remoteRepos = value;
191 return this;
192 }
193
194
195
196
197 public Map<String, String> getArtifactTypeMappings() {
198 return this.artifactTypeMappings;
199 }
200
201
202
203
204
205 public MavenContext artifactTypeMappings(Map<String, String> value) {
206 this.artifactTypeMappings = value;
207 return this;
208 }
209
210 }