Vincent,

On Tue, 2004-11-02 at 12:04, Vincent Massol wrote:

> ATM, there are 2 supported distribution types: zip and tar.gz. 
> ATM, they are both mandatory. Do you think they should be kept mandatory?

I don't think they should be mandatory. In fact, I have already modified
the plugin locally (the tar.gz was useless in our case, as we just
distribute the zip), so just a zip is created. I thought I had already
created a jira issue about it, but looks like I haven't yet :-(

Anyway, I think the best solution is defining only one property and then
let the plugin handle it properly. Something like this:

maven.dist.formats=targz,zip

Then on the plugin (using pseudo-jelly-code :-):

<util:tokenizer var="format" items="${maven.dist.formats}" delim=",">
   <j:set var="distGoal" value="dist:handle-${format}"/>
   <j:if test="distGoal does not exist">
     <ant:fail>Unknown dist format: ${format}</ant:fail>
   </j:if>
   <attain goal name="${distGoal}"/>
</util:tokenizer>

That way, not only we would need those nasty IFs you mentioned, but we
would also be offering an extension point to the users: they can create
a new goal to handle their format, if necessary.

Regarding the executables, if eventually we need to set some property
for them, we could use something like this:

maven.dist.format.targz.executable=/usr/local/gnu/tar/bin/tar


What do you think?

-- Felipe



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

Reply via email to