I have been trying to include shufflejs in a Liferay (6.2) portlet.
I have added the following dependency to my pom.xml
file:
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>shufflejs</artifactId>
<version>4.0.0</version>
<scope>compile</scope>
</dependency>
webapps/my-portlet/WEB-INF/lib/shufflejs-4.0.0.jar
is present and contains, within it, the META-INF/resources/webjars/shufflejs/4.0.0/dist/shuffle.js
I have included the following line in my liferay-portlet.xml
file:
<header-portlet-javascript>
/webjars/shufflejs/4.0.0/dist/shuffle.js
</header-portlet-javascript>
http://localhost:20080/my-portlet/webjars/shufflejs/4.0.0/dist/shuffle.js?browserId=other&minifierType=js&languageId=en_US&b=6210&t=1465296591338
What am I missing?
Thank you
I found the cause of my troubles. I have deployed my portlet and run the portal in Eclipse with JRebel. When I deploy/run my portlet standalone without JRebel, this resource is found. Moreover, I am able to then bring the portal down and then bring it back up in Eclipse/JRebel - now the resource can be found.
I have encountered similar problems when running with Eclipse/JRebel before (see Liferay: perform an action when a -LocalServiceUtil is available). All in all Eclipse/JRebel is great, but sometimes a little wonkiness occurs when deploying portlets.