Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stephaniewang526 committed Apr 4, 2020
1 parent 0541775 commit c01bbc7
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google-cloud-bigquerystorage/pom.xml
Expand Up @@ -40,6 +40,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
71 changes: 71 additions & 0 deletions pom.xml
Expand Up @@ -241,8 +241,79 @@
<ignoredUnusedDeclaredDependencies>org.objenesis:objenesis</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>

<!-- flatten maven plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
<configuration>
<flattenMode>oss</flattenMode>
<flattenDependencyMode>all</flattenDependencyMode>
<pomElements>
<build>remove</build>
</pomElements>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<!-- ban duplicate class -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version> <!-- find the latest version at http://maven.apache.org/plugins/maven-enforcer-plugin/ -->
<executions>
<execution>
<id>enforce-ban-duplicate-classes</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- add this to shared-config -->
<banDuplicateClasses>
<scopes>
<scope>compile</scope>
<scope>provided</scope>
</scopes>
<findAllDuplicates>true</findAllDuplicates>
<ignoreWhenIdentical>true</ignoreWhenIdentical>
</banDuplicateClasses>
<!-- add this to shared-config -->
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<modules>
Expand Down

0 comments on commit c01bbc7

Please sign in to comment.