-
-
Save pedrotoliveira/fb4b19e076981d34c2d7feb87f0a3485 to your computer and use it in GitHub Desktop.
Adds a settings.xml file to your Spring Boot maven wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369 | |
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script | |
cd .mvn/wrapper | |
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml | |
cd ../../ | |
./mvnw clean install -s .mvn/wrapper/settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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>securecentral</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<!--Override the repository (and pluginRepository) "central" from the | |
Maven Super POM --> | |
<repositories> | |
<repository> | |
<id>central</id> | |
<url>https://repo1.maven.org/maven2</url> | |
<releases> | |
<enabled>true</enabled> | |
</releases> | |
</repository> | |
</repositories> | |
<pluginRepositories> | |
<pluginRepository> | |
<id>central</id> | |
<url>https://repo1.maven.org/maven2</url> | |
<releases> | |
<enabled>true</enabled> | |
</releases> | |
</pluginRepository> | |
</pluginRepositories> | |
</profile> | |
</profiles> | |
</settings> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment