Skip to content

Commit ea503a5

Browse files
antonymayiwesm
authored andcommitted
ARROW-1379: [Java] adding maven-dependency-plugin and fixing all reported dependency errors
There is couple of dependency issues in the current maven config. This is then leaking into the integrating project which then needs to specify foreign dependencies just because arrow doesn't list them properly or is pulling unnecessary dependencies just because arrow lists them improperly. * ```arrow-format``` ``` [WARNING] Unused declared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.7.25:compile [WARNING] com.vlkan:flatbuffers:jar:1.2.0-3f79e055:compile [WARNING] io.netty:netty-handler:jar:4.0.49.Final:compile [WARNING] com.google.guava:guava:jar:18.0:compile ``` * ```arrow-memory``` ``` [WARNING] Used undeclared dependencies found: [WARNING] io.netty:netty-buffer:jar:4.0.49.Final:compile [WARNING] io.netty:netty-common:jar:4.0.49.Final:compile [WARNING] Unused declared dependencies found: [WARNING] com.carrotsearch:hppc:jar:0.7.2:compile [WARNING] io.netty:netty-handler:jar:4.0.49.Final:compile ``` * ```arrow-tools``` ``` [WARNING] Used undeclared dependencies found: [WARNING] com.fasterxml.jackson.core:jackson-databind:jar:2.7.9:compile [WARNING] com.fasterxml.jackson.core:jackson-core:jar:2.7.9:compile [WARNING] Unused declared dependencies found: [WARNING] org.apache.commons:commons-lang3:jar:3.6:compile [WARNING] org.apache.arrow:arrow-format:jar:0.7.0-SNAPSHOT:compile [WARNING] io.netty:netty-handler:jar:4.0.49.Final:compile ``` * ```arrow-vector``` ``` [WARNING] Used undeclared dependencies found: [WARNING] com.google.code.findbugs:jsr305:jar:3.0.2:compile [WARNING] com.vlkan:flatbuffers:jar:1.2.0-3f79e055:compile [WARNING] io.netty:netty-common:jar:4.0.49.Final:compile [WARNING] io.netty:netty-buffer:jar:4.0.49.Final:compile [WARNING] com.fasterxml.jackson.core:jackson-core:jar:2.7.9:compile [WARNING] Unused declared dependencies found: [WARNING] org.apache.commons:commons-lang3:jar:3.6:compile [WARNING] io.netty:netty-handler:jar:4.0.49.Final:compile ``` I am proposing this PR to: 1. Add maven-dependency-plugin to enforce all dependencies are always listed corrctly 2. Fixing all the current dependency issues Author: Antony Mayi <antonymayi@yahoo.com> Author: Stepan Kadlec <stepan.kadlec@oracle.com> Closes apache#978 from antonymayi/master and squashes the following commits: d7f081e [Antony Mayi] moving `copy-flatc` to initialize phase and `analyze` execution to parent pom ec72717 [Antony Mayi] removing unused apache.commons.lang3, fixing pom 8cbfe5f [Antony Mayi] maven-dependency-plugin: ignoring dependencies of generated sources in arrow-vector dc833bb [Stepan Kadlec] adding maven-dependency-plugin and fixing all reported dependency errors
1 parent a3607d2 commit ea503a5

6 files changed

Lines changed: 183 additions & 98 deletions

File tree

‎java/format/pom.xml‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@
2323
<name>Arrow Format</name>
2424

2525
<properties>
26-
<fbs.version>1.2.0-3f79e055</fbs.version>
2726
<flatc.download.skip>false</flatc.download.skip>
2827
<flatc.executable>${project.build.directory}/flatc-${os.detected.classifier}-${fbs.version}.exe</flatc.executable>
2928
<flatc.generated.files>${project.build.directory}/generated-sources/flatc</flatc.generated.files>
30-
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
31-
<maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
3229
<os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
3330
</properties>
3431

3532
<dependencies>
3633
<dependency>
3734
<groupId>com.vlkan</groupId>
3835
<artifactId>flatbuffers</artifactId>
39-
<version>${fbs.version}</version>
4036
</dependency>
4137
</dependencies>
4238

