LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mvn-deploy

uploads artifacts to remote repository

TLDR

Deploy to repository
$ mvn deploy
copy
Deploy specific file
$ mvn deploy:deploy-file -Dfile=[file.jar] -DgroupId=[com.example] -DartifactId=[my-lib] -Dversion=[1.0] -Durl=[repo-url] -DrepositoryId=[repo-id]
copy
Deploy with specific profile
$ mvn deploy -P [profile-name]
copy
Skip tests and deploy
$ mvn deploy -DskipTests
copy
Deploy to an alternate repository
$ mvn deploy -DaltDeploymentRepository=[id::url]
copy
Deploy single module
$ mvn deploy -pl [module-name]
copy

SYNOPSIS

mvn deploy [options]

DESCRIPTION

mvn deploy uploads artifacts to remote repository. It's the final Maven lifecycle phase.The goal publishes built artifacts. Requires repository configuration in settings.xml.

PARAMETERS

-Dfile JAR

File to deploy.
-DrepositoryId ID
Repository identifier.
-Durl URL
Repository URL.
-DgroupId GROUP
Group ID for deploy-file goal.
-DartifactId ARTIFACT
Artifact ID for deploy-file goal.
-Dversion VERSION
Version for deploy-file goal.
-DaltDeploymentRepository id::url
Alternative repository for deployment (format: id::url).
-DskipTests
Skip running tests during the build.
-P PROFILE
Activate profile.
-pl MODULE
Build specific module.

CAVEATS

Requires repository access. Credentials in settings.xml. Network operation.

HISTORY

The deploy goal is part of Apache Maven's build lifecycle for artifact distribution.

SEE ALSO

Copied to clipboard
Kai