<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/maven-v4_0_0.xsd" > <modelversion >4.0.0</modelVersion> <groupId>terry.codex.hadoop</groupId> <artifactid>hadooptest </artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name >HadoopTest</name> <url>http://maven.apache.org</url> <properties> < Project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <dependencies > <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <ver sion>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupid >org.apache.hadoop</groupId> <artifactid>hadoop-client</artifactid> <version>2.5.0</version> </dependency> </dependencies> <build> <!--default source generation Code Catalogue-<sourceDirectory>src</sourceDirectory> <outputdirectory>${project.build.directory}/ Classes</outputdirectory> <!--${project.build.directory} is the target directory that we usually see--<!--default test source code Catalog---& Lt;testsourcedirectory>test</testsourcedirectory> <testoutputdirectory>${project.build.directory }/test-classes</testoutputdirectory> <!--default Resource directory--<resources> <resource> <directo ry>src</directory> <excludes> <exclude>**/*.java</exclude> </excludes> &L T;/resource> </resources> <!--default Test resource Directory--<testResources> <testResource> <dir
ectory>test</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testresources> <pluginManagement> <plugins> <plugin> <groupid>org.eclipse.m2e</groupid > <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <config
uration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactid >maven-dependency-plugin</artifactId> <versionrange>[2.0,) </versionRange> <goa ls> <goal>copy-dependencies</goal> </goals> </pluginexecutionfilter&
Gt <action> <ignore/> </action> </pluginExecution> </pluginexec utions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> & Lt;/pluginmAnagement> <plugins> <!--to copy the jar to the Lib directory under the target directory---<plugin> <groupid>org.apache. Maven.plugins</groupid> <artifactId>maven-dependency-plugin</artifactId> <version>2.0 </version> <executions> <execution> <id>copy-dependencies</id> <phas
e>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!--${project.build.directory} is the target directory we usually see--<outputdirectory>${
Project.build.directory}/lib</outputdirectory> <excludeTransitive>false</excludeTransitive> <stripVersion>true</stripVersion> </configuration> </execution> </EXECUTIONS&G
T </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactid>maven- Jar-plugin</artifactid> <version>2.0</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <!--tell Maven-jar-plugin to add a class-path element to MANIFEST. MF file-<classpathPrefix>lib/</classpathPrefix> <!--Classpathprefix indicates that, relative to the archive file, all dependencies should be in the "Lib" Folders-<!--<mainClass>theMainClass</mainClass>-<!--When a user executes a JAR file using the Lib command, use that element to define
Class names for lines--</manifest> </archive> </configuration> </plugin> </plugins>
</build> </project>