I have a Maven project which builds a patched version of the Apache solr-core library. The first step is to unpack the original sources:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>solr-core-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>${solr.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<outputDirectory>${solr.sources.dir}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
The problem is that on certain platforms, the sources come out unreadable, with permissions of 070 (---rwx---). E.g. it's fine on the Linux build server (perms are 644), but behaviour is inconsistent between developers' Windows 7 machines, each under Cygwin and with umask 0022.
I'd like to add a step after unpacking to chmod the sources: is there a way to do this? I experimented with permutations of the dependency plugin's ignorePermissions and useJvmChmod without success. I know that the assembly plugin supports chmod operations, but apparently not in-place as I'd like here, and I've also come across a heavy-handed solution using ant. Any ideas or recommendations? Thanks!