zoukankan      html  css  js  c++  java
  • maven copy jar 插件


     插件比较特殊 eclipse下的 首先声明插件
    1. <pluginManagement>
    2. <plugin>
    3. <groupId>org.apache.maven.plugins</groupId>
    4. <artifactId>maven-compiler-plugin</artifactId>
    5. <configuration>
    6. <source>1.6</source>
    7. <target>1.6</target>
    8. </configuration>
    9. </plugin>
    10. <plugin>
    11. <groupId>org.eclipse.m2e</groupId>
    12. <artifactId>lifecycle-mapping</artifactId>
    13. <version>1.0.0</version>
    14. <configuration>
    15. <lifecycleMappingMetadata>
    16. <pluginExecutions>
    17. <pluginExecution>
    18. <pluginExecutionFilter>
    19. <groupId>org.apache.maven.plugins</groupId>
    20. <artifactId>maven-dependency-plugin</artifactId>
    21. <versionRange>[2.0,)</versionRange>
    22. <goals>
    23. <goal>copy-dependencies</goal>
    24. </goals>
    25. </pluginExecutionFilter>
    26. <action>
    27. <ignore />
    28. </action>
    29. </pluginExecution>
    30. </pluginExecutions>
    31. </lifecycleMappingMetadata>
    32. </configuration>
    33. </plugin>
    34. </plugins>
    35. </pluginManagement>

    引入自定义插件

    1. <plugins>
    2. <!-- remove jar plugins -->
    3. <plugin>
    4. <groupId>org.apache.maven.plugins</groupId>
    5. <artifactId>maven-clean-plugin</artifactId>
    6. <executions>
    7. <execution>
    8. <id>clean</id>
    9. <phase>install</phase>
    10. <goals>
    11. <goal>clean</goal>
    12. </goals>
    13. <configuration>
    14. <directory>/src/main/webapp/WEB-INF/lib</directory>
    15. </configuration>
    16. </execution>
    17. </executions>
    18. </plugin>
    19. <!-- copy jar plugins -->
    20. <plugin>
    21. <groupId>org.apache.maven.plugins</groupId>
    22. <artifactId>maven-dependency-plugin</artifactId>
    23. <executions>
    24. <execution>
    25. <id>copy-dependencies</id>
    26. <phase>package</phase>
    27. <goals>
    28. <goal>copy-dependencies</goal>
    29. </goals>
    30. <configuration>
    31. <outputDirectory>src/main/webapp/WEB-INF/lib</outputDirectory>
    32. <excludeTransitive>false</excludeTransitive>
    33. <stripVersion>false</stripVersion> <!-- 复制jar 的时候去掉版本信息 true : 去掉 false: 不去掉 -->
    34. <includeScope>runtime</includeScope>
    35. </configuration>
    36. </execution>
    37. </executions>
    38. </plugin>

  • 相关阅读:
    程序员副业那些事:聊聊出书和录视频
    跳槽时,不敢要高工资也会对候选人不利
    SQL 查询今天、昨天、7天内、30天的数据
    jquery table按列名称排序
    Asp.Net微信js分享
    表格插件BootStrap-Table使用教程
    ASP.NET中IOC容器Autofac(依赖注入DI 控制反转IOC)
    IIS添加MIME类型.woff/.svg/.woff2/.eot/.otf.ttf
    div垂直居中水平居中css
    Asp.Net报https请求报传输流收到意外的 EOF 或 0 个字节
  • 原文地址:https://www.cnblogs.com/signheart/p/6609564.html
Copyright © 2011-2022 走看看