Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven profile properties are not "overriding"
    primarykey
    data
    text
    <p>I have Maven multi-module project with such structure:</p> <blockquote> <p>parent-pom-project</p> <p>-- module1</p> <p>-- module2</p> </blockquote> <p>At the parent-pom-project I have such pom.xml</p> <pre><code> &lt;modules&gt; &lt;module&gt;module1&lt;/module&gt; &lt;/modules&gt; ... &lt;profiles&gt; &lt;profile&gt; &lt;id&gt;local&lt;/id&gt; &lt;properties&gt; &lt;prop&gt;local_prop&lt;/prop&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;test&lt;/id&gt; &lt;modules&gt; &lt;module&gt;module2&lt;/module&gt; &lt;/modules&gt; &lt;properties&gt; &lt;prop&gt;test_prop&lt;/prop&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p>At all pom.xml files I have such tag:</p> <pre><code>&lt;build&gt; &lt;resources&gt; &lt;resource&gt; &lt;directory&gt;src/main/resources&lt;/directory&gt; &lt;filtering&gt;true&lt;/filtering&gt; &lt;/resource&gt; &lt;resource&gt; &lt;directory&gt;src/test/resources&lt;/directory&gt; &lt;filtering&gt;true&lt;/filtering&gt; &lt;/resource&gt; &lt;/resources&gt; &lt;/build&gt; </code></pre> <p>At module1 and module2 in <em>resource</em> directory I have properties files with such text:</p> <pre><code>prop=${prop} </code></pre> <p>The problem is that after </p> <blockquote> <p>mvn clean install</p> </blockquote> <p>or</p> <blockquote> <p>mvn clean install -Ptest</p> </blockquote> <p>or even</p> <blockquote> <p>mvn clean install -P test</p> </blockquote> <p>I get </p> <blockquote> <p>prop=local_prop</p> </blockquote> <p>If I user test profile for build module2 is also builded, but properties are used from local profile. I use Maven 3.0.3. Anybody have any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload