[xwiki-notifications] r9626 - in xwiki-products/xwiki-workspaces/trunk/wiki: . src/main src/main/build src/main/build/transformation

jvelociter (SVN) notifications at xwiki.org
Sun May 4 12:31:18 CEST 2008


Author: jvelociter
Date: 2008-05-04 12:31:18 +0200 (Sun, 04 May 2008)
New Revision: 9626

Added:
   xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/
   xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/transformation/
   xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/transformation/xapp.xsl
Modified:
   xwiki-products/xwiki-workspaces/trunk/wiki/pom.xml
Log:
XWS-83 Synchronise dynamically XWS applications versions with XWS pom.version


Modified: xwiki-products/xwiki-workspaces/trunk/wiki/pom.xml
===================================================================
--- xwiki-products/xwiki-workspaces/trunk/wiki/pom.xml	2008-05-04 01:22:12 UTC (rev 9625)
+++ xwiki-products/xwiki-workspaces/trunk/wiki/pom.xml	2008-05-04 10:31:18 UTC (rev 9626)
@@ -17,4 +17,40 @@
       <type>xar</type>
     </dependency>
   </dependencies>
+  <build>
+   <plugins>
+      <!-- For applications based on ApplicationManager, ensure application version in applications descriptors page is correct -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>xml-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <id>set-application-informations</id>
+            <goals>
+              <goal>transform</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <transformationSets>
+            <transformationSet>
+              <dir>src/main/resources</dir>
+              <outputDir>${project.build.outputDirectory}</outputDir>
+              <includes>
+                <include>XWSApps/*App</include>
+              </includes>
+              <stylesheet>src/main/build/transformation/xapp.xsl</stylesheet>
+              <parameters>
+                <parameter>
+                  <name>appversion</name>
+                  <value>${pom.version}</value>
+                </parameter>
+              </parameters>
+            </transformationSet>
+          </transformationSets>
+        </configuration>
+      </plugin>
+   </plugins>
+  </build>
 </project>

Added: xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/transformation/xapp.xsl
===================================================================
--- xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/transformation/xapp.xsl	                        (rev 0)
+++ xwiki-products/xwiki-workspaces/trunk/wiki/src/main/build/transformation/xapp.xsl	2008-05-04 10:31:18 UTC (rev 9626)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+
+<xsl:param name="appversion">1.0</xsl:param>
+
+<xsl:template match="@* | node()">
+
+   <xsl:copy>
+   <xsl:apply-templates select="@* | node()" />
+   </xsl:copy>
+</xsl:template>
+
+<xsl:template match="property/appversion">
+  <appversion><xsl:value-of select="$appversion"/></appversion>
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file



More information about the notifications mailing list