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:
> some
> > nested
> > > file.txt
> other_nested_folders

If you specify your output directory to be:
And try to unpack file.txt from, then the resulting structure will look like:
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:

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.


Post a Comment