在我的应用程序中,我将一些 jar 设置为项目依赖项。这个 jars 被添加为用户库。当我在 JBoss AS7 中运行应用程序并使用 JBoss 服务器提供的 JSF 实现时,我已经从模块中复制了这些 JSF jar 并创建了一个新的用户库,即 JBoss JSF。该库已用于在 Eclipse 中创建 JSF 2 动态 Web 项目。现在,当我将其导出为 WAR 文件时,这些 jsf jar 会自动被复制并添加/WEB-INF/lib
到 war 中。我不希望添加这些文件,因为它们已经存在于容器中。
有什么办法吗?
有关更多信息,这是 .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>
我的应用程序的部署程序集: