Repository: parquet-mr Updated Branches: refs/heads/master e6da0f682 -> a0e6cc32c
PARQUET-727: Ensure correct version of thrift is used This will make the build fail if the wrong version of thrift is used before building the generated sources fails. Author: Niels Basjes <[email protected]> Closes #371 from nielsbasjes/PARQUET-727 and squashes the following commits: f6e447b [Niels Basjes] PARQUET-727: Moved check to profile that is only active on non-Windows systems. 732ef39 [Niels Basjes] PARQUET-727: Ensure correct version of thrift is used Project: http://git-wip-us.apache.org/repos/asf/parquet-mr/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-mr/commit/a0e6cc32 Tree: http://git-wip-us.apache.org/repos/asf/parquet-mr/tree/a0e6cc32 Diff: http://git-wip-us.apache.org/repos/asf/parquet-mr/diff/a0e6cc32 Branch: refs/heads/master Commit: a0e6cc32c79ea725c72bc80335884635fe570ce1 Parents: e6da0f6 Author: Niels Basjes <[email protected]> Authored: Fri Oct 7 14:28:40 2016 -0700 Committer: Julien Le Dem <[email protected]> Committed: Fri Oct 7 14:28:40 2016 -0700 ---------------------------------------------------------------------- parquet-thrift/pom.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/a0e6cc32/parquet-thrift/pom.xml ---------------------------------------------------------------------- diff --git a/parquet-thrift/pom.xml b/parquet-thrift/pom.xml index d2cee27..d554455 100644 --- a/parquet-thrift/pom.xml +++ b/parquet-thrift/pom.xml @@ -163,5 +163,51 @@ <artifactId>maven-shade-plugin</artifactId> </plugin> </plugins> - </build> + </build> + + <profiles> + <profile> + <activation> + <os> + <family>!windows</family> + </os> + </activation> + <id>UnixClassOS</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>check-thrift-version</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>sh</executable> + <workingDirectory>${basedir}</workingDirectory> + <arguments> + <argument>-c</argument> + <argument>${thrift.executable} -version | fgrep 'Thrift version ${thrift.version}' && exit 0; + echo "================================================================================="; + echo "========== [FATAL] Build is configured to require Thrift version ${thrift.version} =========="; + echo -n "========== Currently installed: "; + ${thrift.executable} -version; + echo "================================================================================="; + exit 1 + </argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> + </profile> + </profiles> + </project>
