parent

  1. <parent>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-parent</artifactId>
  4. <version>2.0.5.RELEASE</version>
  5. <relativePath/> <!-- lookup parent from repository -->
  6. </parent>

properties

  1. <properties>
  2. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  4. <java.version>1.8</java.version>
  5. </properties>

dependencies

  1. <!--scope含义:-->
  2. <!--compile:默认就是compile.表示被依赖项目需要参与当前项目的编译,当然后续的测试,运行周期也参与其中.-->
  3. <!--test: 表示依赖项目仅仅参与测试相关的工作-->
  4. <!--runntime: 无需参与项目的编译,不过后期的测试和运行周期需要其参与-->
  5. <!--provided: 打包的时候可以不用包进去。其余功能等同 compile.-->
  6. <!--<dependency>-->
  7. <!--<groupId>org.springframework.boot</groupId>-->
  8. <!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
  9. <!--<scope>provided</scope>-->
  10. <!--</dependency>-->
  11. <!--<dependency>-->
  12. <!--<groupId>org.springframework.boot</groupId>-->
  13. <!--<artifactId>spring-boot-starter-data-jpa</artifactId>-->
  14. <!--</dependency>-->
  15. <dependency>
  16. <groupId>com.soyuan</groupId>
  17. <artifactId>phoenix-client</artifactId>
  18. <version>4.7.0</version>
  19. <scope>system</scope>
  20. <systemPath>${project.basedir}/lib/phoenix-client-4.7.0.jar</systemPath>
  21. </dependency>

plugin

  1. <pluginManagement>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-maven-plugin</artifactId>
  6. <configuration>
  7. <layout>ZIP</layout>
  8. <includes>
  9. <include>
  10. <groupId>nothing</groupId>
  11. <artifactId>nothing</artifactId>
  12. </include>
  13. </includes>
  14. <attach>false</attach>
  15. </configuration>
  16. </plugin>
  17. <plugin>
  18. <groupId>org.apache.maven.plugins</groupId>
  19. <artifactId>maven-compiler-plugin</artifactId>
  20. <version>3.2</version>
  21. <configuration>
  22. <source>1.8</source>
  23. <target>1.8</target>
  24. <encoding>utf-8</encoding>
  25. </configuration>
  26. </plugin>
  27. <plugin>
  28. <groupId>org.apache.maven.plugins</groupId>
  29. <artifactId>maven-resources-plugin</artifactId>
  30. <configuration>
  31. <encoding>utf-8</encoding>
  32. </configuration>
  33. </plugin>
  34. <!-- 跳过单元测试 -->
  35. <plugin>
  36. <groupId>org.apache.maven.plugins</groupId>
  37. <artifactId>maven-surefire-plugin</artifactId>
  38. <configuration>
  39. <skipTests>true</skipTests>
  40. </configuration>
  41. </plugin>
  42. <plugin>
  43. <groupId>org.apache.maven.plugins</groupId>
  44. <artifactId>maven-war-plugin</artifactId>
  45. <version>2.4</version>
  46. <configuration>
  47. <warSourceDirectory>src/main/webapp</warSourceDirectory>
  48. <warName>ETL</warName>
  49. <failOnMissingWebXml>false</failOnMissingWebXml>
  50. <resourceEncoding>utf-8</resourceEncoding>
  51. </configuration>
  52. </plugin>
  53. <plugin>
  54. <groupId>org.apache.tomcat.maven</groupId>
  55. <artifactId>tomcat7-maven-plugin</artifactId>
  56. <version>2.2</version>
  57. <configuration>
  58. <hostName>http://localhost:8080/manager/text</hostName>
  59. <port>8080</port>
  60. <path>/ETL</path>
  61. <uriEncoding>UTF-8</uriEncoding>
  62. <server>tomcat</server>
  63. <username>admin</username>
  64. <password>admin</password>
  65. </configuration>
  66. </plugin>
  67. <!-- Javadoc -->
  68. <plugin>
  69. <groupId>org.apache.maven.plugins</groupId>
  70. <artifactId>maven-javadoc-plugin</artifactId>
  71. <version>3.0.1</version>
  72. <executions>
  73. <execution>
  74. <phase>package</phase>
  75. <goals>
  76. <goal>jar</goal>
  77. </goals>
  78. </execution>
  79. </executions>
  80. </plugin>
  81. <!-- 依赖分离-->
  82. <plugin>
  83. <groupId>org.apache.maven.plugins</groupId>
  84. <artifactId>maven-dependency-plugin</artifactId>
  85. <executions>
  86. <execution>
  87. <id>copy-dependencies</id>
  88. <phase>package</phase>
  89. <goals>
  90. <goal>copy-dependencies</goal>
  91. </goals>
  92. <configuration>
  93. <type>jar</type>
  94. <includeTypes>jar</includeTypes>
  95. <includeScope>runtime</includeScope>
  96. <outputDirectory>
  97. ${project.build.directory}/libs
  98. </outputDirectory>
  99. </configuration>
  100. </execution>
  101. </executions>
  102. </plugin>
  103. </plugins>
  104. </pluginManagement>

profiles

<profiles>
    <profile>
        <id>dev</id>
        <properties>
            <profiles.active>dev</profiles.active>
        </properties>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
    </profile>
    <profile>
        <id>test</id>
        <properties>
            <profiles.active>test</profiles.active>
        </properties>
    </profile>
</profiles>

repository

<repositories>
    <repository>
        <id>public</id>
        <name>aliyun nexus</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>public</id>
        <name>aliyun nexus</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>