@@ -54,11 +50,10 @@
5450
<plugin> <!-- download the flatbuffer compiler -->
5551
<groupId>org.apache.maven.plugins</groupId>
5652
<artifactId>maven-dependency-plugin</artifactId>
57-
<version>${maven-dependency-plugin.version}</version>
5853
<executions>
5954
<execution>
6055
<id>copy-flatc</id>
61-
<phase>generate-sources</phase>
56+
<phase>initialize</phase>
6257
<goals>
6358
<goal>copy</goal>
6459
</goals>

‎java/memory/pom.xml‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,26 @@
2323
<dependency>
2424
<groupId>com.google.code.findbugs</groupId>
2525
<artifactId>jsr305</artifactId>
26-
<version>3.0.2</version>
2726
</dependency>
28-
2927
<dependency>
30-
<groupId>com.carrotsearch</groupId>
31-
<artifactId>hppc</artifactId>
32-
<version>0.7.2</version>
28+
<groupId>com.google.guava</groupId>
29+
<artifactId>guava</artifactId>
30+
</dependency>
31+
<dependency>
32+
<groupId>io.netty</groupId>
33+
<artifactId>netty-buffer</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>io.netty</groupId>
37+
<artifactId>netty-common</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.slf4j</groupId>
41+
<artifactId>slf4j-api</artifactId>
3342
</dependency>
3443
</dependencies>
3544

36-
3745
<build>
3846
</build>
3947

40-
41-
4248
</project>

‎java/pom.xml‎

Lines changed: 125 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232
<dep.junit.version>4.11</dep.junit.version>
3333
<dep.slf4j.version>1.7.25</dep.slf4j.version>
3434
<dep.guava.version>18.0</dep.guava.version>
35+
<dep.netty.version>4.0.49.Final</dep.netty.version>
36+
<dep.jackson.version>2.7.9</dep.jackson.version>
37+
<dep.hadoop.version>2.7.1</dep.hadoop.version>
38+
<fbs.version>1.2.0-3f79e055</fbs.version>
3539
<forkCount>2</forkCount>
36-
<jackson.version>2.7.9</jackson.version>
37-
<hadoop.version>2.7.1</hadoop.version>
3840
<checkstyle.failOnViolation>false</checkstyle.failOnViolation>
3941
</properties>
4042

@@ -271,55 +273,75 @@
271273
</configuration>
272274
</plugin>
273275

274-
<plugin>
275-
<groupId>org.apache.maven.plugins</groupId>
276-
<artifactId>maven-checkstyle-plugin</artifactId>
277-
<version>2.17</version>
278-
<dependencies>
279-
<dependency>
280-
<groupId>com.puppycrawl.tools</groupId>
281-
<artifactId>checkstyle</artifactId>
282-
<version>6.19</version>
283-
</dependency>
284-
<dependency>
285-
<groupId>com.google.guava</groupId>
286-
<artifactId>guava</artifactId>
287-
<version>${dep.guava.version}</version>
288-
</dependency>
289-
<dependency>
290-
<groupId>org.slf4j</groupId>
291-
<artifactId>jcl-over-slf4j</artifactId>
292-
<version>1.7.5</version>
293-
</dependency>
294-
</dependencies>
295-
<executions>
296-
<execution>
297-
<id>validate</id>
298-
<phase>validate</phase>
299-
<goals>
300-
<goal>check</goal>
301-
</goals>
302-
</execution>
303-
</executions>
304-
<configuration>
305-
<configLocation>google_checks.xml</configLocation>
306-
<encoding>UTF-8</encoding>
307-
<consoleOutput>true</consoleOutput>
308-
<failsOnError>${checkstyle.failOnViolation}</failsOnError>
309-
<failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
310-
<violationSeverity>warning</violationSeverity>
311-
<format>xml</format>
312-
<format>html</format>
313-
<outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
314-
<linkXRef>false</linkXRef>
315-
</configuration>
316-
</plugin>
317-
318-
276+
<plugin>
277+
<groupId>org.apache.maven.plugins</groupId>
278+
<artifactId>maven-checkstyle-plugin</artifactId>
279+
<version>2.17</version>
280+
<dependencies>
281+
<dependency>
282+
<groupId>com.puppycrawl.tools</groupId>
283+
<artifactId>checkstyle</artifactId>
284+
<version>6.19</version>
285+
</dependency>
286+
<dependency>
287+
<groupId>com.google.guava</groupId>
288+
<artifactId>guava</artifactId>
289+
<version>${dep.guava.version}</version>
290+
</dependency>
291+
<dependency>
292+
<groupId>org.slf4j</groupId>
293+
<artifactId>jcl-over-slf4j</artifactId>
294+
<version>1.7.5</version>
295+
</dependency>
296+
</dependencies>
297+
<executions>
298+
<execution>
299+
<id>validate</id>
300+
<phase>validate</phase>
301+
<goals>
302+
<goal>check</goal>
303+
</goals>
304+
</execution>
305+
</executions>
306+
<configuration>
307+
<configLocation>google_checks.xml</configLocation>
308+
<encoding>UTF-8</encoding>
309+
<consoleOutput>true</consoleOutput>
310+
<failsOnError>${checkstyle.failOnViolation}</failsOnError>
311+
<failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
312+
<violationSeverity>warning</violationSeverity>
313+
<format>xml</format>
314+
<format>html</format>
315+
<outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
316+
<linkXRef>false</linkXRef>
317+
</configuration>
318+
</plugin>
319+
<plugin>
320+
<groupId>org.apache.maven.plugins</groupId>
321+
<artifactId>maven-dependency-plugin</artifactId>
322+
<executions>
323+
<execution>
324+
<id>analyze</id>
325+
<phase>verify</phase>
326+
<goals>
327+
<goal>analyze-only</goal>
328+
</goals>
329+
<configuration>
330+
<ignoreNonCompile>true</ignoreNonCompile>
331+
<failOnWarning>true</failOnWarning>
332+
</configuration>
333+
</execution>
334+
</executions>
335+
</plugin>
319336
</plugins>
320-
<pluginManagement>
321337

