Skip to content

Commit c01bbc7

Browse files
feat: add flatten plugin (#117)
* feat: add samples module * feat: add samples module to bqstorage * pom changes * add flattened pom * add flattened pom add plugin config info * update flattened pom exclude <build> section using pomElements * remove maven-dependency-plugin version * integrate multi-module samples module * add flatten plugin * remove flattened pom from repo * update flatten version * update samples snapshot version in pom * fix deploy issue * restore samples poms to pre-testing
1 parent 0541775 commit c01bbc7

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

google-cloud-bigquerystorage/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
</execution>
4141
</executions>
4242
</plugin>
43+
<plugin>
44+
<groupId>org.codehaus.mojo</groupId>
45+
<artifactId>flatten-maven-plugin</artifactId>
46+
</plugin>
4347
</plugins>
4448
</build>
4549
<dependencies>

pom.xml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,79 @@
241241
<ignoredUnusedDeclaredDependencies>org.objenesis:objenesis</ignoredUnusedDeclaredDependencies>
242242
</configuration>
243243
</plugin>
244+
245+
<!-- flatten maven plugin -->
246+
<plugin>
247+
<groupId>org.codehaus.mojo</groupId>
248+
<artifactId>flatten-maven-plugin</artifactId>
249+
<version>1.2.2</version>
250+
<executions>
251+
<!-- enable flattening -->
252+
<execution>
253+
<id>flatten</id>
254+
<phase>process-resources</phase>
255+
<goals>
256+
<goal>flatten</goal>
257+
</goals>
258+
</execution>
259+
<!-- ensure proper cleanup -->
260+
<execution>
261+
<id>flatten.clean</id>
262+
<phase>clean</phase>
263+
<goals>
264+
<goal>clean</goal>
265+
</goals>
266+
</execution>
267+
</executions>
268+
<configuration>
269+
<flattenMode>oss</flattenMode>
270+
<flattenDependencyMode>all</flattenDependencyMode>
271+
<pomElements>
272+
<build>remove</build>
273+
</pomElements>
274+
</configuration>
275+
</plugin>
244276
</plugins>
245277
</pluginManagement>
278+
279+
<plugins>
280+
<!-- ban duplicate class -->
281+
<plugin>
282+
<groupId>org.apache.maven.plugins</groupId>
283+
<artifactId>maven-enforcer-plugin</artifactId>
284+
<version>3.0.0-M3</version> <!-- find the latest version at http://maven.apache.org/plugins/maven-enforcer-plugin/ -->
285+
<executions>
286+
<execution>
287+
<id>enforce-ban-duplicate-classes</id>
288+
<goals>
289+
<goal>enforce</goal>
290+
</goals>
291+
<configuration>
292+
<rules>
293+
<!-- add this to shared-config -->
294+
<banDuplicateClasses>
295+
<scopes>
296+
<scope>compile</scope>
297+
<scope>provided</scope>
298+
</scopes>
299+
<findAllDuplicates>true</findAllDuplicates>
300+
<ignoreWhenIdentical>true</ignoreWhenIdentical>
301+
</banDuplicateClasses>
302+
<!-- add this to shared-config -->
303+
</rules>
304+
<fail>true</fail>
305+
</configuration>
306+
</execution>
307+
</executions>
308+
<dependencies>
309+
<dependency>
310+
<groupId>org.codehaus.mojo</groupId>
311+
<artifactId>extra-enforcer-rules</artifactId>
312+
<version>1.2</version>
313+
</dependency>
314+
</dependencies>
315+
</plugin>
316+
</plugins>
246317
</build>
247318

248319
<modules>

0 commit comments

Comments
 (0)