Using Bower as part of a build might make sense if, for example, you want to get latest versions of libraries with security fixes automatically. If you want to open source code, it might also make it easier for you to only refer and not include third party libraries dependent on your corporate open source policies.
I’ve found a nice Maven plugin to run Bower as part of a build and it works nicely, both locally as well as on Bluemix DevOps – frontend maven plugin. The plugin installs Node and npm and then Bower.
The installation of the Maven plugin is simple and well documented. Essentially you need to define the plugin in the pom.xml and you need a package.json file.
Here is how my sample Java project looks like before building it.
After a mvn build the web resources have been downloaded to the WebContent directory.
You don’t have to do anything else to use the same functionality on Bluemix DevOps. Just make sure you add the new files and folders to your .gitignore.