You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/03/26 08:50:33 UTC
[maven-fluido-skin] 01/01: [MSKINS-161] Upgrade Facebook like
button integration
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MSKINS-161
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git
commit 241a2ab93c3a40cda7a594a3e462c762c4501f10
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Tue Mar 24 21:00:45 2020 +0100
[MSKINS-161] Upgrade Facebook like button integration
---
pom.xml | 60 ++++++++++++++++++++++
src/it/{mskins-33 => mskins-161}/pom.xml | 46 +++++++++++------
src/it/mskins-161/sidebar-fb-like-share/pom.xml | 32 ++++++++++++
.../src/site/apt/index.apt.vm | 36 +++++++++++++
.../sidebar-fb-like-share/src/site/site.xml | 47 +++++++++++++++++
.../mskins-161/sidebar-fb-recommend-share/pom.xml | 32 ++++++++++++
.../src/site/apt/index.apt.vm | 36 +++++++++++++
.../sidebar-fb-recommend-share/src/site/site.xml | 49 ++++++++++++++++++
src/it/mskins-161/topbar-fb-like-share/pom.xml | 32 ++++++++++++
.../topbar-fb-like-share/src/site/apt/index.apt.vm | 36 +++++++++++++
.../topbar-fb-like-share/src/site/site.xml | 49 ++++++++++++++++++
.../mskins-161/topbar-fb-recommend-share/pom.xml | 32 ++++++++++++
.../src/site/apt/index.apt.vm | 36 +++++++++++++
.../topbar-fb-recommend-share/src/site/site.xml | 50 ++++++++++++++++++
src/it/mskins-161/verify.groovy | 51 ++++++++++++++++++
src/it/mskins-33/pom.xml | 2 +-
src/it/mskins-33/verify.groovy | 30 +++++++++++
src/it/mskins-33_topbar/pom.xml | 2 +-
src/it/mskins-33_topbar/verify.groovy | 30 +++++++++++
src/main/resources/META-INF/maven/site-macros.vm | 28 +++++-----
src/main/resources/META-INF/maven/site.vm | 1 +
src/site/apt/ITs.apt | 9 +++-
src/site/apt/index.apt.vm | 24 +++++++--
23 files changed, 715 insertions(+), 35 deletions(-)
diff --git a/pom.xml b/pom.xml
index 69a989f..ba4f4d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -728,6 +728,66 @@ under the License.
<outputDirectory>${project.build.directory}/site/mskins-143_true/</outputDirectory>
</configuration>
</execution>
+ <execution>
+ <id>copy-mskins-161-sidebar-fb-like-share</id>
+ <phase>site</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/it/mskins-161/sidebar-fb-like-share/target/site/</directory>
+ </resource>
+ </resources>
+ <outputDirectory>${project.build.directory}/site/mskins-161-sidebar-fb-like-share/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-mskins-161-sidebar-fb-recommend-share</id>
+ <phase>site</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/it/mskins-161/sidebar-fb-recommend-share/target/site/</directory>
+ </resource>
+ </resources>
+ <outputDirectory>${project.build.directory}/site/mskins-161-sidebar-fb-recommend-share/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-mskins-161-topbar-fb-like-share</id>
+ <phase>site</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/it/mskins-161/topbar-fb-like-share/target/site/</directory>
+ </resource>
+ </resources>
+ <outputDirectory>${project.build.directory}/site/mskins-161-topbar-fb-like-share/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-mskins-161-topbar-fb-recommend-share</id>
+ <phase>site</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/it/mskins-161/topbar-fb-recommend-share/target/site/</directory>
+ </resource>
+ </resources>
+ <outputDirectory>${project.build.directory}/site/mskins-161-topbar-fb-recommend-share/</outputDirectory>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/src/it/mskins-33/pom.xml b/src/it/mskins-161/pom.xml
similarity index 67%
copy from src/it/mskins-33/pom.xml
copy to src/it/mskins-161/pom.xml
index 4a25ea1..ce181e2 100644
--- a/src/it/mskins-33/pom.xml
+++ b/src/it/mskins-161/pom.xml
@@ -16,7 +16,7 @@
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">
+ 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>
@@ -25,12 +25,18 @@
</parent>
<groupId>org.apache.maven.skins.its</groupId>
- <artifactId>@project.artifactId@-mskins-33</artifactId>
+ <artifactId>@project.artifactId@-mskins-161-parent</artifactId>
<version>1.0-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
+ <name>@project.name@ IT, MSKINS-161</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-161/</url>
- <name>@project.name@ IT, MSKINS-33</name>
- <url>http://maven.apache.org/skins/@project.artifactId@/mskins-23/</url>
+ <modules>
+ <module>sidebar-fb-like-share</module>
+ <module>sidebar-fb-recommend-share</module>
+ <module>topbar-fb-like-share</module>
+ <module>topbar-fb-recommend-share</module>
+ </modules>
<properties>
<skinName>@project.name@</skinName>
@@ -40,21 +46,27 @@
<skinVersion>@project.version@</skinVersion>
</properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>@sitePluginVersion@</version>
+ <!-- skip only in root module -->
+ <inherited>false</inherited>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
</plugin>
</plugins>
</build>
@@ -65,8 +77,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
- <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
- <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+ <!-- for test we need simple site without reports -->
+ <skip>true</skip>
</configuration>
</plugin>
</plugins>
diff --git a/src/it/mskins-161/sidebar-fb-like-share/pom.xml b/src/it/mskins-161/sidebar-fb-like-share/pom.xml
new file mode 100644
index 0000000..a1c7b2c
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-like-share/pom.xml
@@ -0,0 +1,32 @@
+<?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.skins.its</groupId>
+ <artifactId>@project.artifactId@-mskins-161-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>@project.artifactId@-mskins-161-sidebar-fb-like-share</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>@project.name@ IT, MSKINS-161 sidebar-fb-like-share</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-161/</url>
+
+</project>
diff --git a/src/it/mskins-161/sidebar-fb-like-share/src/site/apt/index.apt.vm b/src/it/mskins-161/sidebar-fb-like-share/src/site/apt/index.apt.vm
new file mode 100644
index 0000000..d4a29fd
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-like-share/src/site/apt/index.apt.vm
@@ -0,0 +1,36 @@
+ ------
+ ${project.name}
+ ------
+ Simo
+ ------
+ 2012-03-18
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+${project.name}
+
+ This is a test for ${skinName} with Facebook like with share button.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
diff --git a/src/it/mskins-161/sidebar-fb-like-share/src/site/site.xml b/src/it/mskins-161/sidebar-fb-like-share/src/site/site.xml
new file mode 100644
index 0000000..384ce4b
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-like-share/src/site/site.xml
@@ -0,0 +1,47 @@
+<?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>
+ <facebookLike>
+ <shareButton>true</shareButton>
+ </facebookLike>
+ </fluidoSkin>
+ </custom>
+ <!-- END SNIPPET: skin-custom-config -->
+
+ <publishDate format="yyyy-MM-dd" position="right"/>
+ <version position="right"/>
+
+</project>
diff --git a/src/it/mskins-161/sidebar-fb-recommend-share/pom.xml b/src/it/mskins-161/sidebar-fb-recommend-share/pom.xml
new file mode 100644
index 0000000..fe356f2
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-recommend-share/pom.xml
@@ -0,0 +1,32 @@
+<?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.skins.its</groupId>
+ <artifactId>@project.artifactId@-mskins-161-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>@project.artifactId@-mskins-161-sidebar-fb-recommend-share</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>@project.name@ IT, MSKINS-161 sidebar-fb-recommend-share</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-161/</url>
+
+</project>
diff --git a/src/it/mskins-161/sidebar-fb-recommend-share/src/site/apt/index.apt.vm b/src/it/mskins-161/sidebar-fb-recommend-share/src/site/apt/index.apt.vm
new file mode 100644
index 0000000..a2684bd
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-recommend-share/src/site/apt/index.apt.vm
@@ -0,0 +1,36 @@
+ ------
+ ${project.name}
+ ------
+ Simo
+ ------
+ 2012-03-18
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+${project.name}
+
+ This is a test for ${skinName} with Facebook recommend with share button.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
diff --git a/src/it/mskins-161/sidebar-fb-recommend-share/src/site/site.xml b/src/it/mskins-161/sidebar-fb-recommend-share/src/site/site.xml
new file mode 100644
index 0000000..5cd9959
--- /dev/null
+++ b/src/it/mskins-161/sidebar-fb-recommend-share/src/site/site.xml
@@ -0,0 +1,49 @@
+<?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>
+ <facebookLike>
+ <shareButton>true</shareButton>
+ <recommend>true</recommend>
+ <layout>button</layout>
+ </facebookLike>
+ </fluidoSkin>
+ </custom>
+ <!-- END SNIPPET: skin-custom-config -->
+
+ <publishDate format="yyyy-MM-dd" position="right"/>
+ <version position="right"/>
+
+</project>
diff --git a/src/it/mskins-161/topbar-fb-like-share/pom.xml b/src/it/mskins-161/topbar-fb-like-share/pom.xml
new file mode 100644
index 0000000..7de7617
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-like-share/pom.xml
@@ -0,0 +1,32 @@
+<?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.skins.its</groupId>
+ <artifactId>@project.artifactId@-mskins-161-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>@project.artifactId@-mskins-161-topbar-fb-like-share</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>@project.name@ IT, MSKINS-161 topbar-fb-like-share</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-161/</url>
+
+</project>
diff --git a/src/it/mskins-161/topbar-fb-like-share/src/site/apt/index.apt.vm b/src/it/mskins-161/topbar-fb-like-share/src/site/apt/index.apt.vm
new file mode 100644
index 0000000..d4a29fd
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-like-share/src/site/apt/index.apt.vm
@@ -0,0 +1,36 @@
+ ------
+ ${project.name}
+ ------
+ Simo
+ ------
+ 2012-03-18
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+${project.name}
+
+ This is a test for ${skinName} with Facebook like with share button.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
diff --git a/src/it/mskins-161/topbar-fb-like-share/src/site/site.xml b/src/it/mskins-161/topbar-fb-like-share/src/site/site.xml
new file mode 100644
index 0000000..4d253fd
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-like-share/src/site/site.xml
@@ -0,0 +1,49 @@
+<?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>
+ <topBarEnabled>true</topBarEnabled>
+ <sideBarEnabled>false</sideBarEnabled>
+ <facebookLike>
+ <shareButton>true</shareButton>
+ </facebookLike>
+ </fluidoSkin>
+ </custom>
+ <!-- END SNIPPET: skin-custom-config -->
+
+ <publishDate format="yyyy-MM-dd" position="right"/>
+ <version position="right"/>
+
+</project>
diff --git a/src/it/mskins-161/topbar-fb-recommend-share/pom.xml b/src/it/mskins-161/topbar-fb-recommend-share/pom.xml
new file mode 100644
index 0000000..0c0943c
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-recommend-share/pom.xml
@@ -0,0 +1,32 @@
+<?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.skins.its</groupId>
+ <artifactId>@project.artifactId@-mskins-161-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>@project.artifactId@-mskins-161-topbar-fb-recommend-share</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>@project.name@ IT, MSKINS-161 topbar-fb-recommend-share</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-161/</url>
+
+</project>
diff --git a/src/it/mskins-161/topbar-fb-recommend-share/src/site/apt/index.apt.vm b/src/it/mskins-161/topbar-fb-recommend-share/src/site/apt/index.apt.vm
new file mode 100644
index 0000000..a2684bd
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-recommend-share/src/site/apt/index.apt.vm
@@ -0,0 +1,36 @@
+ ------
+ ${project.name}
+ ------
+ Simo
+ ------
+ 2012-03-18
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+${project.name}
+
+ This is a test for ${skinName} with Facebook recommend with share button.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
diff --git a/src/it/mskins-161/topbar-fb-recommend-share/src/site/site.xml b/src/it/mskins-161/topbar-fb-recommend-share/src/site/site.xml
new file mode 100644
index 0000000..7872e1a
--- /dev/null
+++ b/src/it/mskins-161/topbar-fb-recommend-share/src/site/site.xml
@@ -0,0 +1,50 @@
+<?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>
+ <topBarEnabled>true</topBarEnabled>
+ <sideBarEnabled>false</sideBarEnabled>
+ <facebookLike>
+ <shareButton>true</shareButton>
+ <recommend>true</recommend>
+ </facebookLike>
+ </fluidoSkin>
+ </custom>
+ <!-- END SNIPPET: skin-custom-config -->
+
+ <publishDate format="yyyy-MM-dd" position="right"/>
+ <version position="right"/>
+
+</project>
diff --git a/src/it/mskins-161/verify.groovy b/src/it/mskins-161/verify.groovy
new file mode 100644
index 0000000..1b307d3
--- /dev/null
+++ b/src/it/mskins-161/verify.groovy
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+assert buildLog.text.contains('[INFO] BUILD SUCCESS')
+
+File index = new File( basedir, 'sidebar-fb-like-share/target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/" data-layout="box_count" data-show-faces="false" data-action="like" data-share="true"></div>')
+
+index = new File( basedir, 'sidebar-fb-recommend-share/target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/" data-layout="button" data-show-faces="false" data-action="recommend" data-share="true"></div>')
+
+index = new File( basedir, 'topbar-fb-like-share/target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like pull-right" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/" data-layout="button_count" data-show-faces="false" data-action="like" data-share="true"></div>')
+
+index = new File( basedir, 'topbar-fb-recommend-share/target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like pull-right" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/" data-layout="button_count" data-show-faces="false" data-action="recommend" data-share="true"></div>')
+
diff --git a/src/it/mskins-33/pom.xml b/src/it/mskins-33/pom.xml
index 4a25ea1..82f8944 100644
--- a/src/it/mskins-33/pom.xml
+++ b/src/it/mskins-33/pom.xml
@@ -30,7 +30,7 @@
<packaging>jar</packaging>
<name>@project.name@ IT, MSKINS-33</name>
- <url>http://maven.apache.org/skins/@project.artifactId@/mskins-23/</url>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-33/</url>
<properties>
<skinName>@project.name@</skinName>
diff --git a/src/it/mskins-33/verify.groovy b/src/it/mskins-33/verify.groovy
new file mode 100644
index 0000000..be8c5c2
--- /dev/null
+++ b/src/it/mskins-33/verify.groovy
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+assert buildLog.text.contains('[INFO] BUILD SUCCESS')
+
+File index = new File( basedir, 'target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-33/" data-layout="box_count" data-show-faces="false" data-action="like" data-share="false"></div>')
+
diff --git a/src/it/mskins-33_topbar/pom.xml b/src/it/mskins-33_topbar/pom.xml
index 4a25ea1..82f8944 100644
--- a/src/it/mskins-33_topbar/pom.xml
+++ b/src/it/mskins-33_topbar/pom.xml
@@ -30,7 +30,7 @@
<packaging>jar</packaging>
<name>@project.name@ IT, MSKINS-33</name>
- <url>http://maven.apache.org/skins/@project.artifactId@/mskins-23/</url>
+ <url>http://maven.apache.org/skins/@project.artifactId@/mskins-33/</url>
<properties>
<skinName>@project.name@</skinName>
diff --git a/src/it/mskins-33_topbar/verify.groovy b/src/it/mskins-33_topbar/verify.groovy
new file mode 100644
index 0000000..7bb2ce2
--- /dev/null
+++ b/src/it/mskins-33_topbar/verify.groovy
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+assert buildLog.text.contains('[INFO] BUILD SUCCESS')
+
+File index = new File( basedir, 'target/site/index.html')
+assert index.exists()
+assert index.text.contains('<div id="fb-root"></div>')
+assert index.text.contains('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script>')
+assert index.text.contains(
+ '<div class="fb-like pull-right" style="border:none; margin-top: 10px" data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-33/" data-layout="button_count" data-show-faces="false" data-action="like" data-share="false"></div>')
+
diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index 0f7e493..5f0e3d0 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -645,27 +645,31 @@ $indent </ul>##
#**##end
#end
##
+#macro ( facebookLoadSDK )
+#**##if ( $decoration.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url )
+ <!-- Load Facebook SDK for JavaScript -->
+ <div id="fb-root"></div>
+ <script async defer crossorigin="anonymous" src="https://connect.facebook.net/${locale}/sdk.js#xfbml=1&version=v6.0"></script>
+#**##end
+#end
+##
#macro ( facebookLike $sideBarEnabled )
#**##if ( $decoration.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url )
-## ## kindly hardcoded
##
#* *##set( $layout = 'box_count' )
#* *##if( !$sideBarEnabled )
#* *##set( $layout = 'button_count' )
#* *##end
+#* *##set( $layout = $decoration.getCustomValue( 'fluidoSkin.facebookLike.layout', $layout ) )
##
-#* *##set( $colorscheme = 'light' )
-#* *##if( !$sideBarEnabled )
-#* *##set( $colorscheme = 'dark' )
+#* *##set( $action = 'like' )
+#* *##if ( $decoration.getCustomValue( 'fluidoSkin.facebookLike.recommend' ).equalsIgnoreCase( 'true' ) )
+#* *##set( $action = 'recommend' )
#* *##end
##
-#* *##set( $frameWidth = 'width:48px; height:63px' )
-#* *##if( !$sideBarEnabled )
-#* *##set( $frameWidth = 'width:100px; height:20px' )
-#* *##end
+#* *##set( $shareButton = $decoration.getCustomValue( 'fluidoSkin.facebookLike.shareButton', '' ).equalsIgnoreCase( 'true' ) )
##
- <iframe src="https://www.facebook.com/plugins/like.php?href=$project.url&send=false&layout=$layout&show-faces=false&action=like&colorscheme=$colorscheme"
- style="border:none; $frameWidth; margin-top: 10px;" #if( !$sideBarEnabled ) class="pull-right" #end></iframe>
+ <div class="fb-like#if( !$sideBarEnabled ) pull-right#end" style="border:none; margin-top: 10px" data-href="$project.url" data-layout="$layout" data-show-faces="false" data-action="$action" data-share="$shareButton"></div>
#**##end
#end
##
@@ -678,11 +682,11 @@ $indent </ul>##
#* *##if ( $sideBarEnabled )
#* *##set( $dataSize = "medium" )
#* *##set( $dataAlign = "left" )
- <div id="twitter">
+ <div id="twitter" style="border:none; margin-top: 10px">
#* *##else
#* *##set( $dataSize = "large" )
#* *##set( $dataAlign = "right" )
- <ul class="nav pull-right"><li>
+ <ul class="nav pull-right" style="border:none; margin-top: 7px"><li>
#* *##end
##
<a href="https://twitter.com/${user}" class="twitter-follow-button" data-show-count="${showFollowers}" data-align="${dataAlign}" data-size="${dataSize}" data-show-screen-name="${showUser}" data-lang="${locale}">Follow ${user}</a>
diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm
index 5f74a41..bc63222 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -61,6 +61,7 @@
<body class="topBarDisabled">
#**##end
#**##forkMeOnGitHub()
+#**##facebookLoadSDK()
##
#**##set ( $sideBarEnabled = 'false' != $decoration.getCustomValue( 'fluidoSkin.sideBarEnabled' ) )
#**##set ( $searchEnabled = $decoration.getCustomChild( 'fluidoSkin.googleSearch' )
diff --git a/src/site/apt/ITs.apt b/src/site/apt/ITs.apt
index 73ca80c..dd71c24 100644
--- a/src/site/apt/ITs.apt
+++ b/src/site/apt/ITs.apt
@@ -48,8 +48,16 @@ Maven Fuido Skin ITs
* {{{./mskins-33/index.html}Like}}
+ * {{{./mskins-161-sidebar-fb-like-share}Like with share}}
+
+ * {{{./mskins-161-sidebar-fb-recommend-share}Like - Recommend with share}}
+
* {{{./mskins-33_topbar/index.html}Like (topbar)}}
+ * {{{./mskins-161-topbar-fb-like-share}Like with share (topbar)}}
+
+ * {{{./mskins-161-topbar-fb-recommend-share}Like - Recommend with share (topbar)}}
+
* {{{./mskins-10/index.html}MSKINS-10}}
* {{{./mskins-13/index.html}MSKINS-13}}
@@ -85,4 +93,3 @@ Maven Fuido Skin ITs
* {{{./mskins-143_true/index.html}MSKINS-143 (using explicit true)}}
[]
-
\ No newline at end of file
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 6ab6124..4f54a59 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -417,15 +417,33 @@ Welcome to ${project.name}!
** Facebook like button
- Since version <<1.2>>, fluido-skin supports the Facebook {{{http://developers.facebook.com/docs/reference/plugins/like/}like}}
- integration. Users have just to declare:
+ Since version <<1.2>>, fluido-skin supports the Facebook {{{https://developers.facebook.com/docs/plugins/like-button}like}}
+ integration. Users can define similar option to Facebook SDK:
+
+ * <<<custom.fluidoSkin.facebookLike.recommend>>>: <<optional>>, if set to <<<true>>> <<Recommend>> button will be rendered instead of <<Like>>
+
+ * <<<custom.fluidoSkin.facebookLike.shareButton>>>: <<optional>>, if set to <<<true>>> <<Share Button>> will be included.
+
+ * <<<custom.fluidoSkin.facebookLike.layout>>>: <<optional>> facebook layout, Can be one of:
+
+ * <<<standard>>>
+
+ * <<<button_count>>>: default if sidebar is not enabled
+
+ * <<<button>>>
+
+ * <<<box_count>>>: default if sidebar is enabled
+-----+
<project name="xxx">
[...]
<custom>
<fluidoSkin>
- <facebookLike />
+ <facebookLike>
+ <recommend>true/false</recommend>
+ <shareButton>true/false</shareButton>
+ <layout>box_count</layout>
+ </facebookLike>
</fluidoSkin>
</custom>
[...]