Ad

Is It Possible To Use Maven To Develop Frontend/Web Apps?

- 1 answer

I have worked with Gulp, Grunt and Webpack. I feel that so far the best build tool I've worked with is Maven. Simple and concise, in my opinion.

For this reason I would like to know if it is possible to use Maven as an alternative to Gulp, Grunt and Webpack, to deploy my web apps.

Simultaneously I would love to use Kotlin instead of JavaScript.

Is there any possible way where I could mount a boilerplate web project having these technologies:

Maven instead of Gulp, Grunt, Webpack

Kotlin instead of JavaScript

SASS instead of CSS

And have the following libs integrated: VueJS, FlexboxGrid or similar, Font-Awesome and C3js?

Thanks!

Ad

Answer

it is possible to use Maven as an alternative to Gulp, Grunt and Webpack, to deploy my web apps.

Gulp and Grunt - tasks runners.

Webpack - modern bundler with a lot nice features (like webpack-dev-server and hot module replacement).

Maven - is task runner plus dependency manager. In JS world you usually use npm for dependency management.

Maven instead of Gulp, Grunt, Webpack

For web development you shouldn't use maven, you can call webpack or anything else when you building both java and frontend, but for development i recommended stay with webpack and npm.

So - no, use webpack for build UI.

SASS instead of CSS

If you stay with webpack - it's very simple to stay with sass, just use node-sass and sass-loader.

On other side maven has sass-maven-plugin, i'm not sure about their quality, and looks like it dead. So I highly recommended to build your sass files with webpack.

Kotlin instead of JavaScript

Currently JavaScript target for Kotlin is under active development, so you can run into bugs and not yet implemented features. But it possible, and there are already few projects. You can write code in Kotlin, compile to JS and use it in webpack. If you doesn't want to learn a lot things yourself i recommend wait for Kotlin 1.1.

Ad
source: stackoverflow.com
Ad