<dependency> <groupId>joker.good.custom</groupId> <artifactId>ExceptionHandler-Model</artifactId> <version>0.0.1</version> <type>war</type> <!-- <scope>runtime</scope> --> </dependency>
我在项目配置了一个war但是没有配置overlay插件但是执行install命令的时候还是会打印下面的语句
[INFO] --- maven-war-plugin:2.2:war (default-war) @ Permission-Model ---
[INFO] Packaging webapp
[INFO] Assembling webapp [Permission-Model] in [/Users/zhoukai/Documents/myWorkspace/Permission-Model/target/Permission-Model]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/zhoukai/Documents/myWorkspace/Permission-Model/src/main/webapp]
[INFO] Processing overlay [ id joker.good.custom:ExceptionHandler-Model]
[INFO] Webapp assembled in [3267 msecs]
[INFO] Building war: /Users/zhoukai/Documents/myWorkspace/Permission-Model/target/Permission-Model.war
[INFO] WEB-INF/web.xml already added, skipping
我遇到的问题是这样..我在项目使用maven管理 然后使用了jrebel+jetty运行项目,项目依赖另一个war项目,这两个war项目之间lib饮用的差不多..所以运行的时候如果把模块war项目的lib引用到项目中就会报错:
[INFO] Adding overlay: jar:file:/Users/zhoukai/.m2/repository/joker/good/custom/ExceptionHandler-Model/0.0.1/ExceptionHandler-Model-0.0.1.war!/
[INFO] Copying WEB-INF/lib jar:file:/Users/zhoukai/.m2/repository/joker/good/custom/ExceptionHandler-Model/0.0.1/ExceptionHandler-Model-0.0.1.war!/WEB-INF/lib/ to /Users/zhoukai/Documents/myWorkspace/Permission-Model/target/tmp/webinf/WEB-INF/lib
[INFO] Copying WEB-INF/classes from [file:/Users/zhoukai/Documents/myWorkspace/Permission-Model/src/main/webapp/WEB-INF/classes/, jar:file:/Users/zhoukai/.m2/repository/joker/good/custom/ExceptionHandler-Model/0.0.1/ExceptionHandler-Model-0.0.1.war!/WEB-INF/classes/] to /Users/zhoukai/Documents/myWorkspace/Permission-Model/target/tmp/webinf/WEB-INF/classes
[WARNING] Failed startup of context o.m.j.p.JettyWebAppContext{/Permission-Model,[file:/Users/zhoukai/Documents/myWorkspace/Permission-Model/target/tmp/webinf/, file:/Users/zhoukai/Documents/myWorkspace/Permission-Model/src/main/webapp/, jar:file:/Users/zhoukai/.m2/repository/joker/good/custom/ExceptionHandler-Model/0.0.1/ExceptionHandler-Model-0.0.1.war!/]},file:/Users/zhoukai/Documents/myWorkspace/Permission-Model/src/main/webapp/
java.lang.IllegalStateException: Duplicate fragment name: spring_web for jar:file:/Users/zhoukai/.m2/repository/org/springframework/spring-web/3.2.2.RELEASE/spring-web-3.2.2.RELEASE.jar!/META-INF/web-fragment.xml and jar:file:/Users/zhoukai/Documents/myWorkspace/Permission-Model/target/tmp/webinf/WEB-INF/lib/spring-web-3.2.2.RELEASE.jar!/META-INF/web-fragment.xml
at org.eclipse.jetty.webapp.MetaData.addFragment(MetaData.java:244)
at org.eclipse.jetty.webapp.FragmentConfiguration.findWebFragments(FragmentConfiguration.java:72)
at org.eclipse.jetty.webapp.FragmentConfiguration.preConfigure(FragmentConfiguration.java:39)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:465)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:495)
at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppC......
我在插件配置了
<plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <overlays> <overlay> <groupId>joker.good.custom</groupId> <artifactId>ExceptionHandler-Model</artifactId> <excludes> <exclude>WEB-INF/lib/*</exclude> <exclude>WEB-INF/web.xml</exclude> </excludes> </overlay> </overlays> </configuration> </plugin>
您好,我也遇到了相同的问题,没有配置overlays却生成了overlay,请问您最后是如何解决的?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。