Hi,
Shouldn't we define project deliverables in the POM? I think this could
be very useful. Let me give some potential usages:
- ability to automatically say "build me this project", whether the
project generates a war, an ejb, an ear, a jar, a plugin jar, etc. ATM,
there is no way to recognize a project's type.
- ability to develop maven plugins that uses deliverable information.
For example the maven site plugin could automatically generate download
links pointing to the project's deliverables. The multichanges plugin
could provide links for the latest releases, etc.
Here's how it could be defined in the POM:
Example for a plugin project:
-----------------------------
<deliverables>
<deliverable>
<artifactId>${pom.artifactId}</artifact>
<type>plugin</type>
</deliverable>
</deliverables>
Note 1: <groupId> is already defined at the global level and this is
fine.
Note 2: <id> should be removed. Indeed, it is not enough as there are
possibly several deliverables per project (for example a typical jar
project will deliver: a jar, a zipped javadoc, a source distribution, a
website zip, etc.
Note 3: We would of course only deprecate the <id> tag to preserve
compatibility. It would be equivalent to saying:
<deliverables>
<deliverable>
<artifactId>${pom.artifactId}</artifact>
<type>jar</type>
</deliverable>
</deliverables>
Example for a standard jar project:
-----------------------------------
<deliverables>
<deliverable>
<artifactId>${pom.artifactId}</artifact>
<type>jar</type>
</deliverable>
<deliverable>
<artifactId>${pom.artifactId}</artifact>
<type>javadoc</type>
</deliverable>
</deliverables>
etc.
Summary: I believe the existing mechanism (i.e. global <groupId>, <id> -
BTW, there is no global <type>) is too limitative and that it is
preventing us from providing further added value for projects. The
proposal above suggest a mechanism for extending it to support several
deliverables.
Comments? (I'm sure there'll be plenty ;-)).
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]