dev@glassfish.java.net

Re: maven pom.xml conventions

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 04 May 2012 16:01:13 -0700

Romain Grécourt wrote on 05/04/12 17:47:
> Le 05/05/12 00:30, Bill Shannon a écrit :
>> There's a bunch of entries in a pom.xml that provide metadata for a project
>> that's unrelated to building the project, such as <scm>, <licenses>, etc.
> Some of these metadatas are used for releasing maven projects using the
> maven-release-plugin (e.g scm,)

I don't think any of the GlassFish subprojects are released independently,
are they?

> Also, some of them are mandatory for deployment to maven central
> (https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement).

That implies those fields have to be duplicated in all ~400 subprojects
of GlassFish, even though they're all the same? Seems like it's just asking
for them to get out of sync. And it seems that the current GlassFish
subprojects aren't doing that.

>> For a project that's a subproject of another project (such as a subproject
>> of the GlassFish project), how much of this information should be included?
> If they are not located in the same workspace but share a common parent (e.g.
> jvnet-parent), I guess that they should override some information (scm, website
> ...).

I'm only asking about the case where they're in the same workspace.
I would expect the top level pom for the workspace to include all this
information, but the subprojects in the same workspace to only specify
it if it was different (e.g., <developers>, <mailingLists>).

>> Or is it expected that someone looking for this information will go up the
>> tree of parent projects until they find it?
> If there is pom inheritance, users can still look at the effective pom (mvn
> help:effective-pom) rather than going up the tree.

So is it ok omit this information in subprojects in the same workspace?