Question

Let's say I have several poms with dependencies on each other. There's a class in one project that is used in several others. I want to perform a refactoring (like rename on that class) that updates all the projects.

I tried to accomplish this by adding the maven projects via the Maven Projects pane. This lets me see all the code and compile, but when I try to refactor, I get an error message saying "Cannot perform refactoring. Selected field is not located inside project." How can I make all these maven projects behave like a single project?

edit Pebkac strikes again. I had problems with my poms. I fixed those, and now everything works as expected.

Was it helpful?

Solution

You want a multi-module maven project, with the modules defined in a parent pom. You then tell idea to create or open a project from the parent pom. All modules then form part of the project, and your refactorings should work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top