1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
| <?xml version="1.0" encoding="UTF-8"?> <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:项目或者组织的唯一标志,并且配置时生成路径也是由此生成,如org.myproject.mojo生成的相对路径为:/org/myproject/mojo--> <groupId>com.dong</groupId> <!--项目的通用名称--> <artifactId>bigdata</artifactId> <!--打包机制,如pom,jar,maven-plugin,ejb,war,ear,rar,par--> <packaging>jar</packaging> <!--项目的版本--> <version>1.0-SNAPSHOT</version>
<!-- ####################### 项目信息 ###################### --> <!--用户描述项目的名称,无关紧要的东西--> <name>bigdata</name> <!--写明开发团队的网站,无关紧要--> <url>http://http://www.dong.com/.com</url>
<!-- ####################### 环境设置 ###################### --> <properties> <!-- 项目执行脚本目录 --> <project.script.execute.directory>src/main/scripts/execute</project.script.execute.directory> <!-- 项目说明文档目录 --> <project.document.directory>document</project.document.directory> <!-- 项目配置文件目录 --> <project.config.directory>src/main/resources</project.config.directory> <!-- 项目编码 --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 本地编译JDK版本 --> <maven.compiler.source>1.8</maven.compiler.source> <!-- 项目部署JDK版本 --> <maven.compiler.target>1.8</maven.compiler.target> </properties>
<!-- 配置Maven的仓库, 在此处配置的仓库会优先于setting.xml里配置的仓库, 建议哪个仓库快,哪个配置在前面, 然后如果Maven在前面配置的仓库找不到的话会去后面的仓库找, 如果后面的仓库都找不到,会去setting.xml中央仓库里找 --> <repositories> <!-- 阿里云仓库,配置Maven仓库,速度快配置在最前面 --> <repository> <id>aliyun</id> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </repository> <!-- 国内备选仓库 --> <repository> <id>repo2</id> <url>http://repo2.maven.org/maven2/</url> </repository>
<!-- Cloudera仓库,如果在阿里云仓库里找不到去Cloudera的仓库里找,主要是CDH版本Hadoop依赖的jar --> <repository> <id>cloudera</id> <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url> </repository>
<!-- Scala仓库,如果前面两个都找不到来仓库找,如果此仓库也找不到,去中央仓库找 --> <repository> <id>scala-tools.org</id> <name>Scala-Tools Maven2 Repository</name> <url>http://scala-tools.org/repo-releases</url> </repository> </repositories>
<dependencies> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.4</version> </dependency> </dependencies>
<build> <finalName>dong</finalName> <plugins> <!-- The configuration of maven-jar-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <!-- 对要打的jar包进行配置 --> <configuration> <!-- Configuration of the archiver --> <archive> <!--生成的jar中,不要包含pom.xml和pom.properties这两个文件--> <addMavenDescriptor>false</addMavenDescriptor>
<!-- Manifest specific configuration --> <manifest> <!--是否要把第三方jar放到manifest的classpath中--> <addClasspath>true</addClasspath>
<!-- 生成的manifest中classpath的前缀, 因为要把第三方jar放到lib目录下, 所以classpath的前缀是lib/ --> <classpathPrefix>lib/</classpathPrefix> </manifest> </archive> <!--过滤掉不希望包含在jar中的文件--> <excludes> <!-- 排除不需要的文件夹(路径是jar包内部的路径) --> <exclude>**/assembly/</exclude> </excludes> </configuration> </plugin>
<!-- The configuration of maven-assembly-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <!-- 对项目的组装进行配置 --> <configuration> <!-- 指定assembly插件的配置文件所在位置 --> <descriptors> <descriptor>src/main/resources/assembly/package.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <!-- 将组装绑定到maven生命周期的哪一阶段 --> <!--<phase>package</phase>--> <goals> <!-- 指定assembly插件的打包方式--> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
|