I would like to create company local maven repository using nexus. Repository should not download anything from public internet, everything needed is added to repo. Developer's local maven instanses should download needed libraries and tools from company nexus. I have managed to do this by using mirror like this in settings.xml:
<mirror>
<id>company-repository</id>
<name>Company releases repository</name>
<url>http://nexus.company.com/nexus/content/repositories/releases</url>
<mirrorOf>*</mirrorOf>
</mirror>
Problem with this solution is that I am only able to point to releases repository, I would like to include thirdparty and snapshot repository to search as well. Has anyone any idea how that should be done? Mirror tag takes only one url.
I also tried with defining default profile like this:
<profile>
<id>defaultProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>company-thirdparty-repo</id>
<url>http://nexus.company.com//nexus/content/repositories/thirdparty</url>
<releases>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>company-releases-repo</id>
<url>http://nexus.company.com/nexus/content/repositories/releases</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://nexus.company.com/nexus/content/repositories/central</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
Problem with that solution is that if Maven don't find something from those repositories it still downloads it from repo.maven.apache.org. I will appreciate any help. Thanks!