Pom.xml configuration for basic Hadoop MAVEN projects

Source: Internet
Author: User
<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> &LT;/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>


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.