阿里云Hadoop开发自动打包上传运行maven的pom.xml
来源:互联网 发布:e63诺基亚软件下载网址 编辑:程序博客网 时间:2024/06/05 10:27
目录的输入与输出:
pom.xml文件配置内容:
<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>hadoop0</groupId> <artifactId>hadoop0</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>hadoop0</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <hadoop.version>2.6.0</hadoop.version> <jdiff.version>1.0.9</jdiff.version> <remote.home>/root</remote.home> <remote.host>IP马赛克</remote.host> <remote.username>账户马赛克</remote.username> <remote.password>密码马赛克</remote.password> <bas.dir>./</bas.dir> <dist.dir>${bas.dir}/target/</dist.dir> <jar.name>WordCount</jar.name> <jar.file>${jar.name}.jar</jar.file> <remote.dir>${remote.home}</remote.dir> <main.class>hadoop0.hadoop0.WordCount</main.class> <outpath1>/input/wc.txt</outpath1> <outpath2>/output/wc4</outpath2> <hadoop.conf>-D mapreduce.map.java.opts=-Xmx2048m -D mapreduce.input.fileinputformat.split.minsize=1 -Dmapreduce.input.fileinputformat.split.maxsize=512000000 -D mapred.linerecordreader.maxlength=32768</hadoop.conf> <ssh.cmd>source ${remote.home}/.bashrc;/root/hadoop-2.6.0/bin/hadoop jar ${remote.dir}/${jar.file} ${hadoop.conf} ${outpath1} ${outpath2}</ssh.cmd> </properties> <build> <finalName>${jar.name}</finalName> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>root/</classpathPrefix> <mainClass>${main.class}</mainClass> </manifest> </archive> </configuration> </plugin> <!-- //sss --> <plugin> <inherited>false</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>test</id> <phase>install</phase> <goals> <goal>run</goal> </goals> <configuration> <target name="a-test" description="how to get antrun plugin to work with SCP and SSH"> <echo message="Remember to fill empty fields..." /> file to be transferred <scp trust="true" failonerror="true" verbose="off" sftp="true" file="${dist.dir}/${jar.file}" todir="${remote.username}:${remote.password}@${remote.host}:${remote.dir}/${jar.file}" /> calls deploy script <sshexec host="${remote.host}" trust="yes" username="${remote.username}" password="${remote.password}" command="bash -c '${ssh.cmd}'" /> SSH <taskdef name="sshexec" classname="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="maven.plugin.classpath" /> <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp"> <classpath refid="maven.plugin.classpath" /> </taskdef> </target> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>ant</groupId> <artifactId>ant-commons-net</artifactId> <version>1.6.5</version> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-jsch</artifactId> <version>1.9.1</version> </dependency> </dependencies> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.6</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-ant-tasks</artifactId> <version>2.0.9</version> </dependency> </dependencies></project>
本地eclipse运行:
0 0
- 阿里云Hadoop开发自动打包上传运行maven的pom.xml
- Maven 打包插件的pom.xml配置
- hadoop maven pom.xml文件的配置
- maven自动打包上传
- maven打包去掉测试的部分pom.xml配置
- MAVEN的pom.xml
- maven的pom.xml
- Java操作Hadoop时Maven的pom.xml
- 基本Hadoop Maven项目的pom.xml配置
- idea 设置maven pom.xml的自动提示
- maven的配置,maven构建工程,pom.xml文件配置,maven打包
- maven 指定jdk运行 非pom.xml
- maven的pom.xml详解
- Maven的配置文件pom.xml
- Maven的配置文件pom.xml
- Maven的pom.xml笔记
- Maven的配置文件pom.xml
- maven项目的pom.xml
- linux 原2
- Android Studio常用快捷键、Android Studio快捷键大全
- C#操作Word导致 “Microsoft.Office.Interop.Word.ApplicationClass”的 COM 组件错误的解决方法
- 【Poj1818】ATP 二分+贪心
- 第116课: Spark Streaming性能优化:如何在毫秒内处理处理大吞吐量的和数据波动比较大 的程序
- 阿里云Hadoop开发自动打包上传运行maven的pom.xml
- Servlet&JSP (一)基础
- 使用ZooKeeper实现Java跨JVM的分布式锁(读写锁)
- 基于spark实现的CRF模型的使用与源码分析
- hdu2044 一只小蜜蜂....
- A. Nicholas and Permutation
- NDIS Filter Study
- 地图寻宝
- ViewInject原理