]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4636 Extract branded resources and prepare for unbranded builds
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 08:34:08 +0000 (10:34 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 14:04:24 +0000 (16:04 +0200)
sonar-server/pom.xml
sonar-server/src/main/erb/branding/_footer.html.erb [new file with mode: 0644]
sonar-server/src/main/erb/branding/logo.png [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
sonar-server/src/main/webapp/images/logo.png [new file with mode: 0644]
sonar-server/src/main/webapp/images/sonarqube-24x100.png [deleted file]

index 335705fda92aca4c833c51bdca3c066a86c8b098..8c38874b5151d1ab095218fc56f698fe55754898 100644 (file)
@@ -13,6 +13,7 @@
 
   <properties>
     <gruntTask>default</gruntTask>
+    <branding.url>file:${basedir}/src/main/erb/branding</branding.url>
 
     <!-- self-analysis -->
     <sonar.sources>src/main/java,src/main/js</sonar.sources>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>download-branding-resources</id>
+            <phase>process-resources</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>
diff --git a/sonar-server/src/main/erb/branding/_footer.html.erb b/sonar-server/src/main/erb/branding/_footer.html.erb
new file mode 100644 (file)
index 0000000..1705765
--- /dev/null
@@ -0,0 +1 @@
+<div>SonarQube&trade; technology is powered by <a href="http://www.sonarsource.com" target="SonarSource SA">SonarSource SA</a></div>
diff --git a/sonar-server/src/main/erb/branding/logo.png b/sonar-server/src/main/erb/branding/logo.png
new file mode 100644 (file)
index 0000000..18a2bf6
Binary files /dev/null and b/sonar-server/src/main/erb/branding/logo.png differ
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/branding/_footer.html.erb
new file mode 100644 (file)
index 0000000..63abc76
--- /dev/null
@@ -0,0 +1 @@
+<div>TODO</div>
index 38d86a3f656d60ad3d69e2130f3e48d2fa1f6a84..b154e543bd14784bb2477b4ac85a65fcfd905d76 100644 (file)
           <% end %>
 
           <%= yield :sidebar %>
+
           <li id="logo">
-            <center><a href="http://www.sonarqube.org/" target="SonarSource"><%= image_tag('sonarqube-24x100.png', :alt => message('layout.sonar.slogan'), :width => 100, :height => 24) -%></a></center>
+            <center><a href="http://www.sonarqube.org/" target="SonarSource"><%= image_tag('logo.png', :alt => message('layout.sonar.slogan'), :width => 100, :height => 24) -%></a></center>
           </li>
         </ul>
       </div>
       <% end %>
     <% end %>
     <div id="ftlinks">
-      <div>SonarQube&trade; technology is powered by <a href="http://www.sonarsource.com" target="SonarSource SA">SonarSource SA</a></div>
+      <%= render 'branding/footer' -%>
       <div>
         Version <%= sonar_version -%> -
         <a href="http://www.sonarqube.org" target="sonar">Community</a> -
diff --git a/sonar-server/src/main/webapp/images/logo.png b/sonar-server/src/main/webapp/images/logo.png
new file mode 100644 (file)
index 0000000..427fb75
Binary files /dev/null and b/sonar-server/src/main/webapp/images/logo.png differ
diff --git a/sonar-server/src/main/webapp/images/sonarqube-24x100.png b/sonar-server/src/main/webapp/images/sonarqube-24x100.png
deleted file mode 100644 (file)
index 18a2bf6..0000000
Binary files a/sonar-server/src/main/webapp/images/sonarqube-24x100.png and /dev/null differ