Gradle build failures - 10.5.0

5
I am seeing the below error in Mendix Studio 10.5.0.  This happens when downloading Community Commons or Encryption Modules.   FAILURE: Build failed with an exception. * What went wrong:A problem occurred configuring root project 'temp'.> Could not resolve all files for configuration ':classpath'.   > Could not resolve org.cyclonedx:cyclonedx-core-java:8.0.3.     Required by:         project : > org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:1.8.1 > org.cyclonedx:cyclonedx-gradle-plugin:1.8.1      > Could not resolve org.cyclonedx:cyclonedx-core-java:8.0.3.         > Could not get resource 'https://plugins.gradle.org/m2/org/cyclonedx/cyclonedx-core-java/8.0.3/cyclonedx-core-java-8.0.3.pom'.            > Could not GET 'https://jcenter.bintray.com/org/cyclonedx/cyclonedx-core-java/8.0.3/cyclonedx-core-java-8.0.3.pom'.               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   > Could not resolve commons-codec:commons-codec:1.16.0.     Required by:         project : > org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:1.8.1 > org.cyclonedx:cyclonedx-gradle-plugin:1.8.1      > Could not resolve commons-codec:commons-codec:1.16.0.         > Could not get resource 'https://plugins.gradle.org/m2/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.pom'.            > Could not HEAD 'https://jcenter.bintray.com/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.pom'.               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   > Could not resolve commons-io:commons-io:2.15.0.     Required by:         project : > org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:1.8.1 > org.cyclonedx:cyclonedx-gradle-plugin:1.8.1      > Could not resolve commons-io:commons-io:2.15.0.         > Could not get resource 'https://plugins.gradle.org/m2/commons-io/commons-io/2.15.0/commons-io-2.15.0.pom'.            > Could not GET 'https://jcenter.bintray.com/commons-io/commons-io/2.15.0/commons-io-2.15.0.pom'.               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   > Could not resolve org.apache.maven:maven-core:3.9.5.     Required by:         project : > org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:1.8.1 > org.cyclonedx:cyclonedx-gradle-plugin:1.8.1      > Could not resolve org.apache.maven:maven-core:3.9.5.         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/maven/maven-core/3.9.5/maven-core-3.9.5.pom'.            > Could not GET 'https://jcenter.bintray.com/org/apache/maven/maven-core/3.9.5/maven-core-3.9.5.pom'.               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target * Try:> Run with --stacktrace option to get the stack trace.> Run with --info or --debug option to get more log output.> Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1s
asked
2 answers
5

Hi Ethan, as mentioned by other people in the comments, this error happens depending on how the Proxy is configured in your Network. Some Gradle Repositories could be blocked. (In your case, jcenter seems like the problem).

 

To try and solve this issue you need to open Studio Pro, go to Edit > Preferences:

image.png

 

And then in the Deployment tab, look what you already have configured at the bottom on Use custom repositories (please comment what settings you have):

image.png

 

By default (when you set this property to No), Mendix uses the following two repositories (for my coallegue it seemed like the first one was being blocked, in your case it may be different):

image.png

 

Something you can try :

  1. Set use custom repositories to Yes.
  2. Leave the default values as it is.
  3. Try to run the project and if the error still shows up, try restarting Studio Pro.
  4. If that still doesn't work, set use custom repositories to No.
  5. Restart Studio Pro, and next time you run your project it should work.

 

If that method doesn't work, try these Gradle repos (one by one) with use custom repositories set to Yes:

gradlePluginPortal()
mavenCentral()
jcenter()
google()

 

In my case I receive the error with the last 2 repos (they are probably blocked in my network).

 

I hope that helps you fix your issue, best regards!

answered
1

Hey Ethan, not sure, but you can give a short to this method, first remove community commons and encryption module from your project (go to userlib folder and delete all it's libraries as well ), then reinstall them from marketplace.

answered