hadoop程序相关Pom配置

<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>

  <groupId>com.js</groupId>
  <artifactId>MapReduce_Code</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>MapReduce_Code</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>
	    <version>3.8.1</version>
	    <scope>test</scope>
	   </dependency>
       <dependency>  
           <groupId>org.apache.hadoop</groupId>  
           <artifactId>hadoop-common</artifactId>  
           <version>2.5.2</version>  
       </dependency>  
       <dependency>  
           <groupId>org.apache.hadoop</groupId>  
           <artifactId>hadoop-hdfs</artifactId>  
           <version>2.5.2</version>  
       </dependency>  
       <dependency>  
           <groupId>org.apache.hadoop</groupId>  
           <artifactId>hadoop-mapreduce-client-core</artifactId>  
           <version>2.5.2</version>  
       </dependency>  
       <dependency>  
           <groupId>org.apache.hadoop</groupId>  
           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>  
           <version>2.5.2</version>  
       </dependency>  
       <dependency>  
           <groupId>org.apache.hadoop</groupId>  
           <artifactId>hadoop-mapreduce-client-common</artifactId>  
           <version>2.5.2</version>  
       </dependency>  
       <dependency>  
           <groupId>jdk.tools</groupId>  
           <artifactId>jdk.tools</artifactId>  
           <version>1.7</version>  
           <scope>system</scope>  
           <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>  
       </dependency>  
       <dependency>
		    <groupId>org.apache.hadoop</groupId>
		    <artifactId>hadoop-yarn-common</artifactId>
		    <version>2.5.2</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.hadoop</groupId>
		    <artifactId>hadoop-yarn-server-common</artifactId>
		    <version>2.5.2</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.hadoop</groupId>
		    <artifactId>hadoop-yarn-server-tests</artifactId>
		    <version>2.5.2</version>
		    <scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>org.apache.zookeeper</groupId>
		    <artifactId>zookeeper</artifactId>
		    <version>3.4.6</version>
		    <type>pom</type>
		</dependency>
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-api</artifactId>
		    <version>1.7.5</version>
		</dependency>
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-log4j12</artifactId>
		    <version>1.7.5</version>
		    <scope>test</scope>
		</dependency>

   </dependencies>
   
   <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>com.js.mapreduce.wordcount.RunJob</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-my-jar-with-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>

猜你喜欢

转载自blog.csdn.net/js54100804/article/details/79349681