Wednesday, December 14, 2016

What string manipulation functions are available in the AEM Javacript Use API?

When i was working with my first AEM Javascript Use API, there are some great links to help you get started.

Notably this one AEM Manager Podcast - Understanding the JavaScript Use-API for AEM

However, I had a lot of trouble figuring out exactly what string manipulation methods were allowed.
Index of? Contains?

As it turns out, you can use any of the EcmaScript JavaScrip methods.
The full list is here:

Mozilla developer network : JavaScript reference

Wednesday, November 23, 2016

Maven errors in IntelliJ :The plugin com.github.eirslett:frontend-maven-plugin:0.0.27 requires Maven version 3.1.0

Setting up Intellij for the first time.
Trying to build my project and i end up with a build error:

Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.27:install-node-and-npm (install node and npm) on project manin: The plugin com.github.eirslett:frontend-maven-plugin:0.0.27 requires Maven version 3.1.0

But i have 3.9.1 installed!! Grrr...

This thread set me on the right track.

Basically, IntelliJ ships with it's own bundled version of Maven. So you have to unbundle it.

In IntelliJ,

  1. Go to View >> Tool Windows >> Maven Projects
  2. Choose Maven Settings.
  3.  in the left tab, make sure Maven is picked, and select your Maven home directory instead of the bundled Maven
Step1: Maven Projects


Step2: Choose Maven Settings (last item on the toolbar, the little wrench)


Step3: Update Maven Settings