Maven wagon-ftp configuration

 

1) 使用ftp配置

<distributionManagement>   
<repository>   
<id>proficio-repository</id>   
<name>Proficio Repository</name>   
<url>ftp://ftpserver.yourcompany.com/deploy</url>   
</repository>   
</distributionManagement>   
<build>   
<extensions>   
<extension>   
<groupId>org.apache.maven.wagon</groupId>   
<artifactId>wagon-ftp</artifactId>   
<version>1.0-alpha-6</version>   
</extension>   
</extensions>   
</build> 
 

 


2) 在setting.xml中,的servers节点中加入server节点,id用来表示这个server,deploy时用到:

 

 

 <server>
        <id>archiva.snapshots</id>
        <username>archiva.gehouse</username>
        <password>pass123</password>
    </server>

 
3) 在项目的pom.xml中加入distributionManagement节点,id对于setting.xml中的server中的id:

 

 

 <distributionManagement>
        <snapshotRepository>
            <id>archiva.snapshots</id>
            <name>Internal Snapshot Repository</name>
            <url>dav:http://archiva.gehouse.cn/repository/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
 

你可能感兴趣的:(configuration)