Author: simonetripodi
Date: Wed Jan  4 23:45:01 2012
New Revision: 1227388

URL: http://svn.apache.org/viewvc?rev=1227388&view=rev
Log:
[MSKIN-25] Integrate Ohloh widgets

Added:
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml   (with props)
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/
    
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm  
 (with props)
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml   
(with props)
Modified:
    
maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
    maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm

Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml?rev=1227388&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml Wed Jan  4 
23:45:01 2012
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   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/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven</groupId>
+    <artifactId>maven-parent</artifactId>
+    <version>21</version>
+  </parent>
+
+  <groupId>org.apache.maven.skins.its</groupId>
+  <artifactId>@project.artifactId@-sidebar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>@project.name@ IT, sidebar layout</name>
+  <url>http://maven.apache.org/skins/@project.artifactId@/sidebar/</url>
+
+  <properties>
+    <skinName>@project.name@</skinName>
+    <skinDescription>@project.description@</skinDescription>
+    <skinGroupId>@project.groupId@</skinGroupId>
+    <skinArtifactId>@project.artifactId@</skinArtifactId>
+    <skinVersion>@project.version@</skinVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>3.0</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
+          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>index</report>
+              <report>summary</report>
+              <report>license</report>
+              <report>project-team</report>
+              <report>scm</report>
+              <report>issue-tracking</report>
+              <report>mailing-list</report>
+              <report>dependencies</report>
+              <report>cim</report>
+              <report>plugin-management</report>
+              <report>plugins</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+
+</project>

Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm?rev=1227388&view=auto
==============================================================================
--- 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm 
(added)
+++ 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm 
Wed Jan  4 23:45:01 2012
@@ -0,0 +1,16 @@
+ ------
+ ${project.name}
+ ------
+ Hervé Boutemy
+ ------
+ 2011-10-15
+ ------
+
+${project.name}
+
+ This is a test for ${skinName} with sidebar enabled and Google Search.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml?rev=1227388&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml 
(added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml Wed 
Jan  4 23:45:01 2012
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 
http://maven.apache.org/xsd/decoration-1.1.0.xsd";
+  name="${skinName}">
+
+  <skin>
+    <groupId>${skinGroupId}</groupId>
+    <artifactId>${skinArtifactId}</artifactId>
+    <version>${skinVersion}</version>
+  </skin>
+
+  <!-- START SNIPPET: skin-custom-config -->
+  <custom>
+    <fluidoSkin>
+      <ohloh>
+        <projectId>3499</projectId>
+        <widget>factoids</widget>
+      </ohloh>
+    </fluidoSkin>
+  </custom>
+  <!-- END SNIPPET: skin-custom-config -->
+
+  <publishDate format="yyyy-MM-dd" position="right" />
+  <version position="right" />
+
+  <body>
+    <breadcrumbs>
+      <item name="skins" href="/skins/"/>
+      <item name="${skinArtifactId}" href="/skins/${skinArtifactId}/"/>
+    </breadcrumbs>
+
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+    </menu>
+
+    <menu ref="reports"/>
+
+    <footer>
+      <div class="row span16">Apache Maven, Apache @project.name@, Apache, the 
Apache feather logo, and the Apache Maven project logos are trademarks of The 
Apache Software Foundation.
+      All other marks mentioned may be trademarks or registered trademarks of 
their respective owners.</div>
+    </footer>
+  </body>
+
+</project>
\ No newline at end of file

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: 
maven/skins/trunk/maven-fluido-skin/src/it/mskins-25/src/site/site.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 
maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
URL: 
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm?rev=1227388&r1=1227387&r2=1227388&view=diff
==============================================================================
--- 
maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm 
(original)
+++ 
maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm 
Wed Jan  4 23:45:01 2012
@@ -634,6 +634,51 @@
   #end
 #end
 ##
+#macro ( ohloh )
+  #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'ohloh' )
+        && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'ohloh' 
).getChild( 'projectId' ) )
+    #set ( $projectId = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 
'ohloh' ).getChild( 'projectId' ).getValue() )
+
+    #set( $widget = "users_logo.js" )
+
+    #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'ohloh' 
).getChild( 'widget' ) )
+      #set( $definedWidget = $decoration.custom.getChild( 'fluidoSkin' 
).getChild( 'ohloh' ).getChild( 'widget' ).getValue() )
+
+      #if ( $definedWidget.equalsIgnoreCase( "users-logo" ) )
+        #set( $widget = "users_logo.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users-green" ) )
+        #set( $widget = "users.js?style=green" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users-red" ) )
+        #set( $widget = "users.js?style=red" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users-blue" ) )
+        #set( $widget = "users.js?style=blue" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users-gray" ) )
+        #set( $widget = "users.js?style=gray" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users-rainbow" ) )
+        #set( $widget = "users.js?style=rainbow" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "users" ) )
+        #set( $widget = "users.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "thin-badge" ) )
+        #set( $widget = "thin_badge.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "partner-badge" ) )
+        #set( $widget = "partner_badge.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "languages" ) )
+        #set( $widget = "languages.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "factoids" ) )
+        #set( $widget = "factoids.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "cocomo" ) )
+        #set( $widget = "cocomo.js" )
+      #elseif ( $definedWidget.equalsIgnoreCase( "stats" ) )
+        #set( $widget = "basic_stats.js" )
+      #end
+    #end
+
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" 
src="http://www.ohloh.net/p/${projectId}/widgets/project_${widget}";></script>
+    </div>
+  #end
+#end
+##
 <html xmlns="http://www.w3.org/1999/xhtml"#if ( $locale ) 
xml:lang="$locale.language" lang="$locale.language"#end>
   <head>
     <meta http-equiv="Content-Type" content="text/html; 
charset=${outputEncoding}" />
@@ -872,6 +917,8 @@
           #poweredByLogo( $decoration.poweredBy )
         </p>
         #end
+
+        #ohloh()
       </div>
     </footer>
   </body>

Modified: maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm?rev=1227388&r1=1227387&r2=1227388&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm Wed Jan  4 
23:45:01 2012
@@ -251,3 +251,55 @@ ${project.name}
 +-----+
 
  By default, it is rendered in the sidebar, if the topbar only is available it 
will be rendered there.
+
+** Ohloh widgets
+
+ Since version <<1.1>>, fluido-skin supports the Ohloh 
{{{https://www.ohloh.net/p/maven2/widgets}widgets}}
+ to simplify its integration. Users must define:
+
+ * <<<custom.fluidoSkin.ohloh.projectId>>>: <<required>>, it is the project 
identifier in Ohloh (could be the numeric id or the project name);
+
+ * <<<custom.fluidoSkin.ohloh.widget>>>: <<optional>>, it is the kind of 
widget has to be rendered, admitted values are:
+
+   * <<<users-logo>>> (default)
+
+   * <<<users-green>>>
+
+   * <<<users-red>>>
+
+   * <<<users-blue>>>
+
+   * <<<users-gray>>>
+
+   * <<<users-rainbow>>>
+
+   * <<<users>>>
+
+   * <<<thin-badge>>>
+
+   * <<<partner-badge>>>
+
+   * <<<languages>>>
+
+   * <<<factoids>>>
+
+   * <<<cocomo>>>
+
+   * <<<stats>>>
+
++-----+
+<project name="xxx">
+  [...]
+  <custom>
+    <fluidoSkin>
+      <ohloh>
+        <projectId>3499</projectId>
+        <widget>factoids</widget>
+      </ohloh>
+    </fluidoSkin>
+  </custom>
+  [...]
+</project>
++-----+
+
+ Ohloh widgets will be rendered always in the footer as last element


Reply via email to