Deploying Single Files with Maven
In order to deploy single files that are not controlled by Maven, you need the deploy:deploy-file goal.
# mvn -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version -DrepositoryId=repositoryId -Dsources=source.jar -Durl=scpexe://host/path deploy:deploy-file
The repository ID is necessary in case you have authentication information defined for your repository. You might additionally also need the following in your pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0</version>
</extension>
</extensions>
</build>
</project>
To install a file only locally, use:
# mvn install:install-file -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version
To additionally install the sources for a JAR file, use:
# mvn install:install-file -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version -Dclassifier=sources