Introduction
Having configured the DaV repositories and the Archiva webapp,
you now can define a sample project to verify your configuration.
Lets have a Project with "pom" packaging:
<?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> <groupId>com.yourcompany</groupId> <artifactId>company</artifactId> <version>1-SNAPSHOT</version> <packaging>pom</packaging> <name>Company organisation POM</name> <inceptionYear>2006</inceptionYear> <scm> <connection>scm:svn:https://svn/company-organisation/trunk</connection> <developerConnection>scm:svn:https://svn/company-organisation/trunk</developerConnection> <url>scm:svn:https://svn/company-organisation/trunk</url> </scm> <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav</artifactId> <version>1.0-beta-1</version> </extension> </extensions> </build> <distributionManagement> <repository> <id>projects</id> <name>Projects Repository</name> <url>dav:http://maven-project-server.company.com:8080/projects</url> </repository> <snapshotRepository> <id>projects-snapshot</id> <name>Projects Snapshot repository</name> <url>dav:http://maven-project-server.company.com:8080/projects-snapshot</url> </snapshotRepository> </distributionManagement> <profiles> <profile> <id>company-repositories</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>company-central</id> <name>company-central</name> <url>http://maven-project-server.company.com:8080/central/</url> </repository> <repository> <id>company-projects</id> <name>company_projects</name> <url>http://maven-project-server.company.com:8080/projects/</url> </repository> <repository> <id>company-3rd-party</id> <name>company-3rd-party</name> <url>http://fixe/3rd-party/</url> </repository> <repository> <id>company-proxy-central</id> <name>company-proxy-central</name> <url>http://maven-project-server.company.com:8080/proxy/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>company-central</id> <name>company-central</name> <url>http://maven-project-server.company.com:8080/central/</url> </pluginRepository> <pluginRepository> <id>company-projects</id> <name>company-projects</name> <url>http://maven-project-server.company.com:8080/projects/</url> </pluginRepository> <pluginRepository> <id>company-proxy-central</id> <name>company-proxy-central</name> <url>http://maven-project-server.company.com:8080/proxy/</url> </pluginRepository> </pluginRepositories> </profile> <profile> <id>company-snapshot-repository</id> <activation> </activation> <repositories> <repository> <id>company-projects-snapshot</id> <name>company-projects-snapshot</name> <url>http://maven-project-server.company.com:8080/projects-snapshot/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>company-projects-snapshot</id> <name>company-projects-snapshot</name> <url>http://maven-project-server.company.com:8080/projects-snapshot/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> </project>
You should also use the mirror the maven 2 central from your settings.
Here is a sample settings.xml.
<?xml version="1.0" encoding="UTF-8"?> <settings> <mirrors> <mirror> <id>company-proxy</id> <mirrorOf>central</mirrorOf> <name>Company Proxy</name> <url>http://maven-project-server.company.com:8080/central/</url> </mirror> </mirrors> <:settingx
Now run "mvn -e -U clean deploy" and see your archiva mirror of central growing with the Maven artifacts downloaded from your proxy.
You can check the deployment by browsing the Company Snapshot repository
