| <?xml version="1.0"?> |
| <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| license agreements. See the NOTICE file distributed with this work for additional |
| information regarding copyright ownership. The ASF licenses this file to |
| You under the Apache License, Version 2.0 (the "License"); you may not use |
| this file except in compliance with the License. You may obtain a copy of |
| the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required |
| by applicable law or agreed to in writing, software distributed under the |
| License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS |
| OF ANY KIND, either express or implied. See the License for the specific |
| language governing permissions and limitations under the License. --> |
| <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/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <artifactId>arrow-java-root</artifactId> |
| <groupId>org.apache.arrow</groupId> |
| <version>0.9.0-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>arrow-format</artifactId> |
| <packaging>jar</packaging> |
| <name>Arrow Format</name> |
| |
| <properties> |
| <flatc.download.skip>false</flatc.download.skip> |
| <flatc.executable>${project.build.directory}/flatc-${os.detected.classifier}-${fbs.version}.exe</flatc.executable> |
| <flatc.generated.files>${project.build.directory}/generated-sources/flatc</flatc.generated.files> |
| <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>com.vlkan</groupId> |
| <artifactId>flatbuffers</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <extensions> |
| <!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property --> |
| <extension> |
| <groupId>kr.motd.maven</groupId> |
| <artifactId>os-maven-plugin</artifactId> |
| <version>${os-maven-plugin.version}</version> |
| </extension> |
| </extensions> |
| |
| <plugins> |
| <plugin> <!-- download the flatbuffer compiler --> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-flatc</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>com.vlkan</groupId> |
| <artifactId>flatc-${os.detected.classifier}</artifactId> |
| <version>${fbs.version}</version> |
| <type>exe</type> |
| <overWrite>true</overWrite> |
| <outputDirectory>${project.build.directory}</outputDirectory> |
| </artifactItem> |
| </artifactItems> |
| <skip>${flatc.download.skip}</skip> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.4.0</version> |
| <executions> |
| <execution> <!-- make the flatbuffer compiler executable --> |
| <id>script-chmod</id> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <phase>generate-sources</phase> |
| <configuration> |
| <executable>chmod</executable> |
| <arguments> |
| <argument>+x</argument> |
| <argument>${project.build.directory}/flatc-${os.detected.classifier}-${fbs.version}.exe</argument> |
| </arguments> |
| <skip>${flatc.download.skip}</skip> |
| </configuration> |
| </execution> |
| <execution> <!-- generate sources by executing the flatbuffer compiler --> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <phase>generate-sources</phase> |
| <configuration> |
| <executable>${flatc.executable}</executable> |
| <arguments> |
| <argument>-j</argument> |
| <argument>-o</argument> |
| <argument>${flatc.generated.files}</argument> |
| <argument>../../format/Schema.fbs</argument> |
| <argument>../../format/Tensor.fbs</argument> |
| <argument>../../format/File.fbs</argument> |
| <argument>../../format/Message.fbs</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> <!-- add the license header to the generated files --> |
| <groupId>com.mycila</groupId> |
| <artifactId>license-maven-plugin</artifactId> |
| <version>2.3</version> |
| <configuration> |
| <header>${basedir}/../../header</header> |
| <includes> |
| <include>**/*.java</include> |
| </includes> |
| </configuration> |
| <executions> |
| <execution> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>format</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> <!-- add generated sources to classpath --> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>1.9.1</version> |
| <executions> |
| <execution> |
| <id>add-generated-sources-to-classpath</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${flatc.generated.files}</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> <!-- no checkstyle on the generated code --> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-checkstyle-plugin</artifactId> |
| <configuration> |
| <skip>true</skip> |
| </configuration> |
| </plugin> |
| </plugins> |
| |
| </build> |
| </project> |