------ Guide to deploying 3rd party JARs to remote repository ------ Allan Ramirez ------ 2006-02-22 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Guide to deploying 3rd party JARs to remote repository Same concept of the {{{./guide-3rd-party-jars-local.html}install:install-file}} goal of the maven-install-plugin where the 3rd party JAR is installed in the local repository. But this time instead to local repository the JAR will be install both in the local and remote repository. To deploy a 3rd party JAR use the deploy:deploy-file goal under maven-deploy-plugin. First, the wagon-provider(wagon-ftp, wagon-file, etc..) must be placed to your %M2_HOME%/lib. Then execute the command: +----+ mvn deploy:deploy-file -DgroupId= \ -DartifactId= \ -Dversion= \ -Dpackaging= \ -Dfile= \ -DrepositoryId= \ -Durl= +----+ * Deploying a 3rd party JAR with a generic POM By default, deploy:deploy-file generates a generic POM(.pom) to be deploy together with the 3rd party JAR. To disable this feature we should set the <<>> argument to false. +----+ -DgeneratePom=false +----+ * Deploying a 3rd party JAR with a customized POM If a POM is already existing for the 3rd Party JAR and you want to deploy it together with the JAR we should use the <<>> argument of the deploy-file goal. See sample below. +----+ mvn deploy:deploy-file -DpomFile= \ -Dfile= \ -DrepositoryId= \ -Durl= +----+ Note that <<>>, <<>>, <<>> and <<>> arguments are not included here because deploy-file goal will get these information from the given POM. * Deploying Source Jars To deploy a 3rd party source jar, packaging should be set to <<>>, and generatePom should be set to <<>>.