With a lot of people working from home currently and using VPNs, I am having an issue with building on maven for personal projects that don't use work related artefacts.
Which results in me always needing to be connected to the VPN.
For example if I create a new spring boot application, it requires me to be on the VPN otherwise it won't be able to build properly, with an error like this:
Failed to read artifact descriptor for com.hubspot.slack:slack-base:jar:1.8: Could not transfer artifact com.hubspot.slack:slack-base:pom:1.8 from/to at-repository (https://foobar.jfrog.io/foobar/public): Access denied to: https://foobar.jfrog.io/foobar/public/com/hubspot/slack/slack-base/1.8/slack-base-1.8.pom
Is there a way for me to configure maven to try and build without the need for my company repository?
Or can I have multiple configs and a way to switch between them?
I understand it should fail for foocompany
specific artefacts but not everything else.
This is the config.xml (redacted name)
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>foo-repository</id>
<url>https://foo.jfrog.io/foo/public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<id>foo-repository</id>
<username>deployment</username>
<password>xxx</password>
</server>
<server>
<id>snapshots</id>
<username>deployment</username>
<password>xxx</password>
</server>
<server>
<id>releases</id>
<username>deployment</username>
<password>xxx</password>
</server>
</servers>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>foo-repository</id>
<url>This has to be populated but the URL will be taken from the mirror.</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>foo-repository</id>
<url>This has to be populated but the URL will be taken from the mirror.</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>