I am setting up a CI system with repository archive, based on apache Archiva. Among various techniques for deploying file there, the most promising one seems to be using maven (as opposed to REST api that would require too much curl
calls and Web interface that is not for automation).
It seems that for deploying artifact, such as zip archives of build artifacts, in maven there is a following plugin: deploy:deploy-file. However an attempt to simply invoke that command gave me no results.
I did not work with maven before; currently our builds are done by invoking cmake
on source directory, then make
from shell script. What do i need to add and have to be able to use maven for deploying the resulting artefact?
Is it necessary to create a pom file? If so, what steps do i need to add?
You can use deploy:deploy-file
to upload these artifacts, and by default it will generate a POM for you. What you will need is to:
settings.xml
file, with a <server>
element that contains the credentials for deploying to Archiva over HTTPThere's a bit more information here: http://maven.apache.org/plugins/maven-deploy-plugin/usage.html. If you are generating the POM, then you will need to supply the groupId
(distinct grouping of artifacts), artifactId
(filename without version), version
(artifact version), and packaging
(typically extension, such as zip
) parameters along with the required ones of repositoryId
, url
and file
.
However, it's not required to use Maven, or the REST API - you can also just use a simple HTTP PUT call:
curl -T artifact.zip http://localhost:8080/archiva/repository/my-releases/group/artifact/version/artifact-version.zip
You may also use scp, ftp, etc. to place the file directly in the Archiva filesystem. Note that in that case, you'll have to wait for Archiva's scheduled scan to pick it up.