Hey all,

I was just reading over the "(MPECLIPSE-60) Downloading source zips"
thread and felt motivated to bring up something that has bothered me
about maven. My understanding of the "Philosophy of Maven" is that each
POM should represent one deployable artifact which can be referenced as
a dependency in another POM easily. I know that rule produced some
grumblings by the creators of ejb's which wanted to be able to produce
ejb jars, ejb-client jars, wars, and even ears from the same POM; but,
separate POM's are easy to implement and keep the expected behavior of
maven simple to understand.

But like all good rules, there's an exception - and I think the
distribution plugin is a good example of an unnecessary exception to the
rule. The problem is that the distribution plugin produces at least one
artifact that's not easy to reference from other projects and is not
adequately managed by the POM. Creating a distribution (tarball or zip)
that incorporates other distributions is a not easy, multiproject goals
break down unless all of the subprojects implement the same custom goal
(to call the distribution goal in projects that need it), and the POM
doesn't identify that the real deployable is the tarball because it's
initially set up to build a jar (for example). 

I think a better solution is to allow for extending the types of
artifacts supported by maven and move the distribution process into a
separate POM. This is more in keeping with the "One POM One Artifact"
rule, allows the distribution artifact to be easily referenced from
other projects (via a dependency element instead of funky jelly script),
and simplifies running the multiproject goals. 

I've done this locally by developing a tar plugin which produces a tar
artifact in the local repository
(maven/repository/artifactDirectory/tars/finalName.tar). I'm able to set
the multiproject.type to 'tar' which simplifies the multiproject build
and incorporate the distribution tar into other projects by simply
adding a dependency. Unfortunately, this only works for local builds
(tar:install) since the artifact plugin doesn't recognize user created
artifact types (tar:deploy breaks). In any case, I could see where this
idea could be extended to creating a zip artifact type for the source
distribution mentioned in MPECLIPSE-60. It might even set the stage for
non-java support (I recall questions about maven supporting c++, etc).

So is there any merit to these thoughts? Or do they express something
that would make project management too cumbersome?

-- 
Joseph Hindsley
Providerlink, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to