maven deploy: The packaging for this project did not assign a file to the build artifact

You need to run mvn deploy instead of mvn deploy:deploy. The former executes the maven lifecycle up to the "deploy" phase, i.e. it compiles your code, packages it into a JAR file and finally deploys it to your remote repository.

mvn deploy:deploy on the other hand does only execute the deploy goal of the maven-deploy-plugin. Without the context of the previously executed lifecycle phases, which produce your actual build artifact (the JAR file), the maven-deploy-plugin does not have anything to deploy and aborts with the error The packaging for this project did not assign a file to the build artifact. This behavior is also explained in the FAQ of the maven-deploy-plugin.

Tags:

Maven