title: Suppressing GPG signing for Maven-based continuous integration builds (Travis CI)
body: <p>I'm using <a href="https://travis-ci.org/" rel="noreferrer">Travis-CI</a> to provide continuous integration builds for a few Java open source projects I'm working on.</p>
  
  <p>Normally this works smoothly, but I have a problem when the POM specifies GPG signing, e.g. </p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-gpg-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.4&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;id&gt;sign-artifacts&lt;/id&gt;
        &lt;phase&gt;verify&lt;/phase&gt;
        &lt;goals&gt;
          &lt;goal&gt;sign&lt;/goal&gt;
        &lt;/goals&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>This causes the Travis build to fail - apparently because it does not have a passphrase available while running <code>mvn install</code>. See <a href="https://travis-ci.org/nuroko/nurokore/jobs/4683227" rel="noreferrer">this build</a> for an example.</p>
  
  <p>What is the best way to configure Maven and/or Travis to skip GPG signing for CI test builds, but still perform GPG signing when I do a proper release build?</p>