Skip to content

Commit 4f91b22

Browse files
authored
v0.3 backport: Remove unused ingestion deps (#521)
* Make dependency:analyze run clean on datatypes-java * Remove stale dependencies from ingestion Unused according to `mvn -pl ingestion dependency:analyze`, and tests. We had a recent bump of hibernate-validator with a CVE fix (#421) that I was looking to backport, and it turns out it's not used anymore anyway.
1 parent be4d189 commit 4f91b22

3 files changed

Lines changed: 57 additions & 48 deletions

File tree

datatypes/java/pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737

3838
<build>
3939
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-dependency-plugin</artifactId>
43+
<configuration>
44+
<!-- Required for generated code to compile; annotations are common false positive -->
45+
<ignoredUnusedDeclaredDependencies>
46+
javax.annotation
47+
</ignoredUnusedDeclaredDependencies>
48+
</configuration>
49+
</plugin>
50+
4051
<plugin>
4152
<groupId>org.xolstice.maven.plugins</groupId>
4253
<artifactId>protobuf-maven-plugin</artifactId>
@@ -64,9 +75,36 @@
6475
</build>
6576

6677
<dependencies>
78+
<!-- Many of these come transitively from grpc-services, but they are direct deps of generated code -->
79+
<dependency>
80+
<groupId>com.google.guava</groupId>
81+
<artifactId>guava</artifactId>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.google.protobuf</groupId>
85+
<artifactId>protobuf-java</artifactId>
86+
</dependency>
87+
88+
<dependency>
89+
<groupId>io.grpc</groupId>
90+
<artifactId>grpc-core</artifactId>
91+
</dependency>
92+
<dependency>
93+
<groupId>io.grpc</groupId>
94+
<artifactId>grpc-protobuf</artifactId>
95+
</dependency>
6796
<dependency>
6897
<groupId>io.grpc</groupId>
6998
<artifactId>grpc-services</artifactId>
7099
</dependency>
100+
<dependency>
101+
<groupId>io.grpc</groupId>
102+
<artifactId>grpc-stub</artifactId>
103+
</dependency>
104+
105+
<dependency>
106+
<groupId>javax.annotation</groupId>
107+
<artifactId>javax.annotation-api</artifactId>
108+
</dependency>
71109
</dependencies>
72110
</project>

ingestion/pom.xml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,6 @@
9292
<version>${project.version}</version>
9393
</dependency>
9494

95-
<dependency>
96-
<groupId>org.glassfish</groupId>
97-
<artifactId>javax.el</artifactId>
98-
<version>3.0.0</version>
99-
</dependency>
100-
101-
<dependency>
102-
<groupId>javax.validation</groupId>
103-
<artifactId>validation-api</artifactId>
104-
<version>2.0.1.Final</version>
105-
</dependency>
106-
107-
<dependency>
108-
<groupId>org.hibernate.validator</groupId>
109-
<artifactId>hibernate-validator</artifactId>
110-
<version>6.0.13.Final</version>
111-
</dependency>
112-
11395
<dependency>
11496
<groupId>com.google.auto.value</groupId>
11597
<artifactId>auto-value-annotations</artifactId>
@@ -122,15 +104,6 @@
122104
<scope>provided</scope>
123105
</dependency>
124106

125-
<dependency>
126-
<groupId>io.grpc</groupId>
127-
<artifactId>grpc-stub</artifactId>
128-
</dependency>
129-
130-
<dependency>
131-
<groupId>com.google.cloud</groupId>
132-
<artifactId>google-cloud-storage</artifactId>
133-
</dependency>
134107
<dependency>
135108
<groupId>com.google.cloud</groupId>
136109
<artifactId>google-cloud-bigquery</artifactId>
@@ -150,27 +123,6 @@
150123
<artifactId>mockito-core</artifactId>
151124
</dependency>
152125

153-
<dependency>
154-
<groupId>com.fasterxml.jackson.core</groupId>
155-
<artifactId>jackson-annotations</artifactId>
156-
</dependency>
157-
<dependency>
158-
<groupId>com.fasterxml.jackson.core</groupId>
159-
<artifactId>jackson-core</artifactId>
160-
</dependency>
161-
<dependency>
162-
<groupId>com.fasterxml.jackson.core</groupId>
163-
<artifactId>jackson-databind</artifactId>
164-
</dependency>
165-
<dependency>
166-
<groupId>com.fasterxml.jackson.dataformat</groupId>
167-
<artifactId>jackson-dataformat-yaml</artifactId>
168-
</dependency>
169-
<dependency>
170-
<groupId>com.fasterxml.jackson.module</groupId>
171-
<artifactId>jackson-module-jsonSchema</artifactId>
172-
</dependency>
173-
174126
<dependency>
175127
<groupId>com.google.protobuf</groupId>
176128
<artifactId>protobuf-java</artifactId>

pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@
141141
</dependency>
142142

143143
<!-- gRPC -->
144+
<dependency>
145+
<groupId>io.grpc</groupId>
146+
<artifactId>grpc-core</artifactId>
147+
<version>${grpcVersion}</version>
148+
</dependency>
144149
<dependency>
145150
<groupId>io.grpc</groupId>
146151
<artifactId>grpc-netty</artifactId>
@@ -524,6 +529,20 @@
524529
<artifactId>docker-maven-plugin</artifactId>
525530
<version>0.20.1</version>
526531
</plugin>
532+
<plugin>
533+
<groupId>org.apache.maven.plugins</groupId>
534+
<artifactId>maven-dependency-plugin</artifactId>
535+
<version>3.1.1</version>
536+
<dependencies>
537+
<!-- Awaiting release with Java 11 class file support
538+
https://issues.apache.org/jira/browse/MDEP-613 -->
539+
<dependency>
540+
<groupId>org.apache.maven.shared</groupId>
541+
<artifactId>maven-dependency-analyzer</artifactId>
542+
<version>1.11.1</version>
543+
</dependency>
544+
</dependencies>
545+
</plugin>
527546
<plugin>
528547
<groupId>org.apache.maven.plugins</groupId>
529548
<artifactId>maven-javadoc-plugin</artifactId>

0 commit comments

Comments
 (0)