Я уже пробовал некоторые конфигурации, чтобы исправить несколько ошибок, эта конфигурация в настоящее время является лучшей, но в ней есть одна ошибка, которую я не могу исправить.
настройки. xml
<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">
<servers>
<server>
<id>aqualix-repo</id>
<username>${env.MAVEN_REPO_USER}</username>
<password>${env.MAVEN_REPO_PASS}</password>
</server>
</servers>
</settings>
.gitlab-ci.yml
image: maven:latest
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
deploy:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS deploy
only:
- master
пом. 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>de.aqualix.network</groupId>
<artifactId>cloudsystem</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<modules>
<module>cloud-common</module>
<module>cloud-core</module>
<module>cloud-core-api</module>
<module>cloud-proxy</module>
<module>cloud-server</module>
<module>cloud-server-api</module>
<module>cloud-wrapper</module>
</modules>
<properties>
<project.java.version>13</project.java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<dependency.netty.version>4.1.43.Final</dependency.netty.version>
<dependency.guava.version>28.1-jre</dependency.guava.version>
<dependency.gson.version>2.7</dependency.gson.version>
<dependency.json-simple.version>1.1.1</dependency.json-simple.version>
<dependency.typesafe-config.version>1.4.0</dependency.typesafe-config.version>
<dependency.mongodb.version>3.11.2</dependency.mongodb.version>
</properties>
<repositories>
<repository>
<id>aqualix-repo</id>
<url>https://repo.aqualix.de/repository/aqualix-repo/</url>
</repository>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>aqualix-repo</id>
<url>https://repo.aqualix.de/repository/aqualix-repo/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${project.java.version}</source>
<target>${project.java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
пом. 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">
<parent>
<artifactId>cloudsystem</artifactId>
<groupId>de.aqualix.network</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-common</artifactId>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${dependency.guava.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>${dependency.typesafe-config.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.aqualix.network</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
ошибка
[ERROR] Failed to execute goal on project cloud-common: Could not resolve dependencies for project de.aqualix.network:cloud-common:jar:1.0.0: Failed to collect dependencies at de.aqualix.network:annotations:jar:1.0.0: Failed to read artifact descriptor for de.aqualix.network:annotations:jar:1.0.0: Could not transfer artifact de.aqualix.network:annotations:pom:1.0.0 from/to aqualix-repo (https://repo.aqualix.de/repository/aqualix-repo/): Transfer failed for https://repo.aqualix.de/repository/aqualix-repo/de/aqualix/network/annotations/1.0.0/annotations-1.0.0.pom: Connect to repo.aqualix.de:443 [repo.aqualix.de/45.95.52.78] failed: Connection timed out -> [Help 1]
Ошибка в том, что некоторые зависимости не могут быть загружены из-за ошибки авторизации в хранилище.