문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top