I have a git repository with a bunch of projects, I am checking them out inside my eclipse workspace so I end up with a directory structure similar to this:
I am trying to activate the axis2 facet for project1, but it fails with a NullPointerException which I've tracked down to the "copy files into workspace" phase in the axis 2 plugin.
If I move project1 one level so it's a child of workspace, I can activate the facet without any issues. Moving the projects one level up won't work because there are other cloned git repos living there.
It seems to me like the axis2 plugin is trying to copy the files into either WORKSPACE_LOC/project1 or PARENT_LOC/project1, both WORKSPACE_LOC and PARENT_LOC are pointing to the base workspace directory and I seem unable to change them.
I tried added symbolic links to the workspace directory pointing to the project directories but it didn't work.
I have been able to replicate this outside the git context, just trying to add the axis2 facet to a project inside a directory inside the workspace will trigger it.
I have been able to replicate this in Eclipse Luna in Linux and Eclipse Juno in Mac.
This is the exception I'm getting:
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$2(FacetedProject.java:1117)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.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$4.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$5.run(FacetsPropertyPage.java:246)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
This was caused by an issue with the axis2 eclipse plugin, if you have your projects in a nested structure like this and you want to use it, you'll have to move them to a directory outside the workspace directory to prevent this from happening.