Skip to content

Commit a6f0a05

Browse files
committed
#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.
1 parent af14a83 commit a6f0a05

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

parent/pom.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@
478478
<artifactId>wagon-maven-plugin</artifactId>
479479
<configuration>
480480
<fromDir>${project.build.directory}</fromDir>
481+
<serverId>static-dot-s2</serverId>
482+
<url>scp://docs.af.pivotal.io</url>
481483
</configuration>
482484
<executions>
483485

@@ -492,8 +494,6 @@
492494
<configuration>
493495
<fromDir>${project.root}/target/schemas</fromDir>
494496
<includes>*.xsd,.autoschemaln</includes>
495-
<serverId>static-dot-s2</serverId>
496-
<url>scp://docs.af.pivotal.io</url>
497497
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}</toDir>
498498
<optimize>true</optimize>
499499
</configuration>
@@ -510,12 +510,26 @@
510510
<configuration>
511511
<fromDir>${project.build.directory}/static-resources</fromDir>
512512
<includes>**</includes>
513-
<serverId>static-dot-s2</serverId>
514-
<url>scp://docs.af.pivotal.io</url>
515513
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}</toDir>
516514
<optimize>true</optimize>
517515
</configuration>
518516
</execution>
517+
518+
<!-- Makes sure resources can be overriden by others -->
519+
<execution>
520+
<id>make-resources-group-writable</id>
521+
<phase>deploy</phase>
522+
<goals>
523+
<goal>sshexec</goal>
524+
</goals>
525+
<configuration>
526+
<commands>
527+
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
528+
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
529+
</commands>
530+
</configuration>
531+
</execution>
532+
519533
</executions>
520534
</plugin>
521535

0 commit comments

Comments
 (0)