Maven 1.x Distribution Plugin

should be able to turn off creation of zip and.or tar.gz files via plugin properties

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.7
  • Component/s: None
  • Labels:
    None
  • Environment:
    n/a
  • Number of attachments :
    0

Description

For our project, we want to only make our dist available as a zipfile. This is because it is a Java project, and therefore we know the jar command will always be available to our users to unzip the distribution, no matter what platform they are on. So here is no need for a tar.gz dist. Unfortunately, it is currently not possible to turn off creation of the tar.gz. Can you please add some properties to control this? Something like:

maven.dist.create.zip = true
maven.dist.create.tar.gz = true

Thanks.
Ian

Activity

Hide
dion gillard added a comment -

Why not just add a postGoal to dist to delete the .tar.gz file?

Show
dion gillard added a comment - Why not just add a postGoal to dist to delete the .tar.gz file?
Hide
Ian Springer added a comment -

That is what I am currently doing, but I consider it a hack. Not only does it make my dist builds take significantly longer, but I sporadically get weird errors from the Ant tar task that cause the entire dist to abort.

Show
Ian Springer added a comment - That is what I am currently doing, but I consider it a hack. Not only does it make my dist builds take significantly longer, but I sporadically get weird errors from the Ant tar task that cause the entire dist to abort.
Hide
Felipe Leme added a comment -

dIon,

This issue makes sense, we have already discussed it in the list, although I forgot to create an issue for it.

Better than create one property for each distribution format, we should use just one comma-separated property, something liek this:

maven.dist.formats=zip,tar.gz

We would then need goals for each format, for instance dist:build-bin-zip, dist:build-bin-tar.gz, etc... This way, we would be even offering an extension point for new formats.

– Felipe

Show
Felipe Leme added a comment - dIon, This issue makes sense, we have already discussed it in the list, although I forgot to create an issue for it. Better than create one property for each distribution format, we should use just one comma-separated property, something liek this: maven.dist.formats=zip,tar.gz We would then need goals for each format, for instance dist:build-bin-zip, dist:build-bin-tar.gz, etc... This way, we would be even offering an extension point for new formats. – Felipe
Hide
dion gillard added a comment -

I'll just agree to disagree here then.

Show
dion gillard added a comment - I'll just agree to disagree here then.
Hide
Felipe Leme added a comment -

Why do you disagree? Which alternative do you think it's better than, the postGoal approach?

Show
Felipe Leme added a comment - Why do you disagree? Which alternative do you think it's better than, the postGoal approach?
Hide
dion gillard added a comment -

I think if you start parameterising goals to death they become unmaintainable and unusable. Adding parameters to choose zip, tar.gz etc for dist is overkill IMHO

Show
dion gillard added a comment - I think if you start parameterising goals to death they become unmaintainable and unusable. Adding parameters to choose zip, tar.gz etc for dist is overkill IMHO
Hide
Vincent Massol added a comment -

I would also like to make the generation of zip/targz/bzip/etc parametrizable. I don't understand your reasoning (certainly it's not new to use properties to customize plugins and this plugin has very few properties). If there's one property that is needed in this plugin it's really this one I'd say.

Show
Vincent Massol added a comment - I would also like to make the generation of zip/targz/bzip/etc parametrizable. I don't understand your reasoning (certainly it's not new to use properties to customize plugins and this plugin has very few properties). If there's one property that is needed in this plugin it's really this one I'd say.
Hide
Felipe Leme added a comment -

dIon,

It's my time to disagree now

I agree with you that should keep the properties at a minimum, but this new property wouldn't be an overkill. In fact, I thing the use of such property would be much more elegant than requiring postGoals or even goals overriden.

– Felipe

Show
Felipe Leme added a comment - dIon, It's my time to disagree now I agree with you that should keep the properties at a minimum, but this new property wouldn't be an overkill. In fact, I thing the use of such property would be much more elegant than requiring postGoals or even goals overriden. – Felipe

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: