Skip to content

Commit 0cfbdeb

Browse files
POM updated to create shaded jar containing all the required dependenices
1 parent 0f86f7f commit 0cfbdeb

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.sts.allprogtutorials.apachezookeeper</groupId>
5+
<artifactId>leader-election</artifactId>
6+
<name>Leader Election</name>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<build>
9+
<plugins>
10+
<plugin>
11+
<artifactId>maven-compiler-plugin</artifactId>
12+
<version>3.3</version>
13+
<configuration>
14+
<source>1.7</source>
15+
<target>1.7</target>
16+
</configuration>
17+
</plugin>
18+
<plugin>
19+
<artifactId>maven-shade-plugin</artifactId>
20+
<version>2.3</version>
21+
<executions>
22+
<execution>
23+
<phase>package</phase>
24+
<goals>
25+
<goal>shade</goal>
26+
</goals>
27+
</execution>
28+
</executions>
29+
</plugin>
30+
<plugin>
31+
<artifactId>maven-jar-plugin</artifactId>
32+
<configuration>
33+
<archive>
34+
<manifest>
35+
<addClasspath>true</addClasspath>
36+
<mainClass>com.sts.allprogtutorials.zk.leaderelection.main.LeaderElectionLauncher</mainClass>
37+
</manifest>
38+
</archive>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
</project>
44+

apache-zookeeper/leader-election/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@
3939
</execution>
4040
</executions>
4141
</plugin>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-jar-plugin</artifactId>
45+
<configuration>
46+
<archive>
47+
<manifest>
48+
<addClasspath>true</addClasspath>
49+
<mainClass>com.sts.allprogtutorials.zk.leaderelection.main.LeaderElectionLauncher</mainClass>
50+
</manifest>
51+
</archive>
52+
</configuration>
53+
</plugin>
4254
</plugins>
4355
</build>
4456
</project>

0 commit comments

Comments
 (0)