Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ShadeRequest |
|
| 1.0;1 |
1 | package org.apache.maven.plugins.shade; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import org.apache.maven.plugins.shade.filter.Filter; | |
23 | import org.apache.maven.plugins.shade.relocation.Relocator; | |
24 | import org.apache.maven.plugins.shade.resource.ResourceTransformer; | |
25 | ||
26 | import java.io.File; | |
27 | import java.util.List; | |
28 | import java.util.Set; | |
29 | ||
30 | /** | |
31 | * Parameter object used to pass multitude of args to Shader.shade() | |
32 | * @since 2.0 | |
33 | */ | |
34 | 14 | public class ShadeRequest |
35 | { | |
36 | ||
37 | private Set<File> jars; | |
38 | ||
39 | private File uberJar; | |
40 | ||
41 | private List<Filter> filters; | |
42 | ||
43 | private List<Relocator> relocators; | |
44 | ||
45 | private List<ResourceTransformer> resourceTransformers; | |
46 | ||
47 | private boolean shadeSourcesContent; | |
48 | ||
49 | public Set<File> getJars() | |
50 | { | |
51 | 14 | return jars; |
52 | } | |
53 | ||
54 | /** | |
55 | * Which jars to shade. | |
56 | * | |
57 | * @param jars | |
58 | */ | |
59 | public void setJars( Set<File> jars ) | |
60 | { | |
61 | 14 | this.jars = jars; |
62 | 14 | } |
63 | ||
64 | public File getUberJar() | |
65 | { | |
66 | 28 | return uberJar; |
67 | } | |
68 | ||
69 | /** | |
70 | * Output jar. | |
71 | * | |
72 | * @param uberJar | |
73 | */ | |
74 | public void setUberJar( File uberJar ) | |
75 | { | |
76 | 14 | this.uberJar = uberJar; |
77 | 14 | } |
78 | ||
79 | public List<Filter> getFilters() | |
80 | { | |
81 | 38 | return filters; |
82 | } | |
83 | ||
84 | /** | |
85 | * The filters. | |
86 | * | |
87 | * @param filters | |
88 | */ | |
89 | public void setFilters( List<Filter> filters ) | |
90 | { | |
91 | 14 | this.filters = filters; |
92 | 14 | } |
93 | ||
94 | public List<Relocator> getRelocators() | |
95 | { | |
96 | 136 | return relocators; |
97 | } | |
98 | ||
99 | /** | |
100 | * The relocators. | |
101 | * | |
102 | * @param relocators | |
103 | */ | |
104 | public void setRelocators( List<Relocator> relocators ) | |
105 | { | |
106 | 14 | this.relocators = relocators; |
107 | 14 | } |
108 | ||
109 | public List<ResourceTransformer> getResourceTransformers() | |
110 | { | |
111 | 14 | return resourceTransformers; |
112 | } | |
113 | ||
114 | /** | |
115 | * The transformers. | |
116 | * | |
117 | * @param resourceTransformers | |
118 | */ | |
119 | public void setResourceTransformers( List<ResourceTransformer> resourceTransformers ) | |
120 | { | |
121 | 14 | this.resourceTransformers = resourceTransformers; |
122 | 14 | } |
123 | ||
124 | public boolean isShadeSourcesContent() | |
125 | { | |
126 | 122 | return shadeSourcesContent; |
127 | } | |
128 | ||
129 | /** | |
130 | * When true, it will attempt to shade the contents of the java source files when creating the sources jar. | |
131 | * When false, it will just relocate the java source files to the shaded paths, but will not modify the | |
132 | * actual contents of the java source files. | |
133 | * | |
134 | * @param shadeSourcesContent | |
135 | */ | |
136 | public void setShadeSourcesContent( boolean shadeSourcesContent ) | |
137 | { | |
138 | 0 | this.shadeSourcesContent = shadeSourcesContent; |
139 | 0 | } |
140 | } |