You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steinar Bang <sb...@dod.no> on 2020/08/24 19:26:13 UTC

Adding nexus-staging-maven-plugin config broke "mvn deploy" of snapshots

Versions: debian 10.5 "buster", amd64
	  openjdk 11
          maven 3.6.0 (debian) and 3.6.3 (apache binary) (same issue on both versions of maven)

When I introduced a nexus-staging-maven-plugin config into my project's
top pom, "mvn deploy" of snapshots stopped working.

Does anyone know what might cause this?

Is there a way to fix this, short of yanking the
nexus-staging-maven-plugin config from the pom?

Thanks!

Details follows below:

I have this project:
 https://github.com/steinarb/oldalbum

Before releasing to OSSRH I deployed snapshots to my own snapshot
repositories, using "mvn deploy".

However after doing a release of version 1.1.0 the project to OSSRH, I
tried doing "mvn deploy" again, and that failed:
 ...
 [INFO] Jacoco aggregate XML test coverage report .......... FAILURE [  0.785 s]
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time:  46.994 s
 [INFO] Finished at: 2020-08-24T21:00:38+02:00
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project jacoco-coverage-report: Failed to deploy artifacts/metadata: Cannot access sftp://maven.bang.priv.no/repository with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access sftp://maven.bang.priv.no/repository using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
 [ERROR]       role: org.apache.maven.wagon.Wagon
 [ERROR]   roleHint: sftp
 [ERROR] -> [Help 1]

I noticed that the nexus-staging-maven-plugin was involved, so I tried
"mvn deploy:deploy" instead, to explicitly use maven-deploy-plugin, but
that failed in a different way:
 ...
 [INFO] Oldalbum picture archive wrapper ................... SUCCESS [ 17.215 s]
 [INFO] Oldalbum OSGi service definitions .................. FAILURE [  0.048 s]
 [INFO] Oldalbum shiro role adder for test ................. SKIPPED
 [INFO] Oldalbum database schema ........................... SKIPPED
 [INFO] Oldalbum database with dummy data .................. SKIPPED
 [INFO] Oldalbum OSGi service implementations .............. SKIPPED
 [INFO] Oldalbum web whiteboard web context ................ SKIPPED
 [INFO] Oldalbum web whiteboard web API .................... SKIPPED
 [INFO] Oldalbum web frontend .............................. SKIPPED
 [INFO] Oldalbum database for production use ............... SKIPPED
 [INFO] Jacoco aggregate XML test coverage report .......... SKIPPED
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time:  18.776 s
 [INFO] Finished at: 2020-08-24T21:12:19+02:00
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-cli) on project oldalbum.services: The packaging for this project did not assign a file to the build artifact -> [Help 1]

If I create a branch from the last commit before I introduced the
nexus-staging-maven-plugin config, "mvn deploy" works as before:
 https://github.com/steinarb/oldalbum/commit/dcb906a40911e7f36bdbdc7d36d77261dc0a50de

Note: The project that fails in "mvn deploy" isn't a "real" maven
module.

Its sole purpose is to aggregate jacoco code coverage for use by sonar
and coveralls.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org