You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/11/09 11:05:47 UTC

svn commit: r1768905 [1/5] - in /myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond: ./ src/main/resources/META-INF/ src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/ src/main/resources/org/apache/my...

Author: lofwyr
Date: Wed Nov  9 11:05:46 2016
New Revision: 1768905

URL: http://svn.apache.org/viewvc?rev=1768905&view=rev
Log:
TOBAGO-1601: Building the different themes (scarborough, speyside, ...) like bootstrap builds
* building the theme only when requested with profile activation. Build is too slow to do it each time.

Added:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/css/
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.css
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.css.map
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.min.css
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.min.css.map
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/js/
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/js/bootstrap.js
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/4.0.0-alpha.4/js/bootstrap.min.js
Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml?rev=1768905&r1=1768904&r2=1768905&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml Wed Nov  9 11:05:46 2016
@@ -15,7 +15,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
@@ -31,149 +32,165 @@
     <bootstrap.version>4.0.0-alpha.4</bootstrap.version>
   </properties>
 
-  <build>
-    <plugins>
-
-      <plugin>
-        <artifactId>maven-scm-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-bootstrap</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>checkout</goal>
-            </goals>
-            <configuration>
-              <connectionUrl>scm:git:https://github.com/twbs/bootstrap</connectionUrl>
-              <skipCheckoutIfExists>true</skipCheckoutIfExists>
-              <scmVersion>v${bootstrap.version}</scmVersion>
-              <scmVersionType>branch</scmVersionType>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-bootstrap</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>${project.build.directory}/checkout</directory>
-                  <exclude>scss/_custom.scss</exclude>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-custom</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard</directory>
-                  <includes>
-                    <include>scss/*</include>
-                  </includes>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-bootstrap-dist</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>
-                ${project.build.directory}/classes/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap/${bootstrap.version}-richmond
-              </outputDirectory>
-              <resources>
-                <resource>
-                  <directory>${project.build.directory}/bootstrap/dist</directory>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>com.github.eirslett</groupId>
-        <artifactId>frontend-maven-plugin</artifactId>
-        <version>1.0</version>
-
-        <!-- optional -->
-        <configuration>
-          <nodeVersion>v6.5.0</nodeVersion>
-          <npmVersion>3.10.8</npmVersion>
-          <!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
-          <!--<downloadRoot>http://myproxy.example.org/nodejs/dist/</downloadRoot>-->
-          <!-- optional: where to install node and npm. Defaults to the working directory -->
-          <installDirectory>${project.build.directory}/frontend</installDirectory>
-          <workingDirectory>${project.build.directory}/bootstrap</workingDirectory>
-        </configuration>
-
-        <executions>
-
-          <execution>
-            <id>install node and npm</id>
-            <goals>
-              <goal>install-node-and-npm</goal>
-            </goals>
-            <phase>generate-resources</phase>
-          </execution>
-
-          <execution>
-            <id>npm install grunt-cli</id>
-            <goals>
-              <goal>npm</goal>
-            </goals>
-            <phase>generate-resources</phase>
-            <configuration>
-              <arguments>install grunt-cli</arguments>
-            </configuration>
-          </execution>
-
-          <execution>
-            <id>npm install</id>
-            <goals>
-              <goal>npm</goal>
-            </goals>
-            <phase>generate-resources</phase>
-            <configuration>
-              <arguments>install</arguments>
-            </configuration>
-          </execution>
-
-          <execution>
-            <id>grunt build</id>
-            <goals>
-              <goal>grunt</goal>
-            </goals>
-            <phase>generate-resources</phase>
-            <configuration>
-              <arguments>dist</arguments>
-            </configuration>
-          </execution>
-
-        </executions>
-      </plugin>
-
-    </plugins>
-  </build>
+  <profiles>
+    <profile>
+      <id>rebuild-theme</id>
+      <build>
+        <plugins>
+
+          <plugin>
+            <artifactId>maven-scm-plugin</artifactId>
+            <version>1.9.5</version>
+            <executions>
+              <execution>
+                <!--load Bootstrap sources via git to target/checkout -->
+                <id>step #1: copy-bootstrap</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>checkout</goal>
+                </goals>
+                <configuration>
+                  <connectionUrl>scm:git:https://github.com/twbs/bootstrap</connectionUrl>
+                  <skipCheckoutIfExists>true</skipCheckoutIfExists>
+                  <scmVersion>v${bootstrap.version}</scmVersion>
+                  <scmVersionType>branch</scmVersionType>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+
+          <plugin>
+            <artifactId>maven-resources-plugin</artifactId>
+            <version>2.7</version>
+            <executions>
+              <execution>
+                <!-- copy Bootstrap to target/bootstrap -->
+                <id>step #2: copy-bootstrap</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/checkout</directory>
+                      <exclude>scss/_custom.scss</exclude>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
+              <execution>
+                <!-- copy customization to target/bootstrap -->
+                <id>step #3: copy-custom</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
+                  <resources>
+                    <resource>
+                      <directory>src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard
+                      </directory>
+                      <includes>
+                        <include>scss/*</include>
+                      </includes>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
+              <execution>
+                <!-- copy the result to target/classes -->
+                <id>step #8: copy-bootstrap-dist</id>
+                <phase>process-resources</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>
+                    ${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap-richmond/${bootstrap.version}
+                  </outputDirectory>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/bootstrap/dist</directory>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+
+          <plugin>
+            <groupId>com.github.eirslett</groupId>
+            <artifactId>frontend-maven-plugin</artifactId>
+            <version>1.0</version>
+
+            <!-- optional -->
+            <configuration>
+              <nodeVersion>v6.5.0</nodeVersion>
+              <npmVersion>3.10.8</npmVersion>
+              <!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
+              <!--<downloadRoot>http://myproxy.example.org/nodejs/dist/</downloadRoot>-->
+              <!-- optional: where to install node and npm. Defaults to the working directory -->
+              <installDirectory>${project.build.directory}/frontend</installDirectory>
+              <workingDirectory>${project.build.directory}/bootstrap</workingDirectory>
+            </configuration>
+
+            <executions>
+
+              <execution>
+                <!-- install "node" and "npm" -->
+                <id>step #4: install node and npm</id>
+                <goals>
+                  <goal>install-node-and-npm</goal>
+                </goals>
+                <phase>generate-resources</phase>
+              </execution>
+
+              <execution>
+                <!-- install "grunt-cli" -->
+                <id>step #5: npm install grunt-cli</id>
+                <goals>
+                  <goal>npm</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  <arguments>install grunt-cli</arguments>
+                </configuration>
+              </execution>
+
+              <execution>
+                <!-- install all other required stuff for "bootstrap" -->
+                <id>step #6: npm install</id>
+                <goals>
+                  <goal>npm</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  <arguments>install</arguments>
+                </configuration>
+              </execution>
+
+              <execution>
+                <!-- build "bootstrap" with "grunt" -->
+                <id>step #7: grunt build</id>
+                <goals>
+                  <goal>grunt</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  <arguments>dist</arguments>
+                </configuration>
+              </execution>
+
+            </executions>
+          </plugin>
+
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 
   <dependencies>
     <dependency>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml?rev=1768905&r1=1768904&r2=1768905&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml Wed Nov  9 11:05:46 2016
@@ -40,16 +40,16 @@
           <script name="bootstrap/4.0.0-alpha.4/js/bootstrap.js"/>
           <style name="bootstrap/4.0.0-alpha.4/css/bootstrap.css"/>
         </excludes>
-        <script name="bootstrap/4.0.0-alpha.4-richmond/js/bootstrap.js"/>
-        <style name="bootstrap/4.0.0-alpha.4-richmond/css/bootstrap.css"/>
+        <script name="bootstrap-richmond/4.0.0-alpha.4/js/bootstrap.js"/>
+        <style name="bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.css"/>
       </resources>
       <resources production="false">
         <excludes>
           <script name="bootstrap/4.0.0-alpha.4/js/bootstrap.js"/>
           <style name="bootstrap/4.0.0-alpha.4/css/bootstrap.css"/>
         </excludes>
-        <script name="bootstrap/4.0.0-alpha.4-richmond/js/bootstrap.js"/>
-        <style name="bootstrap/4.0.0-alpha.4-richmond/css/bootstrap.css"/>
+        <script name="bootstrap-richmond/4.0.0-alpha.4/js/bootstrap.js"/>
+        <style name="bootstrap-richmond/4.0.0-alpha.4/css/bootstrap.css"/>
       </resources>
     </theme-definition>
   </theme-definitions>