Could not transfer artifact org.jetbrains.teamcity:configs-dsl-kotlin-parent
I have some strange maven errors when I try to open/use the Kotlin Project generated by TeamCity. I activated the Kotlin VCS Sync on my TeamCity Project and opened it in a freshly installed IntelliJ Community 2020.3.Then Then I let IntelliJ configure the JDK and Kotlin and added some missing properties to the pom:
<properties>
<kotlin.version>1.4.21</kotlin.version>
<teamcity.dsl.version>2020.1</teamcity.dsl.version>
</properties>
After loading I get an error on the Maven Sync Operation and the pom.xml has various errors.
On the project tag:
Could not transfer artifact org.jetbrains.teamcity:configs-dsl-kotlin-parent:pom:1.0-SNAPSHOT from/to teamcity-server (https://teamcity.intranet/app/dsl-plugins-repository): Transfer failed for https://teamcity.intranet/app/dsl-plugins-repository/org/jetbrains/teamcity/configs-dsl-kotlin-parent/1.0-SNAPSHOT/configs-dsl-kotlin-parent-1.0-SNAPSHOT.pom
On the other items:
Project 'org.jetbrains.teamcity:configs-dsl-kotlin-parent:1.0-SNAPSHOT' not found
Plugin 'org.jetbrains.kotlin:kotlin-maven-plugin:1.4.21' not found
Dependency org.jetbrains.teamcity:configs-dsl-kotlin:${teamcity.dsl.version} not found
...
Checking the local maven repository I find this error in the files related to the configs parent:
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Dec 08 10:31:06 CET 2020
https\://download.jetbrains.com/teamcity-repository/.error=
https\://download.jetbrains.com/teamcity-repository/.lastUpdated=1607419866899
https\://teamcity.intranet/app/dsl-plugins-repository/.error=Could not transfer artifact org.jetbrains.teamcity\:configs-dsl-kotlin-parent\:pom\:1.0-SNAPSHOT from/to teamcity-server (https\://teamcity.intranet/app/dsl-plugins-repository)\: Transfer failed for https\://teamcity.intranet/app/dsl-plugins-repository/org/jetbrains/teamcity/configs-dsl-kotlin-parent/1.0-SNAPSHOT/configs-dsl-kotlin-parent-1.0-SNAPSHOT.pom
@default-teamcity-server-https\://teamcity.intranet/app/dsl-plugins-repository/.lastUpdated=1607419866996
What I checked so far:
- I looked at https://teamcity.jetbrains.com/app/dsl-plugins-repository whether the configs-dsl-kotlin-parent package is there but it isn't.
- I checked whether the dsl-plugins repository is reachable and I saw the message that the kotlin DSL repository is on this endpoint.
- I checked URL IntelliJ tries to contact for downloading the pom but it returned an error 404
- I also checked this URL on https://teamcity.jetbrains.com/app/dsl-plugins-repository and it also returned 404.
- I checked on some public Maven Repositories (Maven Central, mvnrepository) to see if one of these has this parent or packages.
My setup:
- IntelliJ is using the bundled Maven 3
- My .m2\settings.xml is empty.
- I enabled the "Use plugin registry" in IntelliJ as a test
- I am using IntelliJ 2020.3 freshly installed
- We are having TeamCity Enterprise 2020.1.4 (build 78906)
I am a bit lost here and would appreciate any help getting this up and running. I assume our own TeamCity DSL repository should provide all these dependencies, plugins and parents but as there is no repository browser there is no way to check anything for me if they are there.
As I could not find any comparable error online I assume it might be something local to my PC or our TeamCity.
Edit/Update: I was able to setup a local environment by using teamcity.jetbrains.com in my pom. The dependencies could be downloaded from this public server, but on our own server it seems to fail. The guys maintaining our TeamCity installation do not really know what could be the root cause of this not working. Is there a way to check what is wrong on our installation? Are there maybe some ports or URLs we could check?
Kind Regards
Daniel
Please sign in to leave a comment.
Hi,
Being able to connect to your TeamCity server (https://teamcity.intranet) over the connector port should be sufficient. Are you sure your TeamCity server is available from the machine on which you run the IDE? Also, it's worth trying to look into the idea.log for more details about the error.
-Anatoly
First of all a Happy New Year.
Sorry for the delayed reply. As I was on holidays I could not follow up on this topic.
"Are you sure your TeamCity server is available from the machine on which you run the IDE"
Yes I am. I can access teamcity via the Browser. I can access teamcity normally and also according to the logs it can be reached as it replies with some "not found" status codes.
The idea with the idea.log was a good one.
The outer exception message is like shown in the UI:
Caused by: java.lang.RuntimeException: org.apache.maven.wagon.TransferFailedException: Transfer failed for https://teamcity.intranet/app/dsl-plugins-repository/org/jetbrains/teamcity/configs-dsl-kotlin-parent/1.0-SNAPSHOT/configs-dsl-kotlin-parent-1.0-SNAPSHOT.pom
But the inner one is actually the root cause:
Caused by: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
We have an own company internal CA and "teamcity.intranet" is having a TLS certificate from this custom CA. The CA is trusted on the local machine and Chrome shows the URL as green. I have the feeling that the JRE does not respect custom CAs imported into the Windows Certificate Store. I manually exported the root CA to a file and imported it to the keystore at "C:\Users\{username}\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\{version}\jbr\lib\security\cacerts"
And bingo: it works.
But of course this is only an intermediate solution and it would be nice if IntelliJ IDEA could trust the custom root CA from the windows store. The certificates might change and on every update via toolbox I get a new version folder. But I guess this is more something for the IntelliJ support channel and not TeamCity.
Thanks for the support.