by ampatspell
in Code
Interwebs are filled with information how to install files in local maven repository — just type mvn install:install-file, add few parameters and done. But it took some time for me to find information how to publish (actually to deploy) file in own repository. So here it is:
mvn deploy:deploy-file \ -Durl=scp://user@server.com/path/to/repository -Dfile=gwt-user.jar \ -DgroupId=com.google.webtoolkit \ -DartifactId=gwt-user \ -Dversion=2.0.0-ms2 \ -Dpackaging=jar \ -DgeneratePom=true
Just add repository in pom.xml:
<?xml version="1.0" encoding="UTF-8"?> <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <repositories> <repository> <id>amateurinmotion</id> <name>amateurinmotion m2 repository</name> <url>http://www.amateurinmotion.com/repository</url> </repository> </repositories> </project>