title: Deploy to sonatype nexus repo failing with missing resources
body: <p>I've just dusted off an old project I was working on a year ago and am trying to deploy a fix to the Sonatpye Nexus repo but keep hitting rule failures I don't understand. This is a Maven project developed in IntelliJ IDE.</p>
  
  <p>My errors are:</p>
  
  <pre><code>[ERROR] Nexus Staging Rules Failure Report
  [ERROR] ==================================
  [ERROR] 
  [ERROR] Repository "comgithubmuseadmin-1055" failures
  [ERROR]   Rule "sources-staging" failures
  [ERROR]     * Missing: no sources jar found in folder '/com/github/museadmin/infinite-state-machine/1.1.9'
  [ERROR]   Rule "javadoc-staging" failures
  [ERROR]     * Missing: no javadoc jar found in folder '/com/github/museadmin/infinite-state-machine/1.1.9'
  [ERROR]   Rule "signature-staging" failures
  [ERROR]     * Missing Signature: '/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar.asc' does not exist for 'infinite-state-machine-1.1.9.jar'.
  [ERROR]     * Missing Signature: '/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom.asc' does not exist for 'infinite-state-machine-1.1.9.pom'.
  </code></pre>
  
  <p>I'm assuming the <code>/com/xxx</code> path it's referring to is under my .m2 directory, as it doesn't exist in the project. But the contents of that directory under <code>/Users/atkinsb/.m2/repository/com/github/museadmin/infinite-state-machine/1.1.9</code> are:</p>
  
  <pre><code>Bradleys-MacBook-Pro:1.1.9 atkinsb$ ll
  total 624
  -rw-r--r--  1 atkinsb  staff     461  3 Apr 16:31 _remote.repositories
  -rw-r--r--  1 atkinsb  staff   40624  3 Apr 13:53 infinite-state-machine-1.1.9-javadoc.jar
  -rw-r--r--  1 atkinsb  staff     473  3 Apr 13:54 infinite-state-machine-1.1.9-javadoc.jar.asc
  -rw-r--r--  1 atkinsb  staff  121951  3 Apr 13:53 infinite-state-machine-1.1.9-sources.jar
  -rw-r--r--  1 atkinsb  staff     473  3 Apr 13:54 infinite-state-machine-1.1.9-sources.jar.asc
  -rw-r--r--  1 atkinsb  staff  123349  3 Apr 16:29 infinite-state-machine-1.1.9.jar
  -rw-r--r--  1 atkinsb  staff     473  3 Apr 13:53 infinite-state-machine-1.1.9.jar.asc
  -rw-r--r--  1 atkinsb  staff    3360  3 Apr 13:35 infinite-state-machine-1.1.9.pom
  -rw-r--r--  1 atkinsb  staff     473  3 Apr 13:53 infinite-state-machine-1.1.9.pom.asc
  </code></pre>
  
  <p>Before I go on to look at the signature errors, I'd like to understand why it is complaining about no sources or java docs jars when it looks like they are there.</p>
  
  <p>Any Java wizards able to enlighten me as to what I'm doing wrong?</p>
  
  <p>Cheers</p>
  
  <p>Brad</p>
  
  <p>PS My settings.xml:</p>
  
  <pre><code>&lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;ossrh&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;gpg.executable&gt;gpg&lt;/gpg.executable&gt;
                  &lt;gpg.passphrase&gt;xxxxxxxxxx&lt;/gpg.passphrase&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;servers&gt;
          &lt;server&gt;
              &lt;id&gt;ossrh&lt;/id&gt;
              &lt;username&gt;steadyonabix&lt;/username&gt;
              &lt;password&gt;xxxxxxx&lt;/password&gt;
          &lt;/server&gt;
      &lt;/servers&gt;
  
  &lt;/settings&gt;
  </code></pre>
  
  <p>This is the full log output:</p>
  
  <pre><code>Bradleys-MacBook-Pro:infinite-state-machine atkinsb$ mvn deploy
  [INFO] Scanning for projects...
  [INFO] Inspecting build with total of 1 modules...
  [INFO] Installing Nexus Staging features:
  [INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building com.github.museadmin:infinite-state-machine 1.1.9
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ infinite-state-machine ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 7 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ infinite-state-machine ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ infinite-state-machine ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /Users/atkinsb/GitRepos/infinite-state-machine/src/test/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ infinite-state-machine ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ infinite-state-machine ---
  [INFO] Surefire report directory: /Users/atkinsb/GitRepos/infinite-state-machine/target/surefire-reports
  
  -------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running com.github.museadmin.infinite_state_machine.unit.tests.core.TestMessagingFramework
  SLF4J: No SLF4J providers were found.
  SLF4J: Defaulting to no-operation (NOP) logger implementation
  SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
  SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
  SLF4J: Ignoring binding found at [jar:file:/Users/atkinsb/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
  Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.173 sec
  Running com.github.museadmin.infinite_state_machine.unit.tests.core.TestInfiniteStateMachine
  NO ACTIONS IMPORTED
  Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.073 sec
  Running com.github.museadmin.infinite_state_machine.unit.tests.core.TestPropertyCache
  Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
  
  Results :
  
  Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ infinite-state-machine ---
  [INFO] 
  [INFO] --- maven-install-plugin:2.4:install (default-install) @ infinite-state-machine ---
  [INFO] Installing /Users/atkinsb/GitRepos/infinite-state-machine/target/infinite-state-machine-1.1.9.jar to /Users/atkinsb/.m2/repository/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar
  [INFO] Installing /Users/atkinsb/GitRepos/infinite-state-machine/pom.xml to /Users/atkinsb/.m2/repository/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom
  [INFO] 
  [INFO] --- nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) @ infinite-state-machine ---
  [INFO] Performing local staging (local stagingDirectory="/Users/atkinsb/GitRepos/infinite-state-machine/target/nexus-staging/staging")...
  [INFO]  + Using server credentials "ossrh" from Maven settings.
  [INFO]  * Connected to Nexus at https://oss.sonatype.org:443/, is version 2.14.16-01 and edition "Professional"
  [INFO]  * Using staging profile ID "5958335c79f727" (matched by Nexus).
  [INFO] Installing /Users/atkinsb/GitRepos/infinite-state-machine/target/infinite-state-machine-1.1.9.jar to /Users/atkinsb/GitRepos/infinite-state-machine/target/nexus-staging/staging/5958335c79f727/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar
  [INFO] Installing /Users/atkinsb/GitRepos/infinite-state-machine/pom.xml to /Users/atkinsb/GitRepos/infinite-state-machine/target/nexus-staging/staging/5958335c79f727/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom
  [INFO] Performing remote staging...
  [INFO] 
  [INFO]  * Remote staging into staging profile ID "5958335c79f727"
  [INFO]  * Created staging repository with ID "comgithubmuseadmin-1058".
  [INFO]  * Staging repository at https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058
  [INFO]  * Uploading locally staged artifacts to profile com.github.museadmin
  Uploading: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar
  Uploaded: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar (121 KB at 94.4 KB/sec)
  Uploading: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom
  Uploaded: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom (4 KB at 8.3 KB/sec)
  Downloading: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/maven-metadata.xml
  Uploading: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/maven-metadata.xml
  Uploaded: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubmuseadmin-1058/com/github/museadmin/infinite-state-machine/maven-metadata.xml (322 B at 0.5 KB/sec)
  [INFO]  * Upload of locally staged artifacts finished.
  [INFO]  * Closing staging repository with ID "comgithubmuseadmin-1058".
  
  Waiting for operation to complete...
  ......
  
  [ERROR] Rule failure while trying to close staging repository with ID "comgithubmuseadmin-1058".
  [ERROR] 
  [ERROR] Nexus Staging Rules Failure Report
  [ERROR] ==================================
  [ERROR] 
  [ERROR] Repository "comgithubmuseadmin-1058" failures
  [ERROR]   Rule "javadoc-staging" failures
  [ERROR]     * Missing: no javadoc jar found in folder '/com/github/museadmin/infinite-state-machine/1.1.9'
  [ERROR]   Rule "sources-staging" failures
  [ERROR]     * Missing: no sources jar found in folder '/com/github/museadmin/infinite-state-machine/1.1.9'
  [ERROR]   Rule "signature-staging" failures
  [ERROR]     * Missing Signature: '/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.jar.asc' does not exist for 'infinite-state-machine-1.1.9.jar'.
  [ERROR]     * Missing Signature: '/com/github/museadmin/infinite-state-machine/1.1.9/infinite-state-machine-1.1.9.pom.asc' does not exist for 'infinite-state-machine-1.1.9.pom'.
  [ERROR] 
  [ERROR] 
  [ERROR] Cleaning up local stage directory after a Rule failure during close of staging repositories: [comgithubmuseadmin-1058]
  [ERROR]  * Deleting context 5958335c79f727.properties
  [ERROR] Cleaning up remote stage repositories after a Rule failure during close of staging repositories: [comgithubmuseadmin-1058]
  [ERROR]  * Dropping failed staging repository with ID "comgithubmuseadmin-1058" (Rule failure during close of staging repositories: [comgithubmuseadmin-1058]).
  
  Waiting for operation to complete...
  ...
  
  [ERROR] Remote staging finished with a failure: Staging rules failure!
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 55.331 s
  [INFO] Finished at: 2020-04-03T19:12:13+01:00
  [INFO] Final Memory: 31M/340M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project infinite-state-machine: Remote staging failed: Staging rules failure! -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  
  </code></pre>
  
  <p>By the way, I've just deleted the project under my .m2 directory ad done another <code>man install</code> and <code>man javadoc:jar</code> but the javadoc jar hasn't been replaced there.</p>