Community
Participate
Working Groups
I had a project with several modules with groupId: es.sidelab.pascaline Modules had a POM like this one: <parent> <artifactId>parent</artifactId> <groupId>es.sidelab.pascaline</groupId> <version>1.0.1-SNAPSHOT</version> <relativePath>../es.sidelab.pascaline.parent</relativePath> </parent> <groupId>es.sidelab.pascaline</groupId> <artifactId>net.sf.pascaline.cdtinterface</artifactId> <packaging>eclipse-plugin</packaging> I made a rename refactor to change the groupId to es.sidelab.pascaline.ide. The parent project was updated perfectly, but child modules were only updated partialy. This is the POM I ended up with in my child modules: <parent> <artifactId>parent</artifactId> <groupId>es.sidelab.pascaline.ide</groupId> <version>1.0.1-SNAPSHOT</version> <relativePath>../es.sidelab.pascaline.parent</relativePath> </parent> <groupId>es.sidelab.pascaline</groupId> <artifactId>net.sf.pascaline.cdtinterface</artifactId> <packaging>eclipse-plugin</packaging> The groupId within the parent section was updated, but the groupId outside this section remained the same. I decided not to list the groupId in child POMs, and let Maven resolve the groupId from the parent definition. However, I think the plugin should change child modules groupId declarations if the groupId matches the groupId of parent project. I'm using m2e version 0.12.1.
Observed behaviour is correct. Rename refactoring is only updates references to the artifact being renamed. It is not expected to make any other changes.
You don't have to duplicate the groupId declaration in the child modules (if the groupId is the same). If you want to keep all groupIds in sync, the best solution is to omit the groupId declaration in children. In the editor (in 0.13.x) we provide a warning hint that points out that you have duplicate groupId declaration in child and suggest to remove it.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/