123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062 |
- <?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>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-project</artifactId>
- <version>0.23.0-SNAPSHOT</version>
- <relativePath>../hadoop-project</relativePath>
- </parent>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-common</artifactId>
- <version>0.23.0-SNAPSHOT</version>
- <description>Apache Hadoop Common</description>
- <name>Apache Hadoop Common</name>
- <packaging>jar</packaging>
- <properties>
- <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>
- <build.platform>${os.name}-${os.arch}-${sun.arch.data.model}</build.platform>
- <snappy.prefix>/usr/local</snappy.prefix>
- <snappy.lib>${snappy.prefix}/lib</snappy.lib>
- <bundle.snappy>false</bundle.snappy>
-
- <hadoop.component>common</hadoop.component>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-annotations</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-math</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-el</groupId>
- <artifactId>commons-el</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>net.java.dev.jets3t</groupId>
- <artifactId>jets3t</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.mina</groupId>
- <artifactId>mina-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ftpserver</groupId>
- <artifactId>ftplet-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ftpserver</groupId>
- <artifactId>ftpserver-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ftpserver</groupId>
- <artifactId>ftpserver-deprecated</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jdt</groupId>
- <artifactId>core</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>avro</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>net.sf.kosmosfs</groupId>
- <artifactId>kfs</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>always</forkMode>
- <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
- <argLine>-Xmx1024m</argLine>
- <environmentVariables>
- <LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib</LD_LIBRARY_PATH>
- </environmentVariables>
- <systemPropertyVariables>
- <!-- TODO: all references in testcases should be updated to this default -->
- <test.build.data>${test.build.data}</test.build.data>
- <test.build.webapps>${test.build.webapps}</test.build.webapps>
- <test.cache.data>${test.cache.data}</test.cache.data>
- <hadoop.log.dir>${hadoop.log.dir}</hadoop.log.dir>
- <test.build.classes>${test.build.classes}</test.build.classes>
- <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
- <java.security.krb5.conf>${basedir}/src/test/resources/krb5.conf</java.security.krb5.conf>
- </systemPropertyVariables>
- <includes>
- <include>**/Test*.java</include>
- </includes>
- <excludes>
- <exclude>**/${test.exclude}.java</exclude>
- <exclude>${test.exclude.pattern}</exclude>
- <exclude>**/Test*$*.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- <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>
- </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-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>save-version</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <mkdir dir="${project.build.directory}/generated-sources/java"/>
- <exec executable="sh">
- <arg
- line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
- </exec>
- </target>
- </configuration>
- </execution>
- <execution>
- <id>generate-test-sources</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
- <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
- <classpath refid="maven.compile.classpath"/>
- </taskdef>
- <recordcc destdir="${project.build.directory}/generated-test-sources/java">
- <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
- </recordcc>
- <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
- <classpath refid="maven.test.classpath"/>
- </taskdef>
- <schema destdir="${project.build.directory}/generated-test-sources/java">
- <fileset dir="${basedir}/src/test">
- <include name="**/*.avsc"/>
- </fileset>
- </schema>
- <taskdef name="schema" classname="org.apache.avro.specific.ProtocolTask">
- <classpath refid="maven.test.classpath"/>
- </taskdef>
- <schema destdir="${project.build.directory}/generated-test-sources/java">
- <fileset dir="${basedir}/src/test">
- <include name="**/*.avpr"/>
- </fileset>
- </schema>
- </target>
- </configuration>
- </execution>
- <execution>
- <id>create-log-dir</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!--
- TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
- TODO: from a previous run is present
- -->
- <delete dir="${test.build.data}"/>
- <mkdir dir="${hadoop.log.dir}"/>
- <copy toDir="${project.build.directory}/test-classes">
- <fileset dir="${basedir}/src/main/conf"/>
- </copy>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-sources/java</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-test-sources/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </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.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>CHANGES.txt</exclude>
- <exclude>.idea/**</exclude>
- <exclude>src/main/conf/*</exclude>
- <exclude>src/main/docs/**</exclude>
- <exclude>dev-support/jdiff/**</exclude>
- <exclude>src/main/native/*</exclude>
- <exclude>src/main/native/config/*</exclude>
- <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
- <exclude>src/main/native/m4/*</exclude>
- <exclude>src/test/empty-file</exclude>
- <exclude>src/test/all-tests</exclude>
- </excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <linksource>true</linksource>
- <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>true</includeDependencySources>
- <dependencySourceIncludes>
- <!-- include ONLY dependencies I control -->
- <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
- </dependencySourceIncludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>native</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <snappy.prefix>/usr/local</snappy.prefix>
- <snappy.lib>${snappy.prefix}/lib</snappy.lib>
- <snappy.include>${snappy.prefix}/include</snappy.include>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <mkdir dir="${project.build.directory}/native/javah"/>
- <copy toDir="${project.build.directory}/native">
- <fileset dir="${basedir}/src/main/native"/>
- </copy>
- <mkdir dir="${project.build.directory}/native/m4"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>javah</goal>
- </goals>
- <configuration>
- <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
- <javahClassNames>
- <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
- <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
- <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
- <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
- <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
- <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
- <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
- <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
- </javahClassNames>
- <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>make-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <goals>
- <goal>autoreconf</goal>
- <goal>configure</goal>
- <goal>make-install</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!-- autoreconf settings -->
- <workDir>${project.build.directory}/native</workDir>
- <arguments>
- <argument>-i</argument>
- <argument>-f</argument>
- </arguments>
- <!-- configure settings -->
- <configureEnvironment>
- <property>
- <name>OS_NAME</name>
- <value>${os.name}</value>
- </property>
- <property>
- <name>OS_ARCH</name>
- <value>${os.arch}</value>
- </property>
- <property>
- <name>JVM_DATA_MODEL</name>
- <value>${sun.arch.data.model}</value>
- </property>
- </configureEnvironment>
- <configureOptions>
- <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
- <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
- </configureOptions>
- <configureWorkDir>${project.build.directory}/native</configureWorkDir>
- <prefix>/usr/local</prefix>
- <!-- make settings -->
- <installEnvironment>
- <property>
- <name>OS_NAME</name>
- <value>${os.name}</value>
- </property>
- <property>
- <name>OS_ARCH</name>
- <value>${os.arch}</value>
- </property>
- <property>
- <name>JVM_DATA_MODEL</name>
- <value>${sun.arch.data.model}</value>
- </property>
- <property>
- <name>HADOOP_NATIVE_SRCDIR</name>
- <value>${project.build.directory}/native</value>
- </property>
- </installEnvironment>
- <!-- configure & make settings -->
- <destDir>${project.build.directory}/native/target</destDir>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <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>${hadoop.annotations.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>
- <mkdir dir="${project.build.directory}/docs-src"/>
- <copy todir="${project.build.directory}/docs-src">
- <fileset dir="${basedir}/src/main/docs"/>
- </copy>
- <!-- Docs -->
- <exec dir="${project.build.directory}/docs-src"
- executable="${env.FORREST_HOME}/bin/forrest"
- failonerror="true">
- </exec>
- <copy todir="${project.build.directory}/site">
- <fileset dir="${project.build.directory}/docs-src/build/site"/>
- </copy>
- <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>src</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-assemblies</artifactId>
- <version>${hadoop.assemblies.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>pre-tar-src</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-src</descriptorRef>
- </descriptorRefs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>tar</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>pre-tar</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/tar-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/${build.platform}"
- mkdir -p $${TARGET_DIR}
- cd $${LIB_DIR}
- $$TAR *hadoop* | (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="./tar-copynativelibs.sh"/>
- </exec>
- </target>
- </configuration>
- </execution>
- <execution>
- <id>tar</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/tar-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="./tar-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>${hadoop.assemblies.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>pre-tar</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-tar</descriptorRef>
- </descriptorRefs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>bintar</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>pre-bintar</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/bintar-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}-bin/lib"
- mkdir -p $${TARGET_DIR}
- cd $${LIB_DIR}
- $$TAR *hadoop* | (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="./bintar-copynativelibs.sh"/>
- </exec>
- </target>
- </configuration>
- </execution>
- <execution>
- <id>bintar</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <!-- Using Unix script to preserve symlinks -->
- <echo file="${project.build.directory}/bintar-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}-bin.tar.gz ${project.artifactId}-${project.version}-bin
- </echo>
- <exec executable="sh" dir="${project.build.directory}" failonerror="true">
- <arg line="./bintar-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>${hadoop.assemblies.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>pre-bintar</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <attach>false</attach>
- <finalName>${project.artifactId}-${project.version}-bin</finalName>
- <descriptorRefs>
- <descriptorRef>hadoop-bintar</descriptorRef>
- </descriptorRefs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- </project>
|