在Eclipse当中使用wro4j-maven-plugin做代码压缩时候出现问题
问题现象:
Plugin execution not covered by lifecycle configuration: ro.isdc.wro4j:wro4j-maven-plugin:1.7.6:run (execution: default, phase: generate-resources) pom.xml /angularjs-security line 85 Maven Project Build Lifecycle Mapping Problem
解决方式:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--巴拉巴拉 省略 -->
</plugins>
<!--配置下面代码告诉Eclipse如何编译-->
<!-- configure #!@ m2eclipse -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<versionRange>[1.0,]</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
问题研究(这算是一类问题)
since Eclipse is all about incremental building (i.e. builds modified resources as soon as they're saved),
triggering long-running maven plugin every time a file is changed in the workspace would be a disaster. So m2e requires users to be explicit about what maven plugins should be run and when.
As a consequence, in order for these unknown plugins to be run on incremental builds, users need to modify their project pom.xml (or their parent pom.xml) and add a lifecycle-mapping configuration like (in the case of wro4j) :
- See more at: https://developer.jboss.org/en/tools/blog/2012/01/17/css-and-js-minification-using-eclipse-maven-and-wro4j#sthash.7BbFWjdj.dpuf
====================
Enjoy It!
====================
Tobato 2015-05-12
====================
分享到:
相关推荐
m2eclipse这个工具比较有用,在官网上弄,费劲。
maven2的插件,用于在eclipse下进行maven2的快速配置 打开eclipse .选择菜单 window ->preferences ; 在新打开的对话框的左边的一列会看到一个名为Maven2的选项。鼠标单击,然后点击右边的Local Repository Folder ...
m2eclipse provides comprehensive Maven integration for Eclipse. You can use m2eclipse to manage both simple and multi-module Maven projects, execute Maven builds via the Eclipse interface, and ...
基于阿里的dubbo的案例开发,有服务端和客户端。
Eclipse/sts启动时,The Maven Integration requires that Eclipse be running in a JDK
maven2之m2eclipse使用手册.doc
for eclipse 3.5+。 插件安装时,我们只需在eclipse根目录下新建一个【links】目录,然后在里面创建【.link】扩展名的文件,在里面写上类似于【path=F:\\IDE\\eclipsePlugin\\maven2】这样的配置信息,不就可以统一...
org.maven.ide.eclipse.jdt_0.12.1.20110112-1712.jar
eclipse-maven3-plugin插件 包含apache-maven-3.3.9和eclipse-maven3-plugin
java视频教程之SVN Maven搭建自动化构建教程 Eclipse中使用Maven视频教程云盘下载链接
压缩包里有maven的安装以及eclipse安装maven插件的资料,压缩包里有maven的安装以及eclipse安装maven插件的资料
介绍maven 安装,maven Eclipse环境集成。maven是apache出的能够方便工程构建的可代替ant的软件。
支持maven2 maven3 通用版本eclipse插件,在maven官网下载apache-maven-3.2.1-bin.zip,解压插件压缩包到path=D:\m2e-0.12.0.20101115-1102 在eclipse新建links文件夹,新建文件maven23.link,内容为:path=D:/m2e-...
Maven2+Eclipse开发J2EE.pdf Maven2_基础教程.pdf maven2之m2eclipse使用手册.doc Maven2使用.ppt maven2完全使用手册.docx Maven_介绍培训.pptx Maven学习指南.pdf Maven实战.doc Maven实战.pdf Maven构建并管理...
教你如何给eclipse安装maven插件,废话不多说,有图有真相
对于eclipse无法在线安装maven插件的解决办法。首先windows配置maven环境,然后在eclipse离线安装maven插件。具体方法可以在我的博客中看到
打开并输入:path= D:/Development/eclipse-JavaEE/eclipse/plugins/maven(请参照上面对应你的 maven 插件) 4. 重启 eclipse,OK,完成了,启动后你打开Window ---> Preferences 会发现一个多了一个选项Maven...
ECLIPSE MAVEN3插件文件(eclipse-maven3-plugin工具)
maven.rar
maven+tomcat+eclipse配置实例