maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: maven assembly plugin set permissions on base directory
Date Wed, 09 Oct 2013 23:49:31 GMT
It does not.  I hadn't tried using '/' as the output directory spec 
(i.e. the base-directory) but it doesn't help.  The basic problem is this:

The archiver does not create an entry in the archive for the 
base-directory.  This is because no matter where you put the 
<directoryMode> it applies to directories WITHIN that <fileset>, not to
the root of the fileset itself.  If a directory entry is not created
in the archive, then the -p switch of tar will have nothing to 
"preserve" and just use the default permission for the directory.

Really, I think to make this work, one would have to be somehow be able 
to put a <directoryMode> on <base-directory> itself.  But this would be 
a change to the plugin.

On 10/09/2013 05:03 PM, Martin Gainty wrote:
> Add a fileset pointing to ${basedir} to your configuration
>
>
>
> <fileSets>
>
>
>       <fileSet>
>              <directory>${basedir}</directory>
>              <outputDirectory>/</outputDirectory>
>              <includes>
>                  <include>*.properties</include>
>              </includes>
>          </fileSet>
>
> .......
> <fileSet>
>
>
> does this not work for you?
> Martin
>
>
>
>
>
>
>> Date: Wed, 9 Oct 2013 14:41:35 -0500
>> From: scohen@javactivity.org
>> To: users@maven.apache.org
>> Subject: Re: maven assembly plugin set permissions on base directory
>>
>> Martin, yes, I'm well aware of that functionality.
>> However, I cannot figure out how to apply it to the base directory.
>>
>> Let's say I've set all my filesets which are packaged underneath the
>> base directory to
>> <directoryMode>775</directoryMode>
>> <fileMode>664</fileMode>
>>
>> The plugin handles this beautifully.
>>
>> But let's suppose I want the basedir of the archive to also be
>> <directoryMode>775</directoryMode>
>>
>> That does not seem possible. At least I have not figured out how to do it.
>>
>> Steve
>>
>>
>>
>> On 10/09/2013 02:21 PM, Martin Gainty wrote:
>>> Stephen
>>>
>>>
>>>
>>> <configuration>
>>>
>>> <sources> or <fileset> or <binaries> or <dependencySet>
or <file> or <repository> allow you to assemble a package based on Octal setting
of the File/Directory Permissions ..
>>>
>>>
>>>
>>>
>>>
>>>
>>> fileMode
>>> String
>>> Similar to a UNIX permission, sets the file mode of the files included. THIS
IS AN OCTAL VALUE. Format: (User)(Group)(Other) where each component is a sum of Read = 4,
Write = 2, and Execute = 1. For example, the value 0644 translates to User read-write, Group
and Other read-only. (more on unix-style permissions)
>>>
>>> directoryMode
>>> String
>>> Similar to a UNIX permission, sets the directory mode of the directories included.
THIS IS AN OCTAL VALUE. Format: (User)(Group)(Other) where each component is a sum of Read
= 4, Write = 2, and Execute = 1. For example, the value 0755 translates to User read-write,
Group and Other read-only. (more on unix-style permissions)
>>>
>>>
>>>
>>> http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
>>>
>>>
>>>
>>> Does this answer your question?
>>>
>>> Martin
>>>
>>>
>>>
>>>
>>>
>>>
>>>> Date: Wed, 9 Oct 2013 14:05:49 -0500
>>>> From: scohen@javactivity.org
>>>> To: users@maven.apache.org
>>>> Subject: Re: maven assembly plugin set permissions on base directory
>>>>
>>>> On 10/09/2013 11:43 AM, Baptiste Mathus wrote:
>>>>> What are you trying to do? The 'why' may also help.
>>>>> Is there a way to do this?
>>>>>
>>>>> ------------------------------**------------------------------**---------
>>>>> To unsubscribe, e-mail:
>>>>> users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>> I'm working in a very specialized legacy environment in which it would
>>>> be nice to have an archive (.tar.gz) that had all the permissions as I
>>>> want from the start. Granted it's not all that hard to do after
>>>> unpackaging with chmod running under find, but it would be nice if the
>>>> base-directory itself had a <directory-mode> as do the <filesets>
that
>>>> get packaged under it. Bottom-line: the plugin doesn't give me the same
>>>> level of control as the OS does.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>   		 	   		
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message