Building with a single command

Let's start this connection by combining the build command. Since we put the frontend inside the backend as a subfolder, we will use Maven to control npm. Another important reason of doing this is that Maven has built-in support of various phases of the entire build life cycle that we can leverage. We can use Maven plugins to combine the frontend build steps into Maven's build life cycle. The build life cycle that is shown in Figure 8.8 here is the one we will implement:

Figure 8.8: Building the life cycle

For simplicity, the life cycle diagram doesn't include all of the default phases that Maven supports. You ...

Get Building Applications with Spring 5 and Vue.js 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.