Alexander
My work around is almost identical to yours - the chief difference being the 
phase - I are using
<phase>process-resources</phase>.

Jason
Was not aware of the creation purpose.  The assembly plug-in appears to be a 
tad too heavy for what we need, in that the file we need permissions set on is 
executed as part of the packaging to generate an input file for Oracle's 
SQLPlus based on the files present.  It (the generation script) does not end up 
in the resultant set of files.

We'll stick with the "Work Around" - I'll just internally document it 
differently (and remember for next time).

Thanks for all your responses.

...Andrew
Please consider the environment before printing this e-mail

-----Original Message-----
From: Jason van Zyl [mailto:[email protected]]
Sent: Wednesday, 26 October 2011 9:28 PM
To: Maven Users List
Subject: Re: maven-resources-plugin not retaining unix permissions?

The maven-resources-plugin was never intended to create any resources that 
would be used in a naked filesystem. It was strictly intended to place 
resources into the resultant artifact for use in a platform independent way, in 
general from the classpath. If you want to move archives around that are going 
to be unpacked and used I suggest the assembly plugin for making the archives 
and the dependency plugin for unpacking them.

On Oct 26, 2011, at 3:41 AM, Alexander Poulikakos wrote:

> Hi
>
> What does your workaround look like?
>
> We also have this same problem. The workaround we use is adding this in the 
> pom.xml:
>
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-antrun-plugin</artifactId>
>    <version>1.6</version>
>    <executions>
>        <execution>
>            <id>process-classes</id>
>            <phase>process-classes</phase>
>            <configuration>
>                <target>
>                    <chmod file="target/classes/<any-file>" perm="755"/>
>                </target>
>            </configuration>
>            <goals>
>                <goal>run</goal>
>            </goals>
>        </execution>
>    </executions>
> </plugin>
>
Are there any better workarounds out there? Or preferable some setting that can 
be done on maven-resources-plugin?
>
> /Alex


The information contained in this email communication may be confidential. If 
you have received this email in error, please notify the sender by return 
email, delete this email and destroy any copy.
Any advice contained in this email has been prepared without taking into 
account your objectives, financial situation or needs. Before acting on any 
advice in this email, National Australia Bank Limited (NAB) recommends that you 
consider whether it is appropriate for your circumstances. If this email 
contains reference to any financial products, NAB recommends you consider the 
Product Disclosure Statement (PDS) or other disclosure document available from 
NAB, before making any decisions regarding any products.
If this email contains any promotional content that you do not wish to receive, 
please reply to the original sender and write "Don't email promotional 
material" in the subject.

Reply via email to