Could not find guice-4.2.1-no_aop.jar on a newly initialized quarkus project, not sure why we see this error. Source code is available here - https://pastebin.com/9qaTfb7D
./gradlew build
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'foo-receiver'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find guice-4.2.1-no_aop.jar (com.google.inject:guice:4.2.1).
Searched in the following locations:
file:/Users/user/.m2/repository/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar
* 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
I just ran into this and was able to get past that error by modifying the generated settings.gradle file. I moved mavelLocal() to the end of the list of repositories for pluginManagement.
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
}
plugins {
id "${quarkusPluginId}" version "${quarkusPluginVersion}"
}
}
In my particular use case, I'm trying to create a subproject in a multi-project Gradle build. Not sure if that's related to this or not.
Related
Provision worked fine with WildFly: 16.0.x - 17.0.1.
Upgraded provision.gradle to upgrade to use wildFly 18.0.1.
plugins {
id "org.wildfly.build.provision" version '0.0.11'
}
repositories {
mavenLocal()
mavenCentral()
maven {
name 'jboss-nexus'
url "http://repository.jboss.org/nexus/content/groups/public/"
}
}
provision {
// Optional destination directory:
destinationDir = file("wildfly-as/18.0.1.Final")
configuration = file('wildfly-server-provisioning.xml')
// Define variables which need replacing in the provisioning configuration!
variables['wildfly.version'] = '18.0.1.Final'
variables['hibernate-orm.version'] = '5.3.7.Final'
variables['hibernate-search.version'] = '5.11.0.Final'
variables['hibernate-ogm.version'] = '5.4.1.Final'
}
Causes in:
MacBook-Pro:GoStopHandle NOTiFY$ gradle provision -b provision.gradle
Configure project :
Task :provision FAILED Error fetching WildFly component 'org.picketlink:picketlink-api:::2.5.5.SP12-redhat-00006' from
configured repositories; check your repository configurations to
prevent this problem. Attempting to resolve this by enabling
additional repositories automatically! Adding: [mavenLocal(),
mavenCentral() and
http://repository.jboss.org/nexus/content/groups/public/]
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':provision'.
Could not resolve all dependencies for configuration ':detachedConfiguration67'.
Could not find org.picketlink:picketlink-api:2.5.5.SP12-redhat-00006.
Required by:
project :
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
Deprecated Gradle features were used in this build, making it
incompatible with Gradle 7.0. Use '--warning-mode all' to show the
individual deprecation warnings. See
https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s 1 actionable task: 1 executed
Any suggestions?
Deleted SDK 14 and 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/'.
You need to add http://maven.repository.redhat.com/ga/ as repository.
Gradle 4.6 here. Trying to use markdown-gradle-plugin to convert markdown files into HTML as part of my build. My build.gradle specifies:
plugins {
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'java'
id 'edu.sc.seis.launch4j' version '2.4.6'
id 'org.kordamp.gradle.markdown' version '2.0.0'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
compile(
'ch.qos.logback:logback-classic:1.2.3'
... (all of my dependencies here)
)
}
... rest of my build.gradle here
When I run:
./gradlew clean markdownToHtml
I get:
$ ./gradlew clean markdownToHtml
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/myuser/workspace/myapp/build.gradle' line: 14
* What went wrong:
An exception occurred applying plugin request [id: 'org.kordamp.gradle.markdown', version: '2.0.0']
> Failed to apply plugin [id 'org.kordamp.gradle.markdown']
> Could not find method register() for arguments [markdownToHtml, class org.kordamp.gradle.plugin.markdown.tasks.MarkdownToHtmlTask, org.kordamp.gradle.plugin.markdown.MarkdownPlugin$1#3b46a8ba] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
* 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
I can verify that I do see the 2.0.0 version of the plugin on the Gradle plugin portal.
Can anybody spot where I'm going awry?
According to the kordmap plugins website:
Java 8 and Gradle 5 are the minimum requirements to use any of these
plugins.
So your version of gradle needs an upgrade.
The error is coming from when the plugin attempts to use TaskContainer::register, which was introduced in gradle 4.9, so you might be safe to upgrade to version 4.9, but I'd suggest going with what the website says and bumping it to version 5.
Applications are not running on android but running well on ios, error says that there is a problem in gradle although native android projects run well in android studio, I tried google and other threads on stackoverflow with no luck.**
N.B: the error occurs regardless the project, it always happens even with newly created projects in flutter. Thanks
* Error running Gradle:
ProcessException: Process "/Users/apple/Documents/flutter_work/tqtqt/android/gradlew" exited abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.10.2/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not find or load main class org.gradle.launcher.daemon.bootstrap.GradleDaemon
* 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
Command: /Users/apple/Documents/flutter_work/tqtqt/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
build.gradle
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Try to run flutter clean on project folder and run it again.
I have "installed" or included ben manes - gradle versions plugin:
https://github.com/ben-manes/gradle-versions-plugin
The code below is the build.gradle (Project: rewards)
apply plugin: "com.github.ben-manes.versions"
buildscript {
ext.kotlin_version = '1.3.10'
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.ben-manes:gradle-versions-plugin:0.20.0"
}
}
When I try to run the following gradle Task: gradle dependencyUpdates.
I get the following :
FAILURE: Build failed with an exception.
What went wrong:
Task 'gradle' not found in project ':app'. Some candidates are: 'bundle'.
Try:
Run gradle tasks to get a list of available tasks. 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 0s
11:23:53: Tasks execution finished 'gradle dependencyUpdates'.
After further testing, I realised that the task that I need to run should not have the word gradle in front. The command line instruction should just be dependencyUpdates. Then click on okay and it will export the report.
Before I update gradle and android studio I used to upload my library to bintray with these tasks from this tutorial:
first: gradlew install
second: gradlew bintrayUpload
But after updating android studio and gradle I had to change fist task to: gradlew installDebug
but gradle can not find taskbintrayUpload and I get this error:
* What went wrong:
Task 'bintrayUpload' not found in root project 'MyProject'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
You need to define a bintray task in your build.gradle. Since you do not have one, gradlew cannot find and therefore execute that task. Define something like the following according to your settings and you will be fine.
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
bintray {
user = ...
key = ....
publications = ....
pkg {
...
}
}
The solution was here: I had to add these lines in lib gradle.
// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
And it loads and adds bintray tasks to the gradle.