All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.maven.org.apache.parquet.parquet-format-structures.pom.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
  - 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>
    <groupId>org.apache.parquet</groupId>
    <artifactId>parquet</artifactId>
    <relativePath>../pom.xml</relativePath>
    <version>1.13.1</version>
  </parent>

  <artifactId>parquet-format-structures</artifactId>
  <packaging>jar</packaging>

  <name>Apache Parquet Format Structures</name>
  <url>https://parquet.apache.org/</url>
  <description>Parquet-mr related java classes to use the parquet-format thrift structures.</description>

  <properties>
    <parquet.thrift.path>${project.build.directory}/parquet-format-thrift</parquet.thrift.path>
  </properties>

  <build>
    <plugins>
      <!-- Getting the parquet-format thrift file -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
         <executions>
           <execution>
             <id>unpack</id>
             <phase>initialize</phase>
             <goals>
               <goal>unpack</goal>
             </goals>
             <configuration>
               <artifactItems>
                 <artifactItem>
                   <groupId>org.apache.parquet</groupId>
                   <artifactId>parquet-format</artifactId>
                   <version>${parquet.format.version}</version>
                   <type>jar</type>
                 </artifactItem>
               </artifactItems>
               <includes>parquet.thrift</includes>
               <outputDirectory>${parquet.thrift.path}</outputDirectory>
             </configuration>
           </execution>
         </executions>
       </plugin>
      <!-- thrift -->
      <plugin>
        <groupId>org.apache.thrift</groupId>
        <artifactId>thrift-maven-plugin</artifactId>
        <version>${thrift-maven-plugin.version}</version>
        <configuration>
          <thriftSourceRoot>${parquet.thrift.path}</thriftSourceRoot>
          <thriftExecutable>${format.thrift.executable}</thriftExecutable>
        </configuration>
        <executions>
          <execution>
            <id>thrift-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
              <artifactSet>
                <includes>
                  <include>org.apache.thrift:libthrift</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <!-- Sigh. The Thrift jar contains its source -->
                  <artifact>org.apache.thrift:libthrift</artifact>
                  <excludes>
                    <exclude>**/*.java</exclude>
                    <exclude>META-INF/LICENSE.txt</exclude>
                    <exclude>META-INF/NOTICE.txt</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>org.apache.thrift</pattern>
                  <shadedPattern>${shade.prefix}.org.apache.thrift</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Configure build/javadoc as well to support "mvn javadoc:javadoc" -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <!-- We have to turn off the javadoc check because thrift generates improper comments -->
          <doclint>none</doclint>
          <source>8</source>
          <quiet>true</quiet>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reports>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <!-- We have to turn off the javadoc check because thrift generates improper comments -->
          <doclint>none</doclint>
          <source>8</source>
        </configuration>
      </plugin>
    </plugins>
  </reports>

  <dependencies>
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>${format.thrift.version}</version>
    </dependency>
  </dependencies>

  <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}' &amp;&amp; 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>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy