Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'd strongly recommend using a CI tool to manage this for you, I personally like to configure which emails are to be sent on the build to avoid spamming. For example only notify when the build starts failing, or starts working again, not on every failure.</p> <p>If you're sure this is the right approach, you can use the <a href="http://maven.apache.org/plugins/maven-changes-plugin/index.html" rel="nofollow noreferrer">maven-changes-plugin</a> to send an email on each build. You can <a href="http://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html" rel="nofollow noreferrer">customise the mail template with velocity</a>, and bind the execution of the goals to an appropriate phase so it is sent when you want it.</p> <p>I'd also put the configuration in a profile so it is sent when you want it to be (i.e. when the profile is active).</p> <p>The configuration looks something like this:</p> <pre><code>&lt;profiles&gt; &lt;profile&gt; &lt;id&gt;notify&lt;/id&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-changes-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;!--send an email in the install phase, could be changed depending on your needs--&gt; &lt;phase&gt;install&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;announcement-mail&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;smtpHost&gt;mail.yourhost.com&lt;/smtpHost&gt; &lt;smtpPort implementation="java.lang.Integer"&gt;25&lt;/smtpPort&gt; &lt;toAddresses&gt; &lt;toAddress implementation="java.lang.String"&gt; someones@email.com&lt;/toAddress&gt; &lt;toAddress implementation="java.lang.String"&gt; someoneelse@email.com&lt;/toAddress&gt; &lt;/toAddresses&gt; &lt;!--using a custom velocity template in src/main/resources/mailTemplate/announcement.vm --&gt; &lt;template&gt;announcement.vm&lt;/template&gt; &lt;templateDirectory&gt;mailTemplate&lt;/templateDirectory&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre>
 

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