eclipse中不能添加JBoss 5.0作为Server

eclipse中不能添加JBoss 5.0作为Server(转)

eclipse中不能添加JBoss 5.0作为Server
关键字: j2ee eclipse jboss5

报错是"Missing classpath entry C:/jboss-5.0.0.GA/server/default/lib/mail.jar"

这个问题在eclipse的bug中心可以找到 https://bugs.eclipse.org/bugs/show_bug.cgi?id=257823

原因是JBoss 5.0 GA release的目录结构和之前不一样了,而eclipse的对应插件没有相应的更改

解决办法:

到下面的目录中修改jboss5.serverdef

C:\ejb3\eclipse-jee-ganymede-SR1-win32\plugins\org.eclipse.jst.server.generic.jboss_1.5.205.v200805140145\servers\jboss5.serverdef

找到下面这一段并且做相应的修改

Xml代码

  1. <classpath id="jboss.project" >
  2. <fileset dir="${serverRootDirectory}">
  3. <include name="client/*.jar" />
  4. <include name="server/default/lib/*.jar" />
  5. <include name="server/default/deployers/jbossweb.deployer/jsf-libs/*.jar" />
  6. <!-- This will be ignored if EJB3 is not there 5.0 -->
  7. <include name="lib/*.jar" />
  8. <include name="server/default/deployers/jbossweb.deployer/*.jar" />
  9. <include name="server/default/deployers/jboss-aop-jboss5.deployer/*.jar" />
  10. <include name="server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar" />
  11. <!-- for validation to work this library is defined as an archive -->
  12. <exclude name="common/lib/mail.jar" />
  13. </fileset>
  14. <!-- leave one generic jar as an archive so that validation works -->
  15. <archive path="${serverRootDirectory}/common/lib/mail.jar" />
  16. </classpath>

你可能感兴趣的:(eclipse中不能添加JBoss 5.0作为Server)