You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2011/12/07 20:55:42 UTC
svn commit: r1211612 - in /maven/skins/trunk/maven-fluido-skin/src:
it/mskins-14/ it/mskins-14/src/ it/mskins-14/src/site/
it/mskins-14_sitesearch/ it/mskins-14_sitesearch/src/
it/mskins-14_sitesearch/src/site/ main/resources/META-INF/maven/ site/apt/
Author: rfscholte
Date: Wed Dec 7 19:55:42 2011
New Revision: 1211612
URL: http://svn.apache.org/viewvc?rev=1211612&view=rev
Log:
Fix MSKINS-14: Search searches only current site
Added:
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/pom.xml
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/site.xml
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/pom.xml
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/site.xml
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-14/pom.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/pom.xml?rev=1211612&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/pom.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/pom.xml Wed Dec 7 19:55:42 2011
@@ -0,0 +1,75 @@
+<?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>
+
+ <groupId>org.apache.maven.skins.its</groupId>
+ <artifactId>mskins-14</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <skinName>@project.name@</skinName>
+ <skinDescription>@project.description@</skinDescription>
+ <skinGroupId>@project.groupId@</skinGroupId>
+ <skinArtifactId>@project.artifactId@</skinArtifactId>
+ <skinVersion>@project.version@</skinVersion>
+ </properties>
+
+ <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>
\ No newline at end of file
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/site.xml?rev=1211612&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/site.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-14/src/site/site.xml Wed Dec 7 19:55:42 2011
@@ -0,0 +1,41 @@
+<?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>
+
+ <custom>
+ <fluidoSkin>
+ <googleSearch/>
+ </fluidoSkin>
+ </custom>
+
+ <body/>
+</project>
\ No newline at end of file
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/pom.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/pom.xml?rev=1211612&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/pom.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/pom.xml Wed Dec 7 19:55:42 2011
@@ -0,0 +1,75 @@
+<?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>
+
+ <groupId>org.apache.maven.skins.its</groupId>
+ <artifactId>mskins-14_sitesearch</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <skinName>@project.name@</skinName>
+ <skinDescription>@project.description@</skinDescription>
+ <skinGroupId>@project.groupId@</skinGroupId>
+ <skinArtifactId>@project.artifactId@</skinArtifactId>
+ <skinVersion>@project.version@</skinVersion>
+ </properties>
+
+ <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>
\ No newline at end of file
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/site.xml?rev=1211612&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/site.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-14_sitesearch/src/site/site.xml Wed Dec 7 19:55:42 2011
@@ -0,0 +1,43 @@
+<?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>
+
+ <custom>
+ <fluidoSkin>
+ <googleSearch>
+ <sitesearch>maven.apache.org</sitesearch>
+ </googleSearch>
+ </fluidoSkin>
+ </custom>
+
+ <body/>
+</project>
\ No newline at end of file
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=1211612&r1=1211611&r2=1211612&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 Dec 7 19:55:42 2011
@@ -531,7 +531,13 @@
#macro ( googleSearch $top )
#set( $startIndex = $project.url.indexOf("://") + 3 )
<form action="http://www.google.com/search" method="get" #if ( $top )class="pull-right"#end>
- <input value="$project.url.substring( $startIndex, $project.url.length() )" name="sitesearch" type="hidden"/>
+ #if( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'googleSearch' )
+ && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'googleSearch' ).getChild( 'sitesearch' ) )
+ #set( $sitesearchValue = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'googleSearch' ).getChild( 'sitesearch' ).getValue() )
+ #else
+ #set( $sitesearchValue = $project.url.substring( $startIndex, $project.url.length() ) )
+ #end
+ <input value="$sitesearchValue" name="sitesearch" type="hidden"/>
<input class="mini" size="5" name="q" id="query" type="text" value="search..." onclick="if(this.value == 'search...') {this.value = ''}"/>
<input name="Search" value="Go" type="submit"/>
</form>
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=1211612&r1=1211611&r2=1211612&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 Dec 7 19:55:42 2011
@@ -104,7 +104,7 @@ ${project.name}
Users can optionally enable the <<Google Search>> for the generated site, requirements are:
- * the <<<project/url>>> property in <<<pom.xml>>>:
+ * the <<<project/url>>> property in <<<pom.xml>>>, unless the <<<custom/fluidoSkin/googleSearch/sitesearch>>> property is set in the <<<site.xml>>>:
+-----+
<project
@@ -114,14 +114,16 @@ ${project.name}
</project>
+-----+
- * the <<<custom/fluidoSkin/searchEnabled>>> element in <<<site.xml>>>:
+ * the <<<custom/fluidoSkin/googleSearch>>> element in <<<site.xml>>> or the deprecated <<<custom/fluidoSkin/searchEnabled>>> :
+-----+
<project name="xxx">
...
<custom>
<fluidoSkin>
- <searchEnabled>true</searchEnabled>
+ <googleSearch>
+ <sitesearch/>
+ </googleSearch>
</fluidoSkin>
</custom>
...
@@ -132,7 +134,7 @@ ${project.name}
By default, the search form:
- * is <not> enabled;
+ * is <not> enabled; adding <<\<googleSearch/\>>>> is enough to enable the searchbox.
* is rendered in the sidebar, if the topbar only is available it will be rendered there.