3

我有一个 Maven2 项目,我在其中使用程序集插件。如果创建的程序集文件名不以格式扩展名结尾(例如“.zip”),一切都会好起来的。我在插件配置中指定了一个 fileName 参数并将 appendAssemblyId 设置为 false。我已经在这个问题上花了几个小时......知道吗?

4

1 回答 1

0

My answer is a bit of a non-answer - don't remove the format extension. If you are using a specific <format> in your assembly descriptor to produce an artifact (zip, tar.gz, etc.) there is exists no good reason to remove the extension from the file. If I'm a user of your software and download this binary, I don't want to have to guess as to what the packaging type is, I should be able to tell just by looking at the filename.

FWIW, setting appendAssemblyId to false means that the <id> of your assembly descriptor will not be included in your file name.

Now, if you really are dead set on making this a pain for you and everyone else, what you probably want to do (as with most nonsensical things people want to make maven do) is to either use the antrun plugin to rename the generated file during your maven invocation, or just simply run a shell script to rename it after your maven process has finished.

于 2010-09-08T13:34:09.813 回答