Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven assembly set username for tar

I'm using Maven with the Assembly plugin and would like to set the user and group for a tar-file.

I can set access rights to every directory, but without setting the user this is quite useless.

Any ideas?

like image 632
Franz Kafka Avatar asked Jan 20 '12 16:01

Franz Kafka


1 Answers

The tar is created with the permission of the user running it. If you want this to be a particular user/group you can run maven as that user/group.

Maven may not allow you to use tar as a different user, but if you can do it in ant you can use http://maven.apache.org/plugins/maven-antrun-plugin/ to do anything ant can do.

http://maven.apache.org/plugins/maven-antrun-plugin/usage.html

like image 95
Peter Lawrey Avatar answered Oct 22 '22 14:10

Peter Lawrey