Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This document describes how profiles can be activated: <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html" rel="nofollow">Introduction to Build Profiles</a>. </p> <p>You could activate profiles via environment variables, but if you have many projects, and want to apply profiles per-project basis, then it's a fault solution to change environment variable before each separate project build execution. If you are working with IDE, you can configure launch configuration to set the property for each project, and you have to configure the correct mvn run command within a continuous integration for each project. However, that would make it impossible to build an aggregated build consisting of different projects that should be activated by different profiles.</p> <p>A possible workaround (which doesn't seem to be elegant, but I'm pretty sure it will work) is activating profiles based on file presence, and managing such 'marker files' for different projects to activate the required one. For example:</p> <pre class="lang-xml prettyprint-override"><code>&lt;profiles&gt; &lt;profile&gt; &lt;activation&gt; &lt;file&gt; &lt;exists&gt;.profile-A&lt;/exists&gt; &lt;/file&gt; &lt;/activation&gt; ... &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p>Expected behavior: This profile gets activated if file with a name '.profile-A' exists in a root folder of a project.</p> <p>However, at this point one more interesting question arises: what would be the behavior in case of aggregated build?</p>
 

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