'Build Submodule into jar file with maven

I have a multi-module spring boot project, and I need to use maven package to build one of its sub-module A into jar file. this sub-module will also run java code in other sub-module B and C. How do I build sub module A into jar file?

Do I only need to navigate to sub module A in terminal and run mvn package?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source