Tap*_*ose 8 java eclipse jar war
在我的应用程序中,我将一些jar设置为项目依赖项.此罐子作为用户库添加.当我在JBoss AS7中运行应用程序并且我使用JBoss服务器提供的JSF实现时,我从模块中复制了那些JSF jar并创建了一个新的用户库,即JBoss JSF.该库已用于在Eclipse中创建JSF 2 Dynamic Web Project.现在,当我将其作为WAR文件导出时,这些jsf jar会被自动复制并添加/WEB-INF/lib到战争中.我不希望这些文件被添加,因为它们已经存在于容器中.
有什么办法吗?
有关更多信息,这是.classpath文件的内容:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/common"/>
<classpathentry kind="src" path="src/service"/>
<classpathentry kind="src" path="src/web"/>
<classpathentry kind="src" path="src/persistent"/>
<classpathentry kind="src" path="src/dao"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss JSF">
<attributes>
<attribute name="owner.project.facets" value="jst.jsf"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss Servlet"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss log4j"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
Run Code Online (Sandbox Code Playgroud)
我的应用程序的部署程序集:

尝试这个
或者尝试向 .classpath 文件添加一个属性
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss JSF">
<attributes>
<attribute name="owner.project.facets" value="jst.jsf"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
Run Code Online (Sandbox Code Playgroud)