Custom Navigations in Portlet
abdulbasitmughal Sep 30, 2013 8:28 AMI have to develop vertical navigation menu for the left side of page. So i decided to customize the exiting menu. For this purpose i have created a portlet then downloaded the code from https://github.com/gatein/gatein-portal/tree/master/mobile-integration/portlets/navigation then added the code into my portlet in the following way..
1. Copy package into portlet (src\main\java\org\gatein\portlet\responsive\navigation)
2. Copy images, css and js files into respective folder
3. Added code into gatein-resource.xml
<module>
<name>dropdownmenu_jquery</name>
<script>
<path>/js/dropdownmenu.jquery.js</path>
</script>
<depends>
<module>jquery</module>
<as>jQuery</as>
</depends>
</module>
<module>
<name>org_gatein_navigation</name>
<script>
<path>/js/navigation.js</path>
</script>
<depends>
<module>jquery</module>
<as>jQuery</as>
</depends>
<depends>
<module>dropdownmenu_jquery</module>
</depends>
</module>
<portlet-skin>
<application-name>responsive-navigation-portlet</application-name>
<portlet-name>ResponsiveNavigationPortlet</portlet-name>
<skin-name>ResponsiveSkin</skin-name>
<css-path>/css/ResponsiveStylesheet.css</css-path>
</portlet-skin>
<portlet-skin>
<application-name>responsive-navigation-portlet</application-name>
<portlet-name>ResponsiveNavigationPortlet</portlet-name>
<skin-name>Default</skin-name>
<css-path>/css/DefaultStylesheet.css</css-path>
</portlet-skin>
<portlet>
<name>CSPResponsiveNavigationPortlet</name>
<module>
<depends>
<module>org_gatein_navigation</module>
</depends>
<depends>
<module>dropdownmenu_jquery</module>
</depends>
<depends>
<module>jquery</module>
<as>jQuery</as>
</depends>
</module>
</portlet>
4. Added code into portlet.xml
<portlet>
<description>CSP Responsive Navigation Portlet</description>
<portlet-name>CSPResponsiveNavigationPortlet</portlet-name>
<display-name>CSP Responsive Navigation Portlet</display-name>
<portlet-class>org.gatein.portlet.responsive.navigation.NavigationPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>locale.portlet.responsivenavigation</resource-bundle>
<portlet-info>
<title>GateIn Responsive Navigation Portlet</title>
<short-title>Navigation Portlet</short-title>
<keywords>System</keywords>
</portlet-info>
<portlet-preferences>
<preference>
<name>ShowEmptyCategories</name>
<value>true</value>
</preference>
</portlet-preferences>
</portlet>
5. Added code into pom.xml
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-portlet</artifactId>
<scope>provided</scope>
<version>2.4.3.Final</version>
</dependency>
<dependency>
<groupId>org.gatein.api</groupId>
<artifactId>gatein-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- ExoKernel Integration to retrieve Service -->
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
<scope>provided</scope>
<version>2.2.2-GA</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
<scope>provided</scope>
<version>2.2.1-GA</version>
</dependency>
But getting this error on mvn clean package
Downloading: http://repository.jboss.com/maven2/org/exoplatform/kernel/exo.kernel.commons/1.6/exo.kernel.commons-1.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.091s
[INFO] Finished at: Mon Sep 30 17:06:02 UZT 2013
[INFO] Final Memory: 7M/116M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project box-portlets: Could not resolve dependencies for project org.gatein.portal.BoxPortlets:csp-box-portlets:war:3.6.0.Final-qs-8: Failed to collect dependencies at org.exoplatform.kernel:exo.kernel.commons:jar:2.2.2-GA: Failed to read artifact descriptor
for org.exoplatform.kernel:exo.kernel.commons:jar:2.2.2-GA: Could not transfer artifact org.exoplatform.kernel:exo.kernel.commons:pom:2.2.2-GA from/to JBoss repository (http://repository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org/exoplatform/kernel/exo.kernel.commons
/2.2.2-GA/exo.kernel.commons-2.2.2-GA.pom , ReasonPhrase:Forbidden. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Please guide what is the error if it is the error due to version of mvn repositry files then please guide. If there is any other way to achieve this functionality then please guide also.
Thanks in advance for your help..