PAYARA-1395 Allow full server to deploy applications from a maven repository and URLs #1446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a new asadmin command,
deploy-remote-archive
, that allows you to deploy an artefact from a URL, or by providing comma separated GAV (GroupId, ArtefactId, VersionNumber) coordinates and Maven repositories to check and download from (similar to how the feature works in Payara Micro).The new command takes the same parameters as the standard deploy command, with the addition of a new parameter:
--additionalRepositories
.This parameter accepts a comma separated list of URLs that Payara will search for Maven artefacts in (Payara will only check in Maven Central by default).
Command usage for deploying directly from a URL (as in, without GAV conversion):
asadmin deploy-remote-archive url
For example:
asadmin deploy-remote-archive https://raw.github.com/Pandrex247/Payara_PatchedProjects/Payara-Maven-Deployer/fish/payara/testing/clusterjsp/1.1/clusterjsp-1.1.war
If you don't specify a name or context root for the artefact when deploying direct from a URL, it will simply be the file name with the archive type stripped off (in the example above, it would be clusterjsp-1.1).
Command usage for deploying using GAV coordinates:
asadmin deploy-remote-archive --additionalRepositories repo1,repo2,...,repoN groupId,artefactId,VersionNumber
For example:
appserver/distributions/payara/target/stage/payara41/bin/asadmin deploy-remote-archive --additionalRepositories https://google.co.uk,https://raw.github.com/Pandrex247/Payara_PatchedProjects/Payara-Maven-Deployer fish.payara.testing,clusterjsp,1.1
If you don't specify a name or context root for the artefact when deploying using GAV coordinates, it will just be the artefact name (in the example above, it would be clusterjsp).
As of this PR, the command will only deploy from HTTP or HTTPS URLs.
Please note that although the command accepts Maven GAV coordinates, it does not actually make use of Maven, and so artefacts will not be saved into your local maven repository.