This is an automated email from the ASF dual-hosted git repository. mblow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit e2307cfd2ec966fb5accf9648c5837ba28c64f82 Author: Michael Blow <[email protected]> AuthorDate: Fri Apr 24 16:14:03 2020 -0400 [NO ISSUE] Ensure 'pom' modules are test-free Change-Id: I2c938f163a6327d16062390ee9f661cfa81df3dd Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/5985 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Blow <[email protected]> --- asterixdb/pom.xml | 41 ++++++++++++++++++++++++++++++++++++++++- hyracks-fullstack/pom.xml | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml index 6760333..cd5e060 100644 --- a/asterixdb/pom.xml +++ b/asterixdb/pom.xml @@ -262,10 +262,49 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>check-pom-packaging</id> + <phase>validate</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <exportAntProperties>true</exportAntProperties> + <target xmlns:unless="ant:unless"> + <condition property="skipPomEnforcement"> + <not><equals arg1="${project.packaging}" arg2="pom"/></not> + </condition> + <echo message="will enforce non-existence of test source dir due to ${project.packaging} packaging" unless:set="skipPomEnforcement"/> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.0.0-M1</version> <executions> <execution> + <id>ensure-no-tests-for-pom-packaging</id> + <phase>validate</phase> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireFilesDontExist> + <files> + <file>${project.build.testSourceDirectory}</file> + </files> + <message>#### Tests cannot exist in projects with '${project.packaging}' packaging!</message> + </requireFilesDontExist> + </rules> + <skip>${skipPomEnforcement}</skip> + </configuration> + </execution> + <execution> <id>enforce-versions</id> <goals> <goal>enforce</goal> diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml index 3142ff8..d07e1dd 100644 --- a/hyracks-fullstack/pom.xml +++ b/hyracks-fullstack/pom.xml @@ -271,7 +271,7 @@ <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> <version>3.6.3</version> - </dependency> + </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> @@ -438,10 +438,49 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>check-pom-packaging</id> + <phase>validate</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <exportAntProperties>true</exportAntProperties> + <target xmlns:unless="ant:unless"> + <condition property="skipPomEnforcement"> + <not><equals arg1="${project.packaging}" arg2="pom"/></not> + </condition> + <echo message="will enforce non-existence of test source dir due to ${project.packaging} packaging" unless:set="skipPomEnforcement"/> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.0.0-M1</version> <executions> <execution> + <id>ensure-no-tests-for-pom-packaging</id> + <phase>validate</phase> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireFilesDontExist> + <files> + <file>${project.build.testSourceDirectory}</file> + </files> + <message>#### Tests cannot exist in projects with '${project.packaging}' packaging!</message> + </requireFilesDontExist> + </rules> + <skip>${skipPomEnforcement}</skip> + </configuration> + </execution> + <execution> <id>enforce-versions</id> <goals> <goal>enforce</goal>