338+
<pluginManagement>
322339
<plugins>
340+
<plugin>
341+
<groupId>org.apache.maven.plugins</groupId>
342+
<artifactId>maven-dependency-plugin</artifactId>
343+
<version>3.0.1</version>
344+
</plugin>
323345
<plugin>
324346
<groupId>org.apache.rat</groupId>
325347
<artifactId>apache-rat-plugin</artifactId>
@@ -449,26 +471,63 @@
449471
</plugins>
450472
</pluginManagement>
451473
</build>
452-
<dependencies>
453-
454-
<dependency>
455-
<groupId>io.netty</groupId>
456-
<artifactId>netty-handler</artifactId>
457-
<version>4.0.49.Final</version>
458-
</dependency>
459-
460-
<dependency>
461-
<groupId>com.google.guava</groupId>
462-
<artifactId>guava</artifactId>
463-
<version>${dep.guava.version}</version>
464-
</dependency>
465474

466-
<dependency>
467-
<groupId>org.slf4j</groupId>
468-
<artifactId>slf4j-api</artifactId>
469-
<version>${dep.slf4j.version}</version>
470-
</dependency>
475+
<dependencyManagement>
476+
<dependencies>
477+
<dependency>
478+
<groupId>com.vlkan</groupId>
479+
<artifactId>flatbuffers</artifactId>
480+
<version>${fbs.version}</version>
481+
</dependency>
482+
<dependency>
483+
<groupId>com.google.guava</groupId>
484+
<artifactId>guava</artifactId>
485+
<version>${dep.guava.version}</version>
486+
</dependency>
487+
<dependency>
488+
<groupId>io.netty</groupId>
489+
<artifactId>netty-handler</artifactId>
490+
<version>${dep.netty.version}</version>
491+
</dependency>
492+
<dependency>
493+
<groupId>io.netty</groupId>
494+
<artifactId>netty-buffer</artifactId>
495+
<version>${dep.netty.version}</version>
496+
</dependency>
497+
<dependency>
498+
<groupId>io.netty</groupId>
499+
<artifactId>netty-common</artifactId>
500+
<version>${dep.netty.version}</version>
501+
</dependency>
502+
<dependency>
503+
<groupId>com.fasterxml.jackson.core</groupId>
504+
<artifactId>jackson-core</artifactId>
505+
<version>${dep.jackson.version}</version>
506+
</dependency>
507+
<dependency>
508+
<groupId>com.fasterxml.jackson.core</groupId>
509+
<artifactId>jackson-annotations</artifactId>
510+
<version>${dep.jackson.version}</version>
511+
</dependency>
512+
<dependency>
513+
<groupId>com.fasterxml.jackson.core</groupId>
514+
<artifactId>jackson-databind</artifactId>
515+
<version>${dep.jackson.version}</version>
516+
</dependency>
517+
<dependency>
518+
<groupId>com.google.code.findbugs</groupId>
519+
<artifactId>jsr305</artifactId>
520+
<version>3.0.2</version>
521+
</dependency>
522+
<dependency>
523+
<groupId>org.slf4j</groupId>
524+
<artifactId>slf4j-api</artifactId>
525+
<version>${dep.slf4j.version}</version>
526+
</dependency>
527+
</dependencies>
528+
</dependencyManagement>
471529

