Wednesday, April 6, 2011

Jetspeed - Finally an unpack plugin with the flat option

Lets look at the case where one uses the maven-dependency-plugin to unpack certain files from an artifact:
artifact.zip
> some
> > nested
> > > file.txt
> other_nested_folders


If you specify your output directory to be:
/dev/bundle
And try to unpack file.txt from artifact.zip, then the resulting structure will look like:
/dev/bundle/some/nested/file.txt
There is absolutely no way (known to me as of this blog post writing) to get this maven plugin to spit out a flat structure like:
/dev/bundle/file.txt

So a good alternative is to use the jetspeed-unpack-maven-plugin which allows the users to specify <flat>true</flat> as part of the configuration in order to obtain the desired file without the burden of having the relative path from the root of the artifact included as well.

0 comments:

Post a Comment