I have a mirror in settings.xml and pom.xml like this
settings.xml
<?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">
<localRepository>${user.home}/.m2/repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>nexus-release</id>
<username>username</username>
<password>password</password>
</server>
<server>
<id>nexus-snapshot</id>
<username>username</username>
<password>password</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus-any</id>
<mirrorOf>central</mirrorOf>
<name>Nexus any</name>
<url>http://anyHost:2227/repository/maven-public</url>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
pom.xml
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.my.projecy</groupId>
<artifactId>my-project</artifactId>
<packaging>pom</packaging>
<version>1.3.0</version>
<modules>
<module>my-project-pool</module>
<module>my-project-business</module>
<module>my-project-web-deploy</module>
<module>my-project-task-deploy</module>
<module>my-project-stats</module>
<module>my-project-bizlog</module>
</modules>
<name>my-project</name>
<description>Educational Administration Offline System</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<mybatis.version>1.3.2</mybatis.version>
<httpClient.version>4.5.5</httpClient.version>
<maven.plugins.jar.version>3.1.0</maven.plugins.jar.version>
<maven.plugins.assembly.version>3.1.0</maven.plugins.assembly.version>
<offline.api.version>1.3.1-SNAPSHOT</offline.api.version>
<online.api.version>1.3.0-SNAPSHOT</online.api.version>
<starter.httpclient.version>1.0.0-SNAPSHOT</starter.httpclient.version>
<lombok.version>1.16.2</lombok.version>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.my.projecy.starter</groupId>
<artifactId>httpclient-starter</artifactId>
<version>${starter.httpclient.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>bluesky-common</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>ea-api-online</artifactId>
<version>${online.api.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpClient.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-pool</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-business</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-web-deploy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-task-deploy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>ea-api-offline</artifactId>
<version>${offline.api.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-stats</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.my.projecy</groupId>
<artifactId>my-project-bizlog</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.plugins.assembly.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
But when I try to compile my project, I get this error:
Could not find artifact com.my.package:httpclient-starter:jar:1.0.0-SNAPSHOT
in spring-snapshot (https://repo.spring.io/snapshot)
- I tried to delete all folders under local repo or
mvn clean compile -U - I tried grep "repo.spring.io" with settings.xml and pom.xml and got nothing
- Only use single repo works for me.
Like this:
<mirror>
<id>my-id</id>
<mirrorOf>*</mirrorOf>
<name>any name</name>
<url>http://anyHost:2227/repository/maven-public</url>
</mirror>
How can I know why maven downloads this dependency from spring repo?

