123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed 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. See accompanying LICENSE file.
- -->
- <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.hadoop</groupId>
- <artifactId>hadoop-project</artifactId>
- <version>2.0.5-alpha</version>
- <relativePath>../hadoop-project</relativePath>
- </parent>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-project-dist</artifactId>
- <version>2.0.5-alpha</version>
- <description>Apache Hadoop Project Dist POM</description>
- <name>Apache Hadoop Project Dist POM</name>
- <packaging>pom</packaging>
- <properties>
- <hadoop.tmp.dir>${project.build.directory}/test</hadoop.tmp.dir>
- <test.build.data>${project.build.directory}/test/data</test.build.data>
- <hadoop.log.dir>${project.build.directory}/log</hadoop.log.dir>
- <test.build.webapps>${project.build.directory}/test-classes/webapps</test.build.webapps>
- <test.cache.data>${project.build.directory}/test-classes</test.cache.data>
- <test.build.classes>${project.build.directory}/test-classes</test.build.classes>
- <hadoop.component>UNDEF</hadoop.component>
- <bundle.snappy>false</bundle.snappy>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-annotations</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-jar</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- <execution>
- <id>prepare-test-jar</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/*.class</include>
- <include>webapps/**</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>jar</goal>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <attach>true</attach>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <configLocation>file://${basedir}/dev-support/checkstyle.xml</configLocation>
- <failOnViolation>false</failOnViolation>
- <format>xml</format>
- <format>html</format>
- <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <linksource>true</linksource>
- <maxmemory>512m</maxmemory>
- <quiet>true</quiet>
- <verbose>false</verbose>
- <source>${maven.compile.source}</source>
- <charset>${maven.compile.encoding}</charset>
- <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
- <destDir>api</destDir>
- <groups>
- <group>
- <title>${project.name} API</title>
- <packages>org.apache.hadoop*</packages>
- </group>
- </groups>
- <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
- <docletArtifacts>
- <docletArtifact>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-annotations</artifactId>
- <version>${project.version}</version>
- </docletArtifact>
- </docletArtifacts>
- <useStandardDocletOptions>true</useStandardDocletOptions>
- <!-- switch on dependency-driven aggregation -->
- <includeDependencySources>false</includeDependencySources>
- <dependencySourceIncludes>
- <!-- include ONLY dependencies I control -->
- <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
- </dependencySourceIncludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>docs</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <jdiff.stable.api>0.20.2</jdiff.stable.api>
- <jdiff.stability>-unstable</jdiff.stability>
- <jdiff.compatibility></jdiff.compatibility>
- <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>javadoc</goal>
- </goals>
- <phase>prepare-package</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>findbugs</goal>
- </goals>
- <phase>prepare-package</phase>
- </execution>
- </executions>
- <configuration>
- <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>site</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>jdiff</groupId>
- <artifactId>jdiff</artifactId>
- <version>${jdiff.version}</version>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}</outputDirectory>
- <destFileName>jdiff.jar</destFileName>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-annotations</artifactId>
- <version>${project.version}</version>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}</outputDirectory>
- <destFileName>hadoop-annotations.jar</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>site</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target if="is.hadoop.component">
- <mkdir dir="${project.build.directory}/docs-src"/>
- <copy todir="${project.build.directory}/docs-src">
- <fileset dir="${basedir}/src/main/docs"/>
- </copy>
- <!-- Docs -->
- <copy file="${project.build.directory}/docs-src/releasenotes.html"
- todir="${project.build.directory}/site"/>
- <style basedir="${basedir}/src/main/resources"
- destdir="${project.build.directory}/site"
- includes="core-default.xml"
- style="${basedir}/src/main/xsl/configuration.xsl"/>
- <!-- Convert 'CHANGES.txt' to 'changes.html" -->
- <exec executable="perl" input="${basedir}/../CHANGES.txt"
- output="${project.build.directory}/site/changes.html"
- failonerror="true">
- <arg value="${project.build.directory}/docs-src/changes/changes2html.pl"/>
- </exec>
- <copy todir="${project.build.directory}/site">
- <fileset dir="${project.build.directory}/docs-src/changes" includes="*.css"/>
- </copy>
- <!-- Jdiff -->
- <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
- <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
- <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
- path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
- <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
- <param name="-apiname" value="hadoop-core ${project.version}"/>
- <param name="${jdiff.stability}"/>
- </doclet>
- <packageset dir="${basedir}/src/main/java"/>
- <classpath>
- <path refid="maven.compile.classpath"/>
- </classpath>
- </javadoc>
- <javadoc sourcepath="${basedir}/src/main/java"
- destdir="${project.build.directory}/site/jdiff/xml"
- sourceFiles="${basedir}/dev-support/jdiff/Null.java"
- maxmemory="${jdiff.javadoc.maxmemory}">
- <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
- path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
- <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
- <param name="-newapi" value="hadoop-core ${project.version}"/>
- <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
- <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
- <param name="-javadocold"
- value="http://hadoop.apache.org/docs/${jdiff.stable.api}/api/"/>
- <param name="-javadocnew" value="${project.build.directory}/site/api"/>
- <param name="-stats"/>
- <param name="${jdiff.stability}"/>
- <param name="${jdiff.compatibility}"/>
- </doclet>
- <classpath>
- <path refid="maven.compile.classpath"/>
- </classpath>
- </javadoc>
- <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
- in="${project.build.directory}/findbugsXml.xml"
- out="${project.build.directory}/site/findbugs.html"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>dist</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>pre-dist</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/dist-copynativelibs.sh">
- which cygpath 2> /dev/null
- if [ $? = 1 ]; then
- BUILD_DIR="${project.build.directory}"
- else
- BUILD_DIR=`cygpath --unix '${project.build.directory}'`
- fi
- TAR='tar cf -'
- UNTAR='tar xfBp -'
- LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
- if [ -d $${LIB_DIR} ] ; then
- TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
- mkdir -p $${TARGET_DIR}
- cd $${LIB_DIR}
- $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
- if [ "${bundle.snappy}" = "true" ] ; then
- cd ${snappy.lib}
- $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
- fi
- fi
- </echo>
- <exec executable="sh" dir="${project.build.directory}" failonerror="true">
- <arg line="./dist-copynativelibs.sh"/>
- </exec>
- </target>
- </configuration>
- </execution>
- <execution>
- <id>tar</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target if="tar">
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/dist-maketar.sh">
- which cygpath 2> /dev/null
- if [ $? = 1 ]; then
- BUILD_DIR="${project.build.directory}"
- else
- BUILD_DIR=`cygpath --unix '${project.build.directory}'`
- fi
- cd ${BUILD_DIR}
- tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
- </echo>
- <exec executable="sh" dir="${project.build.directory}" failonerror="true">
- <arg line="./dist-maketar.sh"/>
- </exec>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-assemblies</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>dist</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <attach>false</attach>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <descriptorRefs>
- <descriptorRef>hadoop-dist</descriptorRef>
- </descriptorRefs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- </project>
|