1 /*
2 * Copyright (C) 2016 Ronald Jack Jenkins Jr.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package info.ronjenkins.maven.rtr;
17
18 import org.apache.commons.lang.Validate;
19 import org.apache.maven.project.ProjectBuilder;
20
21 /**
22 * Components needed throughout the Smart Reactor that can't be accessed
23 * directly via Plexus.
24 *
25 * @author Ronald Jack Jenkins Jr.
26 */
27 // TODO: work on eliminating this class if possible.
28 public final class RTRComponents {
29 private final ProjectBuilder projectBuilder;
30
31 /**
32 * Constructor.
33 *
34 * @param projectBuilder
35 * not null.
36 */
37 public RTRComponents(final ProjectBuilder projectBuilder) {
38 Validate.notNull(projectBuilder, "Project builder is null");
39 this.projectBuilder = projectBuilder;
40 }
41
42 /**
43 * Returns the shared project builder.
44 *
45 * @return never null.
46 */
47 public ProjectBuilder getProjectBuilder() {
48 return this.projectBuilder;
49 }
50 }