Maven node sets username for tar

I am using Maven with the Assembly plugin and would like to set the user and group for the tar file.

I can set permissions for each directory, but without installing a user this is completely useless.

Any ideas?

+4
source share
1 answer

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

Maven may not allow you to use tar as another 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.

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

+2
source

Source: https://habr.com/ru/post/1392074/


All Articles