Skip to content

Commit

Permalink
HV-1308 Define a path variable instead of using maven-remote-resource…
Browse files Browse the repository at this point in the history
…s plugin

It sounded like a good idea but the fact is that the build-config
artifact is not available when we build the aggregator so we needed a
special case.

Having a variable to for the root of the project might be useful for
other plugins as well so I chose to go this route.
  • Loading branch information
gsmet committed Apr 13, 2017
1 parent bd731cb commit 6ac82ed
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 80 deletions.
4 changes: 4 additions & 0 deletions annotation-processor/pom.xml
Expand Up @@ -19,6 +19,10 @@

<name>Hibernate Validator Annotation Processor</name>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
47 changes: 4 additions & 43 deletions build-config/pom.xml
Expand Up @@ -20,6 +20,10 @@
<name>Hibernate Validator Build Configuration</name>
<description>Configuration for the build of Hibernate Validator</description>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<build>
<plugins>
<plugin>
Expand All @@ -31,49 +35,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/*.txt</include>
<include>**/*.xml</include>
<include>**/*.header</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>src/main/resources/license.header</header>
<strictCheck>true</strictCheck>
<headerDefinitions>
<headerDefinition>src/main/resources/xml-header-style.xml</headerDefinition>
</headerDefinitions>
<mapping>
<xml>XML_FILE_STYLE</xml>
</mapping>
<includes>
<include>**/*.xml</include>
</includes>
</configuration>
<executions>
<execution>
<id>license-headers</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 4 additions & 0 deletions cdi/pom.xml
Expand Up @@ -20,6 +20,10 @@
<name>Hibernate Validator Portable Extension</name>
<description>Hibernate Validator CDI Portable Extension</description>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
<!--
Compile time dependencies
Expand Down
1 change: 1 addition & 0 deletions distribution/pom.xml
Expand Up @@ -24,6 +24,7 @@
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>false</maven.javadoc.skip>
<javadoc.additional.param></javadoc.additional.param>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
1 change: 1 addition & 0 deletions documentation/pom.xml
Expand Up @@ -41,6 +41,7 @@
<maven-surefire-plugin.argLine>-Duser.language=en</maven-surefire-plugin.argLine>

<forbiddenapis-junit.path>forbidden-allow-junit.txt</forbiddenapis-junit.path>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
4 changes: 4 additions & 0 deletions engine/pom.xml
Expand Up @@ -20,6 +20,10 @@
<name>Hibernate Validator Engine</name>
<description>Hibernate's Bean Validation (JSR-380) reference implementation.</description>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<distributionManagement>
<site>
<id>site</id>
Expand Down
1 change: 1 addition & 0 deletions integration/pom.xml
Expand Up @@ -23,6 +23,7 @@
<properties>
<wildflyTargetDir>${basedir}/target/wildfly-${wildfly.version}</wildflyTargetDir>
<wildflyModulesDir>${wildflyTargetDir}/modules/system/layers/base</wildflyModulesDir>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
2 changes: 2 additions & 0 deletions modules/pom.xml
Expand Up @@ -31,6 +31,8 @@
<patchFile>${project.build.directory}/hv-patch.zip</patchFile>

<patch-gen-maven-plugin.argLine.add-opens></patch-gen-maven-plugin.argLine.add-opens>

<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencyManagement/>
Expand Down
1 change: 1 addition & 0 deletions osgi/integrationtest/pom.xml
Expand Up @@ -25,6 +25,7 @@
<maven.deploy.skip>true</maven.deploy.skip>

<forbiddenapis-junit.path>forbidden-allow-junit.txt</forbiddenapis-junit.path>
<hibernate-validator-parent.path>../..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
4 changes: 4 additions & 0 deletions osgi/karaf-features/pom.xml
Expand Up @@ -21,6 +21,10 @@
<name>Hibernate Validator Karaf Features</name>
<description>Hibernate Validator features for Apache Karaf</description>

<properties>
<hibernate-validator-parent.path>../..</hibernate-validator-parent.path>
</properties>

<build>
<plugins>
<plugin>
Expand Down
4 changes: 4 additions & 0 deletions osgi/pom.xml
Expand Up @@ -21,6 +21,10 @@
<name>Hibernate Validator OSGi Modules</name>
<description>Hibernate Validator OSGi modules aggregator</description>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<modules>
<module>karaf-features</module>
<module>integrationtest</module>
Expand Down
2 changes: 2 additions & 0 deletions performance/pom.xml
Expand Up @@ -32,6 +32,8 @@
<!-- default values, overridden per profile -->
<beanvalidation-impl.name>none</beanvalidation-impl.name>
<beanvalidation-impl.version>none</beanvalidation-impl.version>

<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
41 changes: 4 additions & 37 deletions pom.xml
Expand Up @@ -186,7 +186,7 @@
<!-- Forbidden API related properties -->
<forbiddenapis-junit.path>forbidden-junit.txt</forbiddenapis-junit.path>

<build-config-resources.path>${project.build.directory}/build-config-resources</build-config-resources.path>
<hibernate-validator-parent.path>.</hibernate-validator-parent.path>
</properties>

<prerequisites>
Expand Down Expand Up @@ -422,14 +422,6 @@
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<header>build-config/src/main/resources/license.header</header>
<strictCheck>true</strictCheck>
<headerDefinitions>
<headerDefinition>build-config/src/main/resources/java-header-style.xml</headerDefinition>
<headerDefinition>build-config/src/main/resources/xml-header-style.xml</headerDefinition>
</headerDefinitions>
</configuration>
</plugin>
</plugins>
<pluginManagement>
Expand Down Expand Up @@ -571,41 +563,16 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-build-config</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<resourceBundles>
<resourceBundle>org.hibernate.validator:hibernate-validator-build-config:${project.version}</resourceBundle>
</resourceBundles>
<outputDirectory>${build-config-resources.path}</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>${build-config-resources.path}/license.header</header>
<header>${hibernate-validator-parent.path}/build-config/src/main/resources/license.header</header>
<strictCheck>true</strictCheck>
<headerDefinitions>
<headerDefinition>${build-config-resources.path}/java-header-style.xml</headerDefinition>
<headerDefinition>${build-config-resources.path}/xml-header-style.xml</headerDefinition>
<headerDefinition>${hibernate-validator-parent.path}/build-config/src/main/resources/java-header-style.xml</headerDefinition>
<headerDefinition>${hibernate-validator-parent.path}/build-config/src/main/resources/xml-header-style.xml</headerDefinition>
</headerDefinitions>
<mapping>
<java>JAVA_CLASS_STYLE</java>
Expand Down
3 changes: 3 additions & 0 deletions tck-runner/pom.xml
Expand Up @@ -19,12 +19,15 @@

<name>Hibernate Validator TCK Runner</name>
<description>Aggregates dependencies and runs the JSR-380 TCK</description>

<properties>
<tck.version>2.0.0.Alpha3</tck.version>
<tck.suite.file>${project.build.directory}/dependency/beanvalidation-tck-tests-suite.xml</tck.suite.file>
<wildflyTargetDir>${project.build.directory}/wildfly-${wildfly.version}</wildflyTargetDir>
<validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
<remote.debug />

<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<dependencies>
Expand Down
4 changes: 4 additions & 0 deletions test-utils/pom.xml
Expand Up @@ -16,6 +16,10 @@

<name>Hibernate Validator Test Utils</name>

<properties>
<hibernate-validator-parent.path>..</hibernate-validator-parent.path>
</properties>

<build>
<plugins>
<plugin>
Expand Down

0 comments on commit 6ac82ed

Please sign in to comment.