У меня есть Java API, который я пытаюсь импортировать в Intellij, используя Maven, и вот что я получаю:
Не удается разрешить плагин org.springframework.boot: spring-boot-maven-plugin:
Это мой файл 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>sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>Parent </description>
<modules>
<module>sample-repository-mongo</module>
<module>sample-service</module>
<module>sample-webservice</module>
</modules>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<framework.version>0.0.0</framework.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Module dependencies -->
<dependency>
<groupId>eu.everis.cordis.sample</groupId>
<artifactId>sample-webservice</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>eu.everis.cordis.sample</groupId>
<artifactId>sample-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>eu.everis.cordis.sample</groupId>
<artifactId>sample-repository-mongo</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<!-- Unit Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
</dependencies>
<build>
<!-- <finalName>${warname}</finalName> -->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<outputDirectory>.</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Пока единственная тема о похожей проблеме, которую я мог найти, это этот Я попробовал решение оттуда с последней версией, и это, к сожалению, не помогло.
У меня есть java 8 для структуры проекта, и я попробовал с Maven 3.6.2 и 3.6.1Кроме того, потому что некоторое время назад я смог импортировать его с Maven 3.6.1 на другом ноутбуке.
Я дважды проверил переменные окружения java и maven, и я знаю, что они в порядке.Также я попытался запустить mvn clean install, mvn install, mvn package, mvn validate
и любую другую команду, которую смог найти, но проблема осталась прежней.