Maven update POM and all the POM's that have dependencies to the changed POM
<p>I have a project with the following structure.</p>

<pre><code>D:\PROJECT\Services
</code></pre>

<p>and inside the services I have multiple maven projects, like this:</p>

<pre><code>D:\PROJECT\Services\DTO
D:\PROJECT\Services\PERSON
...
</code></pre>

<p>And I want to update the POM version of the DTO project.</p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
&lt;parent&gt;
    &lt;groupId&gt;com.hijat2&lt;/groupId&gt;
    &lt;artifactId&gt;Hijat2-root-parent&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/parent&gt;
&lt;artifactId&gt;hijat2-dto&lt;/artifactId&gt;
&lt;version&gt;0.6.0-EPIC-6312-SNAPSHOT&lt;/version&gt;
&lt;name&gt;hijat2-dto&lt;/name&gt;
&lt;description&gt;Data transfer object library for P.&lt;/description&gt;
&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.hijat2&lt;/groupId&gt;
        &lt;artifactId&gt;hijat2-enum&lt;/artifactId&gt;
        &lt;version&gt;0.6.0-EPIC-6312-SNAPSHOT&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
            &lt;groupId&gt;commons-lang&lt;/groupId&gt;
            &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
        &lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<p></p>

<p>if I run this line:</p>

<pre><code>mvn versions:set -DnewVersion=$RELEASE_VERSION -DautoVersionSubmodules=true
</code></pre>

<p>this will be changed:</p>

<pre><code>...
&lt;parent&gt;
&lt;groupId&gt;com.hijat2&lt;/groupId&gt;
&lt;artifactId&gt;Hijat2-root-parent&lt;/artifactId&gt;
&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/parent&gt;
&lt;artifactId&gt;hijat2-dto&lt;/artifactId&gt;
&lt;version&gt;NEW VERSION&lt;/version&gt;
&lt;name&gt;hijat2-dto&lt;/name&gt;
...
</code></pre>

<p>The question that I have is, how can I update all the POM files that have this POM file as a dependecy?</p>

<p>like this example for this project</p>

<pre><code>D:\PROJECT\Services\PERSON
</code></pre>

<p>this is the POM with the DTO dependecy</p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
&lt;parent&gt;
    &lt;groupId&gt;com.hijat2&lt;/groupId&gt;
    &lt;artifactId&gt;Hijat2-root-parent&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/parent&gt;
&lt;artifactId&gt;hijat2-ansiotiedot-service-if&lt;/artifactId&gt;
&lt;version&gt;0.2.0-EPIC-6312-SNAPSHOT&lt;/version&gt;
&lt;packaging&gt;jar&lt;/packaging&gt;
&lt;name&gt;hijat2-ansiotiedot-service-if&lt;/name&gt;
&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.hijat2&lt;/groupId&gt;
        &lt;artifactId&gt;hijat2-dto&lt;/artifactId&gt;
        &lt;version&gt;0.6.0-EPIC-6312-SNAPSHOT&lt;/version&gt; &lt;------This version should be updated
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
        &lt;artifactId&gt;cxf-rt-rs-client&lt;/artifactId&gt;
    &lt;/dependency&gt;
&lt;/dependencies&gt;

&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<p></p>

<p>Both files are in different folders, Is this possible to do?</p>

<p>Thanks in advance.</p>