Could not resolve all dependencies for configuration ':app:endpointsServer'. why? - java

After updating to Gradle 7.3.0 I having this message error :
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven4(http://dl.bintray.com/glomadrian/maven)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/8.0-milestone-1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactReposit... for more details
any suggestions?

so what solve it ,it's just adding -4- to Maven , something like Maven4 instead of just Maven in the app build Gradle Mavens declarations.

Related

My Springboot Dependency can't be found for some reason

So I'm using Intellij and I am connecting to the internet via a proxy server. For some reason on my regular computer connected via wireless router it all works out but this one isn't working. I tried reloading the maven project, but to no avail.
For some reason pom.xml can't find my dependencies, and that's probably why.
This is the pom.xml: Top of pom.xml
Bottom of pom.xml
This is the problems tab in the console: Here
If you are using IntelliJ's embedded Maven, configure your proxy as per this [link]1.
You can copy the default settings.xml file from Maven install ${maven.home}/conf/settings.xml to ${user.home}/.m2/settings.xml.
Then, add a proxy section to your settings file as in explained in this guide.
Also, check with your company's infrastructure responsible that you are actually allowed to connect to Maven Central, for example at my current company we have a well-known brand firewall that, by default, blocks it.

Maven dependencies fail to download

I am working in a corporate network.
I can't download artifacts through maven, but I can download them individually through my web browser.
This is the error:
[ERROR] Non-resolvable import POM: Could not transfer artifact com.fasterxml.jackson:jackson-bom:pom:2.9.8 from/to central (https://repo1.maven.org/maven2): Can't connect to SOCKS proxy:Connection refused: connect # org.springframework.boot:spring-boot-dependencies:2.1.3.RELEASE, C:\Users\alfonso\.m2\repository\org\springframework\boot\spring-boot-dependencies\2.1.3.RELEASE\spring-boot-dependencies-2.1.3.RELEASE.pom, line 605, column 25
For what I have googled, a lot of people solve this configuring a proxy. I don't understand why I would need that, because as I said, I can download the dependencies trough my web browser.
If configuring a proxy is the only way, any idea as to how to identify my company's proxy?? I've no idea what it is.
Is it supposed to be a "maven proxy" or just a simple proxy? I ask because IT people probably don't know much about java and maven. So if I ask them what is our maven proxy, they may not know what I'm talking about (if it is something at all he he)
Downloading the dependencies through a browser is a nightmare because standard Maven projects need hundreds of artifacts (Maven plugins etc.).
The proxy is not a "Maven proxy", but a company thing. You need to find out which proxy allows access to MavenCentral. If you don't have such proxy, you need to discuss a solution like e.g. setting up your own Nexus/Artifactory and giving it access to MavenCentral.

Gradle Build Error: Failed to appy plugin[class 'org.gradle.api.plugins.JavaPlugin

Gradle Build fails with the above error. I am going thru firewall and proxy server settings. I do have local nexus repository hosted in the company network.
The module which is failing uses free marker templates and bundles them into a deployable jar. I suspect I am not including the java plugin in the repository.
Gradle plugin resolution uses a different configuration than dependency resolution.
You most likely need to customise it as well. The exact details will depend on your setup and constraints.
See the relevant documentation

Uploading local maven repository to archiva

I am setting up a local repository using Apache Archiva. After setting up now I need to copy the libraries that got downloaded into my local maven repository into archiva. Currently I am manually copying it but it is very tedious process and I am planning to automate it using some scripts. Is there any better approach to do this?
I'm trying to write a plugin for this here which is able to copy jars and poms for all dependencies in all Configurations (including transitive dependencies). You might be interested in this code
Note: I've got a failing test here because I can't currently get the parent pom xml via the Gradle API's. I raised a feature request in Gradle here
There's a suggestion on the issue to use the IvyPot plugin... I haven't tried this myself but might be worth a shot.

Connection Refused on maven compile

I'm getting an exception (java.net.ConnectException: Connection refused: connect.) when trying to compile a maven project using the jaxb2 plugin to generate the class by a wsdl provided by a url.
However, I can get this wsdl when get it by a browser.
Any ideas?
Thanks.
While you might be able to resolve the connection issues given the comments above, the error message shows a fundamental problem in your build. If your maven build downloads the WSDL each time it compiles, you don't have repeatable builds, as the WSDL can change each time it's accessed. While it might be convenient to alway load the latest WSDL, I'd recommend downloading the WSDL and add it to your src tree. Then your build will not break, if the WSDL changes. You need to take take, however, to manually update the WSDL if you want to support a newer version.
The instructions on how to setup a proxy in jaxb2: https://github.com/highsource/maven-jaxb2-plugin/wiki/Configuring-Proxies/c32d4e2af4ab9c1fd5b3d67fb559ec32affab745
I just put <useActiveProxyAsHttpproxy>true</useActiveProxyAsHttpproxy> in my configuration tag of plugin.
Also, I prev set the proxy on my maven settings.xml
I had the same error in a java project built with maven and. On compilation the plugin tries to get some sources on the net and my company had set up a proxy. So you have to configure correctly your settings.xml and add
<useActiveProxyAsHttpproxy>true</useActiveProxyAsHttpproxy>
to the configuration tag of the plugin causing the error in the pom.xml

Categories