Debian Codegraph @

src/site/apt/examples/deploy-ftp.apt

raw
1 ------
2 Deployment of artifacts with FTP
3 ------
4 Jason van Zyl
5 ------
6 2005-10-12
7 ------
8
9 ~~ Licensed to the Apache Software Foundation (ASF) under one
10 ~~ or more contributor license agreements. See the NOTICE file
11 ~~ distributed with this work for additional information
12 ~~ regarding copyright ownership. The ASF licenses this file
13 ~~ to you under the Apache License, Version 2.0 (the
14 ~~ "License"); you may not use this file except in compliance
15 ~~ with the License. You may obtain a copy of the License at
16 ~~
17 ~~ http://www.apache.org/licenses/LICENSE-2.0
18 ~~
19 ~~ Unless required by applicable law or agreed to in writing,
20 ~~ software distributed under the License is distributed on an
21 ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 ~~ KIND, either express or implied. See the License for the
23 ~~ specific language governing permissions and limitations
24 ~~ under the License.
25
26 ~~ NOTE: For help with the syntax of this file, see:
27 ~~ http://maven.apache.org/doxia/references/apt-format.html
28
29 Deployment of artifacts with FTP
30
31 In order to deploy artifacts using FTP you must first specify the use of an FTP server in the
32 <<distributionManagement>> element of your POM as well as specifying an <<<extension>>> in your
33 <<<build>>> element which will pull in the FTP artifacts required to deploy with FTP:
34
35 +----+
36 <project>
37 ...
38 <distributionManagement>
39 <repository>
40 <id>ftp-repository</id>
41 <url>ftp://repository.mycompany.com/repository</url>
42 </repository>
43 </distributionManagement>
44
45 <build>
46 <extensions>
47 <!-- Enabling the use of FTP -->
48 <extension>
49 <groupId>org.apache.maven.wagon</groupId>
50 <artifactId>wagon-ftp</artifactId>
51 <version>1.0-beta-6</version>
52 </extension>
53 </extensions>
54 </build>
55 ...
56 </project>
57 +----+
58
59 Your <<<settings.xml>>> would contain a <<<server>>> element where the <<<id>>> of that element matches <<<id>>> of the
60 FTP repository specified in the POM above:
61
62 +----+
63 <settings>
64 ...
65 <servers>
66 <server>
67 <id>ftp-repository</id>
68 <username>user</username>
69 <password>pass</password>
70 </server>
71 </servers>
72 ...
73 </settings>
74 +----+
75
76 You should, of course, make sure that you can login into the specified FTP server by hand before attempting the
77 deployment with Maven. Once you have verified that everything is setup correctly you can now deploy your artifacts
78 using Maven:
79
80 +----+
81 mvn deploy
82 +----+