Specifying the Mail Sender

The identity used to send the announcement mail can be customized. It can be either a member of the <developers> section of the POM or it can be specified explicitly with the <mailSender> parameter of the plugin.

Specifying the developer to use

To specify which developer is used to send the announcement, simply specify the id of the developer as in the example below:

<project>
  <developers>
    ...
    <developer>
      <id>jsmith</id>
      <name>John Smith</name>
      <email>jsmith@foo.bar</email>
    </developer>
    ...
  </developers>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <fromDeveloperId>jsmith</fromDeveloperId>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>

If no developer id is specified, the first <developer> in the list will be used.

You can also do this from the command line, if the person doing the release changes between releases.

mvn -Dchanges.fromDeveloperId=jsmith changes:announcement-mail

Specifying the sender explicitly

If you want to specify the sender explicitly and not rely on the developers section of your POM, define the mailSender parameter of the plugin.

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <mailSender>
            <name>Release Notification</name>
            <email>noreply@foo.bar</email>
          </mailSender>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>