POM file changes: unnecessary declarations of projectId and versionId

Robert Buck rbuck at redhat.com
Fri Oct 7 13:25:44 UTC 2011


Hello,

I just pushed a change to some of the Maven POM files; I cleaned up some 
redundant declarations that made using IntelliJ with the RHQ project 
intolerable. Prior to this change nearly every third-party import, 
reference to types, and the like, would show up in red-line mode in 
source files, making it impossible to distinguish between legitimate 
coding typos/mistakes and Maven ones. While the change does not 
completely fix all Maven-to-IntelliJ integration issues, it does at 
least make use of IntelliJ tolerable with the RHQ project.

Properties that are inherited from a parent-POM should not be redeclared 
a second time. If this is done, source files in that module will show up 
as code-red files.

<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>

*<groupId>org.rhq</groupId>* < UNNECESSSARY
<artifactId>rhq-core-domain</artifactId>
<packaging>ejb</packaging>

The fix was simple, to remove the second groupId declaration.

diff --git a/modules/enterprise/server/ear/pom.xml 
b/modules/enterprise/server/ear/pom.xml
index 783e377..b0a5468 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -9,7 +9,6 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

*- <groupId>org.rhq</groupId>*
<artifactId>rhq-enterprise-server-ear</artifactId>
<packaging>ear</packaging>

For those IntelliJ users out there, hope your life is easier now. Lets 
find other ways of improving the POM files so that other IntelliJ 
limitations due to our use of Maven are resolved.

-Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/rhq-devel/attachments/20111007/877dc275/attachment.html 


More information about the rhq-devel mailing list