I am trying to get a sample quarkus gradle project to run on my corporate laptop. And unfortunately plugins.gradle.org is blocked.
So I manually downloaded the two plugin dependencies and set it up in my local c:/m2/repo
The POM which include the plug in jar
<groupId>io.quarkus<groupId>
<artifactId>io.quarkus.gradle.plugin<artifactId>
<version>1.9.2.Final<version>
location : plugins.gradle.org/m2/io/quarkus/io.quarkus.gradle.plugin/1.9.2.Final
and the plug-in jar
<groupId>gradle.plugin.io.quarkus<groupId>
<artifactId>quarkus-gradle-plugin<artifactId>
<version>1.9.2.Final<version>
location: plugins.gradle.org/m2/gradle/plugin/io/quarkus/quarkus-gradle-plugin/1.9.2.Final
And I am getting the following error
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.quarkus:io.quarkus.gradle.plugin:1.9.2.Final')
Searched in the following repositories:
MavenLocal(file:/C:/m2/repo/)
I noticed there are a lot of posts aroung org.gradle namespace, but none of them had proper answers.
Thanks for the help!
Related
I was trying to setup the spring boot open source project in order to contribute it. I was going through the steps in here. I am on the main branch. When I try to run
./gradlew build
I am getting this error
* Where:
Settings file '<my local path>/spring-boot/settings.gradle' line: 26
* What went wrong:
Plugin [id: 'io.spring.ge.conventions', version: '0.0.12'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.spring.ge.conventions:io.spring.ge.conventions.gradle.plugin:0.0.12')
Searched in the following repositories:
MavenRepo
Gradle Central Plugin Repository
maven(https://repo.spring.io/release)
maven2(https://repo.spring.io/snapshot)
settings.gradle contains this at line 26
id "io.spring.ge.conventions" version "0.0.12"
From what I understand in the above log, gradle is trying to search for io.spring.ge.conventions but its not able to find it in those repositories. I haven't used gradle before so I am not sure what the issue is exactly and how to fix it.
These are my system details:
System: Mac(Intel)
java version "17.0.5" 2022-10-18 LTS
Editor: Intellij
I don't have gradle installed separately. I am using the gradle wrapper provided by the project.
Additionally I just commented out that line in settings.gradle and ran the build. It succeeded.
Can anyone help me out on this?
I've been trying to work on this for hours now, but I'm not sure what the problem is specifically. If it helps, I'm doing this in Visual Studio.
Plugin [id: 'fabric-loom', version: '1.0-SNAPSHOT/'] was not found in any of the following sources:
- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/7.5.1/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (could not resolve plugin artifact 'fabric-loom:fabric-loom.gradle.plugin:1.0-SNAPSHOT/')
Searched in the following repositories:
Fabric(https://maven.fabricmc.net/)
MavenRepo
Gradle Central Plugin Repository
I am getting below error while running Gradle build in Unix terminal.
Could not resolve all files for configuration ':imcalmsvc-service:compileClasspath'.
Could not find javax.inject:javax.inject:1.0.
Searched in the following locations:
- https://jcenter.bintray.com/javax/inject/javax.inject/1.0/javax.inject-1.0.pom
- https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1.0/javax.inject-1.0.pom
However, there is no error while doing Eclipse-> Gradle refresh.
The error means the dependency wasn't found in either JCenter or Maven Central. When you are usure about the exact name of dependency or which repositories it is uploaded to, I recommend a search engine like mvnrepository.com. It aggregates metadata from a lot of different Maven repositories and even shows you how to use them in Gradle.
In your case, you can find the javax.inject library here. Notice that the only published version is simply 1 and not 1.0. Change this and it should work.
I have a hosted Sonatype Nexus repository on a local network. It has a Maven group containing a proxy repository for the public Maven repository. In the past this configuration was superb and I encountered few issues.
I recently configured https and ssl on the Nexus repository as Docker would not easily log into insecure Nexus Docker registries during CI/CD processes. I did end up re-configuring the Maven repositories at this point.
Then I updated build.gradle:
repositories {
maven {
credentials {
username "${nexusUsername}"
password "${nexusPassword}"
}
name = 'RepositoryName'
url = "https://${nexusURL}:${nexusPort}/repository/maven-public"
}
}
with the nexus* variables defined in ~/.gradle/gradle.properties:
nexus<Variable>=<value>
I have also added the appropriate certificate to the java jre keystore with the keytool and added the certificate in Idea's settings (File > Settings... : Tools > Server Certificates).
When trying to download dependencies (through the Maven proxy) using Gradle (by clicking "import changes" on the pop-up notification in Intellij Idea) the Build output shows "Could not resolve: <dependency>" for each dependency. This behavior is consistent across all of my projects (even ones that previously were able to resolve dependencies).
I have, under most circumstances, been able to get the dependencies to resolve through Nexus when running a Gradle task (:dependencies, :idea, :build) from the project's build.gradle file from a command line. The resulting downloads are not available to the project in Idea. However, after the dependencies have been resolved once, the artifacts are cached in Nexus's Maven proxy repository allowing Gradle/Idea to correctly resolve all dependencies.
What could be causing Gradle/Idea's failure to resolve artifacts through Nexus's Maven proxy? Is there a way to get Gradle/Idea to correctly resolve dependencies through the Nexus Maven group/proxy?
For now I've just added mavenCentral() to the repository list in build.gradle but I would prefer to only include the Nexus Maven group in the future. Caching resources for 1GB/s download is really nice. I would also like to better understand Gradle/Idea and what is causing this issue.
More information:
Intellij Idea has been reinstalled to version 2018.2.6 Build #IC-182.5107.16 during the process of trying to fix this issue. The old version is lost to history.
Gradle has been updated to version 4.10.2. Previous version was 4.5.1.
I've printed each of the nexus* variables via println to ensure the values were correct.
No configuration of Idea's settings for Gradle (local Gradle distribution, default Gradle wrapper, Gradle 'wrapper' task configuration) managed to resolve dependencies.
Every configuration of deleting at least one of ./.idea, ./.gradle, and ~/.gradle/caches was tried.
Idea is not in offline-mode. Sequences of toggling offline-mode and "Refresh all Gradle projects" did not change the outcome.
I have run an Idea configuration of Gradle's dependencies task with --warning-mode all --debug and compared the log to the output of gradle dependencies --warning-mode all --debug on command line. The logs seem to be producing the same statements (in wildly different orders) until the "Could not resolve:" message appears in the Idea output. I did not find any nearby error messages that would explain the failure. If it would help diagnose the issue I can upload those files.
I have tried setting the repository to point directly at the Nexus Maven proxy instead of the Maven group. This did not allow Gradle/Idea to resolve dependencies.
Should I be using a http/https proxy for Gradle? I don't understand the goal of using a proxy in this context.
I have not done anything with Grail. I don't know what Grail is and suspect I do not currently need it.
OS is Windows 10.
Dependencies are not resolved when using compile or implementation in build.gradle.
Transitive dependencies don't seem to be relevant.
I must not have added the certificate to the correct jre installation. I added it more recently and the issue was resolved.
Also, superstitious notes for anyone else having a similar issue:
I added the certificate (a wildcard certificate) under the alias (using the -alias command line parameter for keytool): *.example.com
I also added it under an alias for the full address: nexus.example.com
I don't know whether either of those had any impact on Idea/Gradles' success in resolving artifacts. I believe it was working before I added the second alias.
I have just started using gradle, and facing same issue in multiple gradle projects. The dependency for 'org.springframework.uaa.client:1.0.1.RELEASE'
is not resolved.
I checked and the repository used, contains the given artifact but still gradle reports an error like below:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.springframework.uaa:org.springframework.uaa.client:1.0.1.RELEASE.
I googled a lot and found similar problems being faced by others, but no particular solution.
Here Gradle Discussion it is discussed that the problem maybe due to the 'relativePath' in the pom, which is not resolved by gradle. And that it might be a problem in the pom, and not with gradle.
But what is the exact solution at the present, or any work around to resolve this issue ?
Note : 1. An issue has been open in reference to the above gradle discussion but it's still marked as un-resolved !!
2. The project I am trying to run are using a gradle wrapper 'gradle-1.0-bin.zip'
EDIT 1
I am trying to run the gormish project from GIT and I have faced same issue in another gradle project for using gorm-stadalone here
The repository used is :
repositories {
mavenCentral()
mavenRepo name: "Grails", url: "http://repo.grails.org/grails/repo/"
}