3

Using maven, I download some Chef cookbooks.

Received files are in the .tgz format, and I want to unpack them. How can I do that ? Is there any useful plugin ?

Riduidel
  • 22,052
  • 14
  • 85
  • 185

2 Answers2

6

From what I know, .tgz can be unpack via two commands:

   gzip -d file.tgz
   tar xvf file.tar

So you can use maven-antrun-plugin to execute these two tasks:

   <gunzip src="tools.tgz"/>
   <untar src="tools.tar" dest="${tools.home}"/>

Ant task reference: gunzip and untar

Jintian DENG
  • 3,152
  • 20
  • 22
1

I would suggest to use the truezip-maven-plugin to handle such archives.

Alexander Kjäll
  • 4,246
  • 3
  • 33
  • 57
khmarbaise
  • 92,914
  • 28
  • 189
  • 235