The difference between --also-make and -also-make-dependents

I recently learned about a parameter --also-makethat you can pass to Maven. From what I understand, this causes not only my-project, but also all projects that depend on my project.

mvn --projects my-project --also-make install

But there is another parameter called --also-make-dependents. From the description it looks like he is doing the same thing as --also-make, but my friend at work told me that this is not the same thing. What is the difference?

+4
source share
1 answer
  • --also-makebuilds all projects that my-projectdepend on
  • --also-make-dependents builds all projects that depend on my-project

DAG (Directed Acyclic Graph) ( edge A → B , B A), --also-make my-project "" --also-make-dependents my-project "" .

, :

 dao     util
   \     /
  services
     | 
   webapp

mvn --projects services --also-make

dao, util services.

mvn --projects services --also-make-dependents

services webapp

+8

Source: https://habr.com/ru/post/1658623/


All Articles