Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

Commit a61af09

Browse files
author
Severi Haverila
committed
use maven-shade to compile library jar with its dependencies
1 parent a507588 commit a61af09

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

example/pom.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<scope>system</scope>
1414
<systemPath>${project.basedir}/lib/image_recognition_library_test.jar</systemPath>
1515
</dependency>
16-
<!--<dependency> <groupId>net.sourceforge.tess4j</groupId> <artifactId>tess4j</artifactId>
17-
<version>3.2.1</version> </dependency> -->
1816
<dependency>
1917
<groupId>ch.qos.logback</groupId>
2018
<artifactId>logback-classic</artifactId>
@@ -35,11 +33,6 @@
3533
<artifactId>slf4j-api</artifactId>
3634
<version>1.7.4</version>
3735
</dependency>
38-
<dependency>
39-
<groupId>opencv</groupId>
40-
<artifactId>opencv</artifactId>
41-
<version>2.4.13</version>
42-
</dependency>
4336
<dependency>
4437
<groupId>org.json</groupId>
4538
<artifactId>json</artifactId>
@@ -55,7 +48,7 @@
5548
<plugins>
5649
<plugin>
5750
<artifactId>maven-compiler-plugin</artifactId>
58-
<version>3.1</version>
51+
<version>3.6.0</version>
5952
<configuration>
6053
<source>1.7</source>
6154
<target>1.7</target>
@@ -64,7 +57,7 @@
6457
<plugin>
6558
<groupId>org.apache.maven.plugins</groupId>
6659
<artifactId>maven-surefire-plugin</artifactId>
67-
<version>2.10</version>
60+
<version>2.19.1</version>
6861
<configuration>
6962
<reportsDirectory>${project.build.directory}/reports/junit</reportsDirectory>
7063
</configuration>

library/pom.xml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
<artifactId>java-client</artifactId>
1919
<version>4.1.2</version>
2020
</dependency>
21-
<dependency>
22-
<groupId>com.testdroid</groupId>
23-
<artifactId>testdroid-api</artifactId>
24-
<version>2.0</version>
25-
</dependency>
2621
<dependency>
2722
<groupId>org.slf4j</groupId>
2823
<artifactId>slf4j-api</artifactId>
@@ -48,7 +43,7 @@
4843
<plugins>
4944
<plugin>
5045
<artifactId>maven-compiler-plugin</artifactId>
51-
<version>3.1</version>
46+
<version>3.6.0</version>
5247
<configuration>
5348
<source>1.7</source>
5449
<target>1.7</target>
@@ -57,11 +52,25 @@
5752
<plugin>
5853
<groupId>org.apache.maven.plugins</groupId>
5954
<artifactId>maven-surefire-plugin</artifactId>
60-
<version>2.10</version>
55+
<version>2.19.1</version>
6156
<configuration>
6257
<reportsDirectory>${project.build.directory}/reports/junit</reportsDirectory>
6358
</configuration>
6459
</plugin>
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-shade-plugin</artifactId>
63+
<version>2.3</version>
64+
<executions>
65+
<!-- Run shade goal on package phase -->
66+
<execution>
67+
<phase>package</phase>
68+
<goals>
69+
<goal>shade</goal>
70+
</goals>
71+
</execution>
72+
</executions>
73+
</plugin>
6574
</plugins>
6675
</build>
6776
</project>

0 commit comments

Comments
 (0)