I'm deploying from a Jenkins job, using the Maven "deploy" target, to an Archiva repository.
Currently I'm not using other targets and I create the pom.xml just in order to pack and deploy the files.
My pom.xml is
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group_continuous</groupId>
<artifactId>MyArtifactId</artifactId>
<version>60-r12345-v0.0.01</version>
<packaging>rar</packaging>
<distributionManagement>
<repository>
<id>repo_continuous</id>
<name>Continuous</name>
<url>http://10.142.255.179:8080/repository/repo_continuous/</url>
</repository>
</distributionManagement>
</project>
In order to have it work I just put all the required files in the folder
target/MyArtifactId-60-r12345-v0.0.01/*
before calling
mvn deploy
I know that I can use for the purpose the command
mvn deploy:deploy-file
And use a plugin to just create the .zip archive but I wonder if there's a way to just add the .zip support in order to have the exact same functionality of the .rar