无法将 Axis2 方面添加到具有 git 类结构的 eclipse 项目

Unable to add Axis2 facets to eclipse project with git-like structure

我有一个包含大量项目的 git 存储库,我正在我的 eclipse 工作区中检查它们,所以我最终得到一个类似于这样的目录结构:

我正在尝试为 project1 激活 axis2 facet,但它因 NullPointerException 而失败,我已追踪到 axis 2 插件中的 "copy files into workspace" 阶段。

如果我将 project1 移动一级使其成为工作区的子项,我可以毫无问题地激活该方面。将项目向上移动一层是行不通的,因为那里还有其他克隆的 git 存储库。

在我看来,axis2 插件正在尝试将文件复制到 WORKSPACE_LOC/project1 或 PARENT_LOC/project1,WORKSPACE_LOC 和 PARENT_LOC 都指向 base工作区目录,我似乎无法更改它们。

我尝试添加指向项目目录的工作区目录的符号链接,但没有成功。

我已经能够在 git 上下文之外复制它,只需尝试将 axis2 方面添加到工作区内目录内的项目就会触发它。

我已经能够在 Linux 的 Eclipse Luna 和 Mac 的 Eclipse Juno 中复制它。

这是我遇到的异常:

java.lang.NullPointerException
    at org.eclipse.jst.ws.axis2.facet.utils.ContentCopyUtils.makeFolderPathAtLocation(ContentCopyUtils.java:247)
    at org.eclipse.jst.ws.axis2.facet.utils.ContentCopyUtils.makeFolderPathAtLocation(ContentCopyUtils.java:292)
    at org.eclipse.jst.ws.axis2.facet.utils.ContentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(ContentCopyUtils.java:123)
    at org.eclipse.jst.ws.axis2.facet.commands.Axis2WebservicesServerCommand.executeOverride(Axis2WebservicesServerCommand.java:113)
    at org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetInstallDelegate.execute(Axis2CoreFacetInstallDelegate.java:43)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.run(FacetedProject.java:1099)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
    at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.run(FacetsPropertyPage.java:232)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
    at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.run(FacetsPropertyPage.java:246)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

这是由 axis2 eclipse 插件的问题引起的,如果您的项目处于这样的嵌套结构中并且您想要使用它,则必须将它们移动到工作区目录之外的目录中以防止这种情况发生。