31
31
</dependency >
32
32
</dependencies >
33
33
34
+ <build >
35
+ <plugins >
36
+
37
+ <plugin >
38
+ <groupId >org.apache.maven.plugins</groupId >
39
+ <artifactId >maven-shade-plugin</artifactId >
40
+ <version >3.0.0</version >
41
+ <executions >
42
+ <execution >
43
+ <phase >package</phase >
44
+ <goals >
45
+ <goal >shade</goal >
46
+ </goals >
47
+ <configuration >
48
+ <transformers >
49
+
50
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
51
+ <!-- The service transformer is needed to merge META-INF/services files -->
52
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
53
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
54
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
55
+ <resource >reference.conf</resource >
56
+ </transformer >
57
+
58
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.XmlAppendingTransformer" >
59
+ <resource >core-default.xml</resource >
60
+ </transformer >
61
+
62
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.XmlAppendingTransformer" >
63
+ <resource >core-site.xml</resource >
64
+ </transformer >
65
+
66
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.XmlAppendingTransformer" >
67
+ <resource >yarn-default.xml</resource >
68
+ </transformer >
69
+
70
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.XmlAppendingTransformer" >
71
+ <resource >mapred-default.xml</resource >
72
+ </transformer >
73
+
74
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.XmlAppendingTransformer" >
75
+ <resource >mapred-site.xml</resource >
76
+ </transformer >
77
+ </transformers >
78
+
79
+ <filters >
80
+ <filter >
81
+ <artifact >*:*</artifact >
82
+ <excludes >
83
+ <exclude >META-INF/*.SF</exclude >
84
+ <exclude >META-INF/*.DSA</exclude >
85
+ <exclude >META-INF/*.RSA</exclude >
86
+ </excludes >
87
+ </filter >
88
+ </filters >
89
+ </configuration >
90
+ </execution >
91
+ </executions >
92
+ </plugin >
93
+
94
+ <plugin >
95
+ <artifactId >maven-antrun-plugin</artifactId >
96
+ <version >1.2</version >
97
+ <executions >
98
+ <execution >
99
+ <id >copy-resources</id >
100
+ <!-- here the phase you need -->
101
+ <phase >package</phase >
102
+ <goals >
103
+ <goal >run</goal >
104
+ </goals >
105
+ <configuration >
106
+ <tasks >
107
+ <copy todir =" ${basedir}/../lib/" >
108
+ <fileset dir =" target/" >
109
+ <include name =" ${project.name}-${project.version}.jar" />
110
+ </fileset >
111
+ </copy >
112
+ </tasks >
113
+ </configuration >
114
+ </execution >
115
+ </executions >
116
+ </plugin >
117
+ </plugins >
118
+ </build >
34
119
</project >
0 commit comments