Skip to content

Instantly share code, notes, and snippets.

@fliedonion
Created January 17, 2022 16:36
Show Gist options
  • Save fliedonion/5337af9fd06505f3390eedd1930c4d5f to your computer and use it in GitHub Desktop.
Save fliedonion/5337af9fd06505f3390eedd1930c4d5f to your computer and use it in GitHub Desktop.
Maven settings.xml example to configure Local directory / Network directory as Repository.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>my-local-repo</id>
<repositories>
<repository>
<id>network-drive-repo</id>
<name>Test Local Repository</name>
<!-- copy %USERPROFILE%\.m2\repository as following directory -->
<!-- network drive 4 slashes -->
<url>file:////vmware-host/Shared%20Folders/vmshare/m2-works/repository</url>
</repository>
<repository>
<id>local-filesystem-repository</id>
<name>Test Local Repository</name>
<!-- local drive 3 slashes -->
<url>file:///C:/opt/filesystem_m2/repositorynone</url>
</repository>
</repositories>
<pluginRepositories>
<!-- don't forget plugin repository -->
<pluginRepository>
<id>central</id>
<url>file:////vmware-host/Shared%20Folders/vmshare/m2-works/repository</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>my-local-repo</activeProfile>
</activeProfiles>
</settings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment