dev@glassfish.java.net

Serious issue with Grizzly pom.xml

From: Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 09 Oct 2009 01:09:54 +0530

While trying to debug a GFv3 startup problem on AIX platform [1], I had
to build grizzly version 1.9.18b in order to look at the source for a
generated class. While building the above version, I noticed mvn using a
SNAPSHOT version of HK2 in the build. That was a bit surprising as I was
building a non-SNAPSHOT version of grizzly. When I ran
'mvn help:effective-pom -f /tmp/grizzly-1.9.18b/modules/config/pom.xml,'
I found the following lines in the effective pom which explains why the
build was using SNAPSHOT version of HK2:

/ <plugin>
        <groupId>com.sun.enterprise</groupId>
        <artifactId>hk2-maven-plugin</artifactId>
        <version>0.3.99-SNAPSHOT</version>
/
Looking further, I saw there was no mention of version in config/pom.xml
for the above plugin, so mvn decided to use 0.3.99-SNAPSHOT as the
version as that's the latest version out there. It really makes the
build non-reproducible. So, I suggest grizzly team take a look at their
pom and add an explicit version wherever it is missing.

I also noticed a couple more issues in their pom.xmls. e.g., parent
pom.xml uses maven-bundle-plugin version 1.4.3 where as config/pom.xml
uses version 1.4.0. Use pluginManagement and dependencyManagement to
avoid such issues. I also noticed duplicate repository definitions; some
configure the repo with SNAPSHOT update policy as default and some as never.

I also noticed that maven-bundle-plugin has been configured with a fixed
set of packages in Import-Package instructions. I doubt grizzly
developers keep it in synch with source code, otherwise we would not
have missed some mandatory packages in Import-Package. This wasted my
entire day.

The reason for writing this email in dev@ is that I am hoping other
developers who are maintaining such pom.xmls outside glassfish/v3 should
review them from these angles.

Thanks,
Sahoo

[1] https://glassfish.dev.java.net/issues/show_bug.cgi?id=9986