530+
<dependencies>
472531
<!-- Test Dependencies -->
473532
<dependency>
474533
<groupId>org.slf4j</groupId>

‎java/tools/pom.xml‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
<name>Arrow Tools</name>
2121

2222
<dependencies>
23-
<dependency>
24-
<groupId>org.apache.arrow</groupId>
25-
<artifactId>arrow-format</artifactId>
26-
<version>${project.version}</version>
27-
</dependency>
2823
<dependency>
2924
<groupId>org.apache.arrow</groupId>
3025
<artifactId>arrow-memory</artifactId>
@@ -36,9 +31,8 @@
3631
<version>${project.version}</version>
3732
</dependency>
3833
<dependency>
39-
<groupId>org.apache.commons</groupId>
40-
<artifactId>commons-lang3</artifactId>
41-
<version>3.6</version>
34+
<groupId>com.google.guava</groupId>
35+
<artifactId>guava</artifactId>
4236
</dependency>
4337
<dependency>
4438
<groupId>commons-cli</groupId>
@@ -49,7 +43,19 @@
4943
<groupId>ch.qos.logback</groupId>
5044
<artifactId>logback-classic</artifactId>
5145
<version>1.2.3</version>
52-
<scope>run</scope>
46+
<scope>runtime</scope>
47+
</dependency>
48+
<dependency>
49+
<groupId>com.fasterxml.jackson.core</groupId>
50+
<artifactId>jackson-core</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.fasterxml.jackson.core</groupId>
54+
<artifactId>jackson-databind</artifactId>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.slf4j</groupId>
58+
<artifactId>slf4j-api</artifactId>
5359
</dependency>
5460
</dependencies>
5561

‎java/vector/pom.xml‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,52 @@
3636
<artifactId>joda-time</artifactId>
3737
<version>2.9.9</version>
3838
</dependency>
39+
<dependency>
40+
<groupId>com.fasterxml.jackson.core</groupId>
41+
<artifactId>jackson-core</artifactId>
42+
</dependency>
3943
<dependency>
4044
<groupId>com.fasterxml.jackson.core</groupId>
4145
<artifactId>jackson-annotations</artifactId>
42-
<version>${jackson.version}</version>
4346
</dependency>
4447
<dependency>
4548
<groupId>com.fasterxml.jackson.core</groupId>
4649
<artifactId>jackson-databind</artifactId>
47-
<version>${jackson.version}</version>
4850
</dependency>
4951
<dependency>
5052
<groupId>com.carrotsearch</groupId>
5153
<artifactId>hppc</artifactId>
5254
<version>0.7.2</version>
5355
</dependency>
54-
<dependency>
55-
<groupId>org.apache.commons</groupId>
56-
<artifactId>commons-lang3</artifactId>
57-
<version>3.6</version>
58-
</dependency>
5956
<dependency>
6057
<groupId>commons-codec</groupId>
6158
<artifactId>commons-codec</artifactId>
6259
<version>1.10</version>
6360
</dependency>
61+
<dependency>
62+
<groupId>com.google.guava</groupId>
63+
<artifactId>guava</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>io.netty</groupId>
67+
<artifactId>netty-buffer</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>io.netty</groupId>
71+
<artifactId>netty-common</artifactId>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.vlkan</groupId>
75+
<artifactId>flatbuffers</artifactId>
76+
</dependency>
77+
<dependency>
78+
<groupId>com.google.code.findbugs</groupId>
79+
<artifactId>jsr305</artifactId>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.slf4j</groupId>
83+
<artifactId>slf4j-api</artifactId>
84+
</dependency>
6485
</dependencies>
6586

6687
<pluginRepositories>

0 commit comments

Comments
 (0)