Java Gitlab Maven包注册表。安装具有工件依赖关系的包

Java Gitlab Maven包注册表。安装具有工件依赖关系的包,java,maven,gitlab,Java,Maven,Gitlab,我需要使用Maven存储库连接Gitlab中的包注册表。我做的每件事都是根据:。我对“安装软件包”有问题 我在pom.xml中添加了依赖项,然后尝试安装mvn。但我有一个错误。据我所知,Maven应该使用pom.xml中的存储库来搜索我的工件,但事实并非如此 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------

我需要使用Maven存储库连接Gitlab中的包注册表。我做的每件事都是根据:。我对“安装软件包”有问题

我在pom.xml中添加了依赖项,然后尝试安装mvn。但我有一个错误。据我所知,Maven应该使用pom.xml中的存储库来搜索我的工件,但事实并非如此

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.479 s
[INFO] Finished at: 2020-05-28T20:23:59+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin '.upprpo:budget-planner_' from the repositories [local (C:\Users\User\.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]
org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for plugin '.upprpo:budget-planner_' from the repositories [local (C:\Users\User\.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.selectVersion (DefaultPluginVersionResolver.java:236)
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.resolveFromRepository (DefaultPluginVersionResolver.java:146)
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.resolve (DefaultPluginVersionResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.resolvePluginVersion (MojoDescriptorCreator.java:281)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor (MojoDescriptorCreator.java:236)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:104)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:83)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
PS D:\JavaLabs\budget-planner gitlab> mvn dependency:get -Dartifact=nsu.upprpo:budget-planner_:2.0
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] 'dependencies.dependency[nsu.upprpo:budget-planner_:2.0]' for nsu.upprpo:budget-planner_:2.0 is referencing itself. @ line 158, column 21
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project nsu.upprpo:budget-planner_:2.0 (D:\JavaLabs\budget-planner gitlab\pom.xml) has 1 error
[ERROR]     'dependencies.dependency[nsu.upprpo:budget-planner_:2.0]' for nsu.upprpo:budget-planner_:2.0 is referencing itself. @ line 158, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
还有我的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>nsu.upprpo</groupId>
<artifactId>budget-planner_</artifactId>
<version>2.0</version>
<packaging>jar</packaging>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <sonar.host.url>http://84.237.50.237:9000/</sonar.host.url>
    <sonar.login>9508b619882a5709e02a1902a6361249c8e65db6</sonar.login>
    <sonar.jacoco.reportPaths>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPaths>
    <sonar.coverage.exclusions>**/gui/*, **/application/*</sonar.coverage.exclusions>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.5</version>
            <executions>

                <execution>
                    <id>pre-unit-test</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                    <configuration>
                        <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
                        <propertyName>surefireArgLine</propertyName>
                    </configuration>
                </execution>

                <execution>
                    <id>post-unit-test</id>
                    <phase>test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                    <configuration>
                        <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
                        <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                    </configuration>
                </execution>

            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.15</version>
            <configuration>
                <argLine>${surefireArgLine}</argLine>
            </configuration>
        </plugin>

    </plugins>
</build>

<repositories>
    <repository>
        <id>gitlab-maven</id>
        <url>https://gitlab.com/api/v4/projects/19026178/packages/maven</url>
    </repository>
</repositories>

<distributionManagement>
    <repository>
        <id>gitlab-maven</id>
        <url>https://gitlab.com/api/v4/projects/19026178/packages/maven</url>
    </repository>

    <snapshotRepository>
        <id>gitlab-maven</id>
        <url>https://gitlab.com/api/v4/projects/19026178/packages/maven</url>
    </snapshotRepository>
</distributionManagement>

<dependencies>

    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>6.2.3</version>
    </dependency>

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.2.10</version>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.12</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>5.4.14.Final</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate.validator</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>6.1.4.Final</version>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>com.intellij</groupId>
        <artifactId>forms_rt</artifactId>
        <version>7.0.3</version>
    </dependency>

    <dependency>
        <groupId>org.jdatepicker</groupId>
        <artifactId>jdatepicker</artifactId>
        <version>1.3.4</version>
    </dependency>

    <dependency>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.5</version>
    </dependency>

    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>3.3.3</version>
    </dependency>

    <dependency>
        <groupId>nsu.upprpo</groupId>
        <artifactId>budget-planner_</artifactId>
        <version>2.0</version>
    </dependency>

</dependencies>

4.0.0
nsu.uprpo
预算规划师_
2
罐子
UTF-8
http://84.237.50.237:9000/
9508b619882a5709e02a1902a6361249c8e65db6
${project.build.directory}/coverage reports/jacoco.exec
**/gui/*,***/应用程序/*
org.apache.maven.plugins
maven编译器插件
11
11
org.jacoco
jacocomaven插件
0.8.5
单元前测试
配制剂
${project.build.directory}/coverage reports/jacoco.exec
surefireArgLine
单元后测试
测试
报告
${project.build.directory}/coverage reports/jacoco.exec
${project.reporting.outputDirectory}/jacoco-ut
org.apache.maven.plugins
maven surefire插件
2.15
${surefireArgLine}
gitlab maven
https://gitlab.com/api/v4/projects/19026178/packages/maven
gitlab maven
https://gitlab.com/api/v4/projects/19026178/packages/maven
gitlab maven
https://gitlab.com/api/v4/projects/19026178/packages/maven
org.flywaydb
飞道核心
6.2.3
org.postgresql
postgresql
42.2.10
org.projectlombok
龙目
1.18.12
假如
org.hibernate
冬眠核心
5.4.14.4最终版本
org.hibernate.validator
休眠验证器
6.1.4.最终版本
朱尼特
朱尼特
4.12
测试
com.intellij
表格
7.0.3
org.jdatepicker
jdatepicker
1.3.4
org.jacoco
jacocomaven插件
0.8.5
org.mockito
莫基托磁芯
3.3.3
nsu.uprpo
预算规划师_
2


我找到了我应该使用Artifactory或类似工具的信息,但我不想使用它。

插件是什么。upprpo:budget-planner\uu你正在构建什么?如果是这样,您需要先构建它并将其放入项目的存储库中。我发现您的项目仍在寻找对
https://repo.maven.apache.org/maven2

如果您没有构建外部依赖项,请检查名称的拼写,以及名称是否在主Maven存储库中