티스토리 뷰

노트/메모

pom.xml for Hadoop

Jae-seong Yoo 2015. 4. 20. 11:12

<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.hadoop_test</groupId>
  <artifactId>hadoop_examples</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</project>
 
 
 
<properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <hadoop.version>1.2.1</hadoop.version>
   
</properties>



<repositories>
   
    <repository>
        <id>repository.jboss.org</id>
        <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
        <snapshots>
            <enabled>flase</enabled>
        </snapshots>
    </repository>

</repositories>



<dependencies>

    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>${hadoop.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
    </dependency>

</dependencies>



<build>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
           
            <dependencies>
                <dependency>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant-jsch</artifactId>
                    <version>1.9.1</version>
                </dependency>
               
                <dependency>
                    <groupId>com.jcraft</groupId>
                    <artifactId>jsch</artifactId>
                    <version>0.1.50</version>               
                </dependency>
            </dependencies>
           
           
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <tasks>
                            <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpathref="maven.dependency.classpath" />
                            <scp file="target/${project.artifactId}-${project.version}.jar" todir="userId:userPwd@targetHost:targetDirectory" />
                        </tasks>
                    </configuration>
                </execution>
           
            </executions>
        </plugin>
    </plugins>
   
</build>