Michael Blow has submitted this change and it was merged. Change subject: [NO ISSUE] Add options to skip optional build portions ......................................................................
[NO ISSUE] Add options to skip optional build portions - skip.testResources skips generating test data, and copying testResources - jjdoc.skip skips jjdoc generation Change-Id: I6c46c2d6f3b678cddfbccbc8940ef58b424f9637 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2213 Integration-Tests: Michael Blow <[email protected]> Tested-by: Michael Blow <[email protected]> Contrib: Michael Blow <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> --- M asterixdb/asterix-app/pom.xml M asterixdb/asterix-lang-aql/pom.xml M asterixdb/asterix-lang-sqlpp/pom.xml M asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/pom.xml M asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml M asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml M asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/src/main/java/org/apache/hyracks/maven/plugin/TestDataGeneratorMojo.java M asterixdb/asterix-maven-plugins/pom.xml M asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml M asterixdb/pom.xml M hyracks-fullstack/pom.xml 11 files changed, 161 insertions(+), 64 deletions(-) Approvals: Michael Blow: Verified; ; Verified Murtadha Hubail: Looks good to me, approved diff --git a/asterixdb/asterix-app/pom.xml b/asterixdb/asterix-app/pom.xml index b29437b..2d47b62 100644 --- a/asterixdb/asterix-app/pom.xml +++ b/asterixdb/asterix-app/pom.xml @@ -121,6 +121,7 @@ </includes> </inputFiles> <outputDir>target/data</outputDir> + <skip>${skip.testResources}</skip> </configuration> </execution> </executions> diff --git a/asterixdb/asterix-lang-aql/pom.xml b/asterixdb/asterix-lang-aql/pom.xml index 0d098e7..c7ae8c9 100644 --- a/asterixdb/asterix-lang-aql/pom.xml +++ b/asterixdb/asterix-lang-aql/pom.xml @@ -54,13 +54,6 @@ <javaUnicodeEscape>true</javaUnicodeEscape> </configuration> </execution> - <execution> - <id>javacc-jjdoc</id> - <goals> - <goal>jjdoc</goal> - </goals> - <phase>process-sources</phase> - </execution> </executions> </plugin> <plugin> @@ -121,6 +114,35 @@ </pluginManagement> </build> + <profiles> + <profile> + <id>jjdoc</id> + <activation> + <property> + <name>jjdoc.skip</name> + <value>!true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>javacc-maven-plugin</artifactId> + <executions> + <execution> + <id>javacc-jjdoc</id> + <goals> + <goal>jjdoc</goal> + </goals> + <phase>generate-test-sources</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <dependencies> <dependency> <groupId>org.apache.asterix</groupId> diff --git a/asterixdb/asterix-lang-sqlpp/pom.xml b/asterixdb/asterix-lang-sqlpp/pom.xml index 1ef09d1..dd69697 100644 --- a/asterixdb/asterix-lang-sqlpp/pom.xml +++ b/asterixdb/asterix-lang-sqlpp/pom.xml @@ -49,13 +49,6 @@ <javaUnicodeEscape>true</javaUnicodeEscape> </configuration> </execution> - <execution> - <id>javacc-jjdoc</id> - <goals> - <goal>jjdoc</goal> - </goals> - <phase>process-sources</phase> - </execution> </executions> </plugin> <plugin> @@ -109,6 +102,36 @@ </plugins> </pluginManagement> </build> + + <profiles> + <profile> + <id>jjdoc</id> + <activation> + <property> + <name>jjdoc.skip</name> + <value>!true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>javacc-maven-plugin</artifactId> + <executions> + <execution> + <id>javacc-jjdoc</id> + <goals> + <goal>jjdoc</goal> + </goals> + <phase>generate-test-sources</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <dependencies> <dependency> <groupId>org.apache.asterix</groupId> diff --git a/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/pom.xml index a4e8da6..a70f854 100644 --- a/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/pom.xml +++ b/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/pom.xml @@ -18,7 +18,6 @@ !--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.asterix</groupId> <artifactId>asterix-evaluator-generator-maven-plugin</artifactId> <parent> <groupId>org.apache.asterix</groupId> @@ -63,7 +62,6 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> - <version>2.2.1</version> </dependency> <dependency> <groupId>org.reflections</groupId> @@ -73,7 +71,6 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-model</artifactId> - <version>3.3.9</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> diff --git a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml index 3ce7197..637305e 100644 --- a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml +++ b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml @@ -102,13 +102,6 @@ <outputDirectory>${project.build.directory}/generated-sources/javacc</outputDirectory> </configuration> </execution> - <execution> - <id>javacc-jjdoc</id> - <goals> - <goal>jjdoc</goal> - </goals> - <phase>generate-test-sources</phase> - </execution> </executions> </plugin> <plugin> @@ -143,4 +136,32 @@ </plugins> </pluginManagement> </build> + <profiles> + <profile> + <id>jjdoc</id> + <activation> + <property> + <name>jjdoc.skip</name> + <value>!true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>javacc-maven-plugin</artifactId> + <executions> + <execution> + <id>javacc-jjdoc</id> + <goals> + <goal>jjdoc</goal> + </goals> + <phase>generate-test-sources</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> \ No newline at end of file diff --git a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml index d0eb1c8..d1acad9 100644 --- a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml +++ b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml @@ -32,8 +32,11 @@ <dependencies> <dependency> <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> - <version>2.2.1</version> </dependency> <dependency> <groupId>org.apache.maven.shared</groupId> diff --git a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/src/main/java/org/apache/hyracks/maven/plugin/TestDataGeneratorMojo.java b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/src/main/java/org/apache/hyracks/maven/plugin/TestDataGeneratorMojo.java index e1afb43..b56ab47 100644 --- a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/src/main/java/org/apache/hyracks/maven/plugin/TestDataGeneratorMojo.java +++ b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/src/main/java/org/apache/hyracks/maven/plugin/TestDataGeneratorMojo.java @@ -55,8 +55,18 @@ */ File outputDir; + + /** + * @parameter default-value="${maven.test.skip}" + */ + boolean skip; + @Override public void execute() throws MojoExecutionException, MojoFailureException { + if (skip) { + getLog().info("Skipping plugin execution (configured skip)"); + return; + } FileSetManager mgr = new FileSetManager(); // this seems pretty hacky, but necessary to get the correct result. File inputFilesDirectory = new File(inputFiles.getDirectory()); diff --git a/asterixdb/asterix-maven-plugins/pom.xml b/asterixdb/asterix-maven-plugins/pom.xml index d854851..c76c286 100644 --- a/asterixdb/asterix-maven-plugins/pom.xml +++ b/asterixdb/asterix-maven-plugins/pom.xml @@ -19,9 +19,14 @@ !--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.asterix</groupId> <artifactId>asterix-maven-plugins</artifactId> <packaging>pom</packaging> + + <parent> + <artifactId>apache-asterixdb</artifactId> + <groupId>org.apache.asterix</groupId> + <version>0.9.3-SNAPSHOT</version> + </parent> <licenses> <license> @@ -35,21 +40,6 @@ <properties> <appendedResourcesDirectory>${basedir}/../src/main/appended-resources</appendedResourcesDirectory> </properties> - - <parent> - <artifactId>apache-asterixdb</artifactId> - <groupId>org.apache.asterix</groupId> - <version>0.9.3-SNAPSHOT</version> - </parent> - - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <type>jar</type> - <scope>compile</scope> - </dependency> - </dependencies> <modules> <module>lexer-generator-maven-plugin</module> diff --git a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml index 1f4bb63..5dc7be0 100644 --- a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml +++ b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml @@ -18,7 +18,6 @@ !--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.asterix</groupId> <artifactId>record-manager-generator-maven-plugin</artifactId> <parent> <artifactId>asterix-maven-plugins</artifactId> @@ -35,8 +34,11 @@ <dependencies> <dependency> <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> <artifactId>maven-model</artifactId> - <version>3.3.9</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml index c200252..b968fcc 100644 --- a/asterixdb/pom.xml +++ b/asterixdb/pom.xml @@ -51,7 +51,10 @@ <appendedResourcesDirectory>${basedir}/src/main/appended-resources</appendedResourcesDirectory> <sonar.jacoco.reportPath>${env.PWD}/target/jacoco-merged.exec</sonar.jacoco.reportPath> <debug.suspend.flag>n</debug.suspend.flag> + <skipTests>false</skipTests> + <maven.test.skip>false</maven.test.skip> <skip.surefire.tests>${skipTests}</skip.surefire.tests> + <skip.testResources>${maven.test.skip}</skip.testResources> <!-- Definition of tests in various categories which may be excluded --> <repeated.tests>**/RepeatedTest.java</repeated.tests> @@ -240,6 +243,21 @@ <goals> <goal>analyze-only</goal> </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>default-testResources</id> + <goals> + <goal>testResources</goal> + </goals> + <configuration> + <skip>${skip.testResources}</skip> + </configuration> </execution> </executions> </plugin> @@ -461,6 +479,11 @@ <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> <version>2.2.3</version> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>javacc-maven-plugin</artifactId> + <version>2.6</version> </plugin> </plugins> </pluginManagement> @@ -719,6 +742,16 @@ <version>3.3.9</version> </dependency> <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-model</artifactId> + <version>3.3.9</version> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.2.1</version> + </dependency> + <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-yarn-common</artifactId> <version>${hadoop.version}</version> diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml index 9de6526..28b60d3 100644 --- a/hyracks-fullstack/pom.xml +++ b/hyracks-fullstack/pom.xml @@ -58,6 +58,7 @@ <sonar.jacoco.reportPath>${env.PWD}/target/jacoco-merged.exec</sonar.jacoco.reportPath> <source-format.skip>false</source-format.skip> <skip.surefire.tests>${skipTests}</skip.surefire.tests> + <skip.testResources>${maven.test.skip}</skip.testResources> <!-- Definition of tests in various categories which may be excluded --> <hanging.pregelix.tests>**/pregelix/**/FailureRecovery*.java</hanging.pregelix.tests> @@ -272,27 +273,6 @@ </configuration> </plugin> <plugin> - <artifactId>maven-resources-plugin</artifactId> - <executions> - <execution> - <id>copy-resources</id> - <phase>validate</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>target</outputDirectory> - <resources> - <resource> - <directory>${root.dir}/src/main/appended-resources</directory> - <!-- <filtering>true</filtering> --> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-remote-resources-plugin</artifactId> <executions> @@ -358,6 +338,21 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>default-testResources</id> + <goals> + <goal>testResources</goal> + </goals> + <configuration> + <skip>${skip.testResources}</skip> + </configuration> + </execution> + </executions> + </plugin> </plugins> <pluginManagement> <plugins> -- To view, visit https://asterix-gerrit.ics.uci.edu/2213 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c46c2d6f3b678cddfbccbc8940ef58b424f9637 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael Blow <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]>
