Skip to content

Commit

Permalink
HSEARCH-2191 Allow to disable dependency convergence enforcement only…
Browse files Browse the repository at this point in the history
… on a per-module basis

This will allow to disable the rule in the JBoss modules, which will be
necessary once we depend on WildFly feature packs there.
I wouldn't be comfortable with disabling *all* the rules in an artifact
that will ultimately get released...
  • Loading branch information
yrodiere committed Jan 19, 2018
1 parent cda4a9a commit 6fc05ef
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion integrationtest/osgi/karaf-it/pom.xml
Expand Up @@ -23,7 +23,7 @@
<description>Hibernate Search integration tests for OSGi using Apache Karaf</description>

<properties>
<enforcer.skip>true</enforcer.skip>
<enforcer.dependencyconvergence.skip>true</enforcer.dependencyconvergence.skip>

<karaf.version>4.1.2</karaf.version>
<pax.exam.version>4.11.0</pax.exam.version>
Expand Down
5 changes: 2 additions & 3 deletions integrationtest/performance/orm/pom.xml
Expand Up @@ -22,10 +22,9 @@

<properties>
<!--
we disable the enforcer plugin for this module as it is not possible to maintain the dependency convergence
here due to dependency conflicts with specific versions of WildFly
Disable the dependency convergence rule, because the dependencies of WildFly feature packs do not converge
-->
<enforcer.skip>true</enforcer.skip>
<enforcer.dependencyconvergence.skip>true</enforcer.dependencyconvergence.skip>
<scenario></scenario>
<serverName>wildfly-${wildflyVersion}</serverName>
<jbosshome>${project.build.directory}/${serverName}/</jbosshome>
Expand Down
5 changes: 2 additions & 3 deletions integrationtest/wildfly/pom.xml
Expand Up @@ -23,10 +23,9 @@

<properties>
<!--
we disable the enforcer plugin for this module as it is not possible to maintain the dependency convergence
here due to dependency conflicts with specific versions of WildFly
Disable the dependency convergence rule, because the dependencies of WildFly feature packs do not converge
-->
<enforcer.skip>true</enforcer.skip>
<enforcer.dependencyconvergence.skip>true</enforcer.dependencyconvergence.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<byteman.agent.path>${org.jboss.byteman:byteman:jar}</byteman.agent.path>
<byteman.agent.options>script:${basedir}${file.separator}src${file.separator}test${file.separator}resources${file.separator}disablejpadapters.btm,script:${basedir}${file.separator}src${file.separator}test${file.separator}resources${file.separator}jsr352${file.separator}JobInterruptor.btm</byteman.agent.options>
Expand Down
44 changes: 29 additions & 15 deletions pom.xml
Expand Up @@ -171,12 +171,15 @@
</mailingLists>

<prerequisites>
<maven>3.2.3</maven>
<maven>${minMavenVersion}</maven>
</prerequisites>

<properties>
<!-- JDK version required for the build; we target 1.8 since Hibernate ORM 5.2 requires Java 8 -->
<minJdkVersion>1.8</minJdkVersion>
<minMavenVersion>3.2.3</minMavenVersion>
<!-- Can be overridden by subprojects if dependency convergence cannot be achieved -->
<enforcer.dependencyconvergence.skip>false</enforcer.dependencyconvergence.skip>

<!-- Slot definitions for JBoss Modules (generated modules) -->
<hibernate-search.module.slot>${project.version}</hibernate-search.module.slot>
Expand Down Expand Up @@ -983,25 +986,36 @@
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-rules</id>
<id>enforce-common-rules</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<!-- require JDK 1.8 to run the build -->
<version>[${minJdkVersion},)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>${minMavenVersion}</version>
</requireMavenVersion>
<banDuplicatePomDependencyVersions />
</rules>
</configuration>
</execution>
<execution>
<id>enforce-dependency-convergence</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>${enforcer.dependencyconvergence.skip}</skip>
<rules>
<DependencyConvergence />
</rules>
</configuration>
</execution>
</executions>
<configuration>
<rules>
<requireJavaVersion>
<!-- require JDK 1.8 to run the build -->
<version>[${minJdkVersion},)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.2.3</version>
</requireMavenVersion>
<banDuplicatePomDependencyVersions />
<DependencyConvergence />
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 6fc05ef

Please sign in to comment.