]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4636 Include branding resources when building final WAR
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 16:40:06 +0000 (18:40 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 16:44:06 +0000 (18:44 +0200)
sonar-server/pom.xml

index c6aeeb8c2a798a215f49f8e5f67f8b4e24e78453..9ad742f721f3e9748bd9b7bb8e7932117864ae52 100644 (file)
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>download-branding-resources</id>
-            <phase>prepare-package</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <target>
-                <!-- download file -->
-                <get src="${branding.url}/_footer.html.erb"
-                    dest="${project.build.directory}/${project.build.finalName}/WEB-INF/app/views/branding"
-                    verbose="false"
-                    usetimestamp="false"/>
-                <get src="${branding.url}/logo.png"
-                    dest="${project.build.directory}/${project.build.finalName}/images"
-                    verbose="false"
-                    usetimestamp="false"/>
-              </target>
-            </configuration>
-          </execution>
-        </executions>
-     </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>download-branding-resources</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <!-- download file -->
+                <mkdir dir="${project.build.directory}/${project.build.finalName}/branding/WEB-INF/app/views/branding"/>
+                <mkdir dir="${project.build.directory}/${project.build.finalName}/branding/images"/>
+                <get src="${branding.url}/_footer.html.erb"
+                    dest="${project.build.directory}/${project.build.finalName}/branding/WEB-INF/app/views/branding"
+                    verbose="false"
+                    usetimestamp="false"/>
+                <get src="${branding.url}/logo.png"
+                    dest="${project.build.directory}/${project.build.finalName}/branding/images"
+                    verbose="false"
+                    usetimestamp="false"/>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <configuration>
+          <webResources>
+            <resource>
+              <directory>${project.build.directory}/${project.build.finalName}/branding</directory>
+              <include>**/*</include>
+            </resource>
+          </webResources>
           <packagingExcludes>
             **/*.log,*.iml,WEB-INF/script/,WEB-INF/test/,javascripts/*-min.js,stylesheets/*-min.css,javascripts/tests/**/*,
             build/**,coffee/**,less/**,templates/**