Skip to content

Commit

Permalink
Set build requirements, minimum Maven version
Browse files Browse the repository at this point in the history
Urge the use of <dependencyManagement> by disallowing duplicate
dependency declarations. See #262.

Making final releases with SNAPSHOT dependencies in use is a really bad
idea that can happen by accidental oversight. Enforcer helps ensure it
doesn't.

For build reproducibility it's good to specify what Maven versions are
supported for the project's build to work. 3.0.5 is the minimum required
version by all our plugins currently, according to:

    $ mvn versions:display-plugin-updates
  • Loading branch information
ches authored and woop committed Oct 24, 2019
1 parent 437a192 commit b0ae773
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ingestion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,10 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobufVersion}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobufVersion}</version>
</dependency>

<dependency>
Expand All @@ -202,7 +200,6 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.3.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -257,8 +254,6 @@
<dependency>
<groupId>com.github.kstyrc</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.6</version>
<scope>test</scope>
</dependency>

<!-- To run actual Kafka for ingestion integration test -->
Expand All @@ -269,7 +264,6 @@
<scope>test</scope>
</dependency>


<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
48 changes: 48 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,54 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>valid-build-environment</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0.5</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.8.0</version>
</requireJavaVersion>
<reactorModuleConvergence />
</rules>
</configuration>
</execution>
<execution>
<id>consistent-dependency-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<banDuplicatePomDependencyVersions />
</rules>
</configuration>
</execution>
<execution>
<id>no-snapshot-deps-at-release</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireReleaseDeps>
<onlyWhenRelease>true</onlyWhenRelease>
</requireReleaseDeps>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit b0ae773

Please sign in to comment.