1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <groupId>org.example</groupId> 5 <artifactId>edu_aliyecs</artifactId> 6 <packaging>jar</packaging> 7 <version>1.0-SNAPSHOT</version> 8 <name>Maven Quick Start Archetype</name> 9 <url>http://maven.apache.org</url> 10 11 <properties> 12 <!-- 指定编码--> 13 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 14 </properties> 15 16 <!--junit单元测试包--> 17 <dependencies> 18 <dependency> 19 <groupId>junit</groupId> 20 <artifactId>junit</artifactId> 21 <version>3.8.1</version> 22 <scope>test</scope> 23 </dependency> 24 25 <!-- flume工具包--> 26 <dependency> 27 <groupId>org.apache.flume</groupId> 28 <artifactId>flume-ng-core</artifactId> 29 <version>1.9.0</version> 30 <scope>provided</scope> 31 </dependency> 32 33 <!-- 案例json解析包--> 34 <dependency> 35 <groupId>com.alibaba</groupId> 36 <artifactId>fastjson</artifactId> 37 <version>1.2.62</version> 38 </dependency> 39 40 </dependencies> 41 <build> 42 <!--配置Maven 对文件进行排除 --> 43 <resources> 44 <resource> 45 <directory>src/main/resources</directory> 46 <excludes> 47 <exclude>**/*</exclude> 48 </excludes> 49 </resource> 50 <!-- <!–配置Maven 对以下后缀文件 不排除 –>--> 51 <!-- <resource>--> 52 <!-- <directory>src/main/resources</directory>--> 53 <!-- <includes>--> 54 <!-- <include>**/*.properties</include>--> 55 <!-- <include>**/*.conf</include>--> 56 <!-- <include>**/*.xml</include>--> 57 <!-- <include>**/*.ttf</include>--> 58 <!-- </includes>--> 59 <!-- <filtering>true</filtering>--> 60 <!-- </resource>--> 61 </resources> 62 63 <plugins> 64 <!-- 编译插件--> 65 <plugin> 66 <artifactId>maven-compiler-plugin</artifactId> 67 <version>2.3.2</version> 68 <configuration> 69 <source>1.8</source> 70 <target>1.8</target> 71 </configuration> 72 </plugin> 73 <!-- 打包插件--> 74 <plugin> 75 <artifactId>maven-assembly-plugin</artifactId> 76 <configuration> 77 <descriptorRefs> 78 <descriptorRef>jar-with-dependencies</descriptorRef> 79 </descriptorRefs> 80 </configuration> 81 <executions> 82 <execution> 83 <id>make-assembly</id> 84 <phase>package</phase> 85 <goals> 86 <goal>single</goal> 87 </goals> 88 </execution> 89 </executions> 90 </plugin> 91 </plugins> 92 </build> 93 94 </project>
标签:maven,常用,依赖,--,Maven,org,main,junit From: https://www.cnblogs.com/averyve/p/16755161.html