Skip to content

Commit

Permalink
Add basic maven-enforcer-plugin config (to ensure releasability) and …
Browse files Browse the repository at this point in the history
…os-maven-plugin configuration (required by go-offline step of releasing to Maven Central)
  • Loading branch information
nvamelichev committed Dec 28, 2023
1 parent 9e1571a commit e7de039
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
54 changes: 54 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<versions-maven-plugin.version>2.16.1</versions-maven-plugin.version>
<extra-enforcer-rules.version>1.7.0</extra-enforcer-rules.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>

<!-- YDB SDK 1.x -->
<ydb-sdk-v1.version>1.14.14</ydb-sdk-v1.version>
Expand Down Expand Up @@ -288,6 +289,54 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- https://maven.apache.org/enforcer/enforcer-rules/index.html -->
<banDistributionManagement/>
<banDuplicatePomDependencyVersions/>
<bannedDependencies/>
<dependencyConvergence/>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
<requireReleaseDeps>
<failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
<excludes>
<exclude>tech.ydb:*</exclude>
<exclude>tech.ydb.yoj*:*</exclude>
</excludes>
</requireReleaseDeps>
<!-- http://www.mojohaus.org/extra-enforcer-rules/ -->
<banDuplicateClasses>
<findAllDuplicates>true</findAllDuplicates>
<ignoreClasses/>
</banDuplicateClasses>
<enforceBytecodeVersion>
<maxJdkVersion>${java.version}</maxJdkVersion>
<excludes>
<exclude>org.projectlombok:lombok</exclude>
</excludes>
</enforceBytecodeVersion>
<banCircularDependencies/>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>${extra-enforcer-rules.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -391,6 +440,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</plugin>
</plugins>
</build>

Expand Down
6 changes: 6 additions & 0 deletions repository-ydb-v1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
<exclusions>
<exclusion>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
Expand Down
9 changes: 9 additions & 0 deletions repository-ydb-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,13 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
</extension>
</extensions>
</build>
</project>

0 comments on commit e7de039

Please sign in to comment.