Package folder already used in project

Hi.

My main computer (A) has to be repaired, so I’m moving my project to the old one (B). That’s the setup of the project on the A computer:

  • Project name is Pinocchio.
  • The project is stored in a separate non versionated folder.
  • The source code and tests are in a separate git versionated folder.

So, I thought moving to computer B would be trivial. That’s what I tried to do:

  • I cloned the git repo.
  • I installed JME 3.
  • I create and set a new folder for JME3 projects.
  • I clicked on new project and selected Java -> New project with existing sources.
  • I put any name (for instance, “Grillo”).
  • I selected the folders from the repo.

However, JME 3 won’t allow me to. That’s what it tells me:

Package folder already used in project The following folders are already used in this or another project. A package folder can only be used in one project in one package folder list (source packages or test packages).

Already used package folders:
[/path/to/git/repo/src/ (owned by Pinocchio) ]

Those folders cannot be added to the project.

As you can see, test folders are added without trouble.

It seems like it was some netbeans generic problem, but I have never had such a problem in Netbeans. Having the sources versionated and the project on a separate folder is something that I’ve been doing for several years and has always worked fine until today.

I have tried to find where do JME3 find that the folder is used on a project called Pinocchio (on other git instance on other computer) but so far I’m clueless.

Java → New project with existing sources is the problem, you create a completely different project type there. Just make a BasicGame and check out the sources into the src folder.

Truth is I am working that way for a while and it’s a setup I feel particularly comfortable with.

Good news is I found what was telling that mentioned folder was part of “Pinocchio” project: pom.xml!

My (simplified) root folder is like this:

pom.xml src/ test/

And even when I didn’t tell JME3 anything about it being a pom project, it seems to use it to infere the sources are used in another project. Quite annoying (and I know it must be something inherited from Netbeans).

Anyway, deleting the pom.xml did the charm. I guess I can now restore it.

How can I mark this as solved?