Я установил версию sonarqube: sonarqube-10.7.0.96327
Я установил jdk:
Код: Выделить всё
java 17.0.12 2024-07-16 LTS
Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.12+8-LTS-286, mixed mode, sharing)
Код: Выделить всё
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\apache-maven-3.9.9
Java version: 17.0.12, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17
Default locale: en_IN, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Код: Выделить всё
Version: 2024-09 (4.33.0)
Build id: 20240905-0614
Вот мой код pom.xml
Код: Выделить всё
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">
4.0.0
com.example
sonarqube-custom-plugin
1.0-SNAPSHOT
jar
SonarQube Custom Plugin
http://maven.apache.org
10.7.0
17
17
org.sonarsource.sonarqube
sonar-api
10.7.0
org.sonarsource.sonarqube
sonar-plugin-api
10.7.0
org.slf4j
slf4j-api
1.7.32
org.sonarsource.scanner.maven
sonar-maven-plugin
3.9.0.2155
org.slf4j
slf4j-simple
1.7.32
junit
junit
4.13.2
test
org.apache.maven.plugins
maven-compiler-plugin
3.10.1
${maven.compiler.source}
${maven.compiler.target}
org.apache.maven.plugins
maven-jar-plugin
3.2.0
com.example.JilDescriptionCheckPlugin
sonarqube
https://repo.sonarsource.org/content/repositories/sonar-public/
Код: Выделить всё
central
XXXXXX
XXXXXX
central
central
https://repo.maven.apache.org/maven2
false
example-proxy
true
http
proxy.example.com
8080
proxyuser
somepassword
www.google.com|*.example.com
Код: Выделить всё
[INFO] Scanning for projects...
[INFO]
[INFO] [1m----------------< [0;36mcom.example:sonarqube-custom-plugin[0;1m >-----------------[m
[INFO] [1mBuilding SonarQube Custom Plugin 1.0-SNAPSHOT[m
[INFO] from pom.xml
[INFO] [1m--------------------------------[ jar ]---------------------------------[m
[INFO] Downloading from sonarqube: https://repo.sonarsource.org/content/repositories/sonar-public/org/sonarsource/sonarqube/sonar-api/10.7.0/sonar-api-10.7.0.pom
[INFO] Downloading from sonarqube: https://repo.sonarsource.org/content/repositories/sonar-public/org/sonarsource/sonarqube/sonar-plugin-api/10.7.0/sonar-plugin-api-10.7.0.pom
[INFO] [1m------------------------------------------------------------------------[m
[INFO] [1;31mBUILD FAILURE[m
[INFO] [1m------------------------------------------------------------------------[m
[INFO] Total time: 2.081 s
[INFO] Finished at: 2024-12-04T17:42:56+05:30
[INFO] [1m------------------------------------------------------------------------[m
[ERROR] Failed to execute goal on project [36msonarqube-custom-plugin[m: [1;31mCould not collect dependencies for project com.example:sonarqube-custom-plugin:jar:1.0-SNAPSHOT[m
[ERROR] [1;31mFailed to read artifact descriptor for org.sonarsource.sonarqube:sonar-api:jar:10.7.0[m
[ERROR] [1;31m Caused by: The following artifacts could not be resolved: org.sonarsource.sonarqube:sonar-api:pom:10.7.0 (absent): Could not transfer artifact org.sonarsource.sonarqube:sonar-api:pom:10.7.0 from/to sonarqube (https://repo.sonarsource.org/content/repositories/sonar-public/): No such host is known (proxy.example.com)[m
[ERROR] [1;31mFailed to read artifact descriptor for org.sonarsource.sonarqube:sonar-plugin-api:jar:10.7.0[m
[ERROR] [1;31m Caused by: The following artifacts could not be resolved: org.sonarsource.sonarqube:sonar-plugin-api:pom:10.7.0 (absent): Could not transfer artifact org.sonarsource.sonarqube:sonar-plugin-api:pom:10.7.0 from/to sonarqube (https://repo.sonarsource.org/content/repositories/sonar-public/): proxy.example.com[m
[ERROR] [1;31m[m
[ERROR] -> [1m[Help 1][m
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Ошибка
Подробнее здесь: https://stackoverflow.com/questions/792 ... e-resolved
Мобильная версия