#351 - Make sure that static resources uploaded are overwritable by group.

Added Wagon plugin execution to set uploaded file permissions for schemas and static resources so that they can be replaced by other team members. Extracted common server configuration into plugin configuration.
This commit is contained in:
Oliver Gierke
2017-05-04 16:24:58 +02:00
parent af14a83369
commit a6f0a05073

View File

@@ -478,6 +478,8 @@
<artifactId>wagon-maven-plugin</artifactId>
<configuration>
<fromDir>${project.build.directory}</fromDir>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
</configuration>
<executions>
@@ -492,8 +494,6 @@
<configuration>
<fromDir>${project.root}/target/schemas</fromDir>
<includes>*.xsd,.autoschemaln</includes>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}</toDir>
<optimize>true</optimize>
</configuration>
@@ -510,12 +510,26 @@
<configuration>
<fromDir>${project.build.directory}/static-resources</fromDir>
<includes>**</includes>
<serverId>static-dot-s2</serverId>
<url>scp://docs.af.pivotal.io</url>
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}</toDir>
<optimize>true</optimize>
</configuration>
</execution>
<!-- Makes sure resources can be overriden by others -->
<execution>
<id>make-resources-group-writable</id>
<phase>deploy</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<commands>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>