build.gradle:
I am trying to compile this gradle project in order to get a pom.xml out of it.
But not able to generate one.
here is the link for build.gradle:
https://github.com/satyamsah/opensearch-security-mirror/blob/main/build.gradle
error:
23:09 $ gradle build -x test
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/kusatyam/workspace/opensearch-security-mirror/build.gradle' line: 171
* What went wrong:
A problem occurred evaluating root project 'opensearch-security'.
> No signature of method: build_5wndr8gj5a0mvad7gm9rg9qz4.publishing() is applicable for argument types: (build_5wndr8gj5a0mvad7gm9rg9qz4$_run_closure9) values: [build_5wndr8gj5a0mvad7gm9rg9qz4$_run_closure9#67677da5]
Can somone help me with what could be issue?
Related
I'm very new to grails and therefore I'm trying to do the following tutorial with IntelliJ: https://guides.grails.org/creating-your-first-grails-app/guide/index.html
After I cloned the repository, the README is asking me to run the following command:
gradle publishGuide
But I get the following error:
sam#sam-USMC:~/IdeaProjects/creating-your-first-grails-app$ gradle publishGuide
Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:2.1.9.RELEASE because no repositories are defined.
Required by:
project :complete
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/sam/IdeaProjects/creating-your-first-grails-app/complete/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':complete'.
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each([Ljava/lang/Object;Lgroovy/lang/Closure;)[Ljava/lang/Object;
* 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
Line 19 of the build.gradle file looks like this:
apply plugin:"org.grails.grails-web"
Grateful for any help!
I'm trying to integrate Java and npm Builds Using Gradle Kotlin DSL.
I was going through the example dzone article and github example code.
I'm in npm-app project folder and running the command gradle npm_run_build.
$ gradle npm_run_build
Task :npm-app:nodeSetup FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':npm-app:nodeSetup'.
Could not resolve all files for configuration ':npm-app:detachedConfiguration1'.
Could not find org.nodejs:node:10.14.1.
Searched in the following locations:
- https://nodejs.org/dist/v10.14.1/ivy.xml
Required by:
project :npm-app
BUILD FAILED in 810ms
1 actionable task: 1 executed
How can I fix this error?
try switching your node plugin:
plugins {
id "com.github.node-gradle.node" version "1.5.3"
}
I follow all recommandation to make migration of androidX
but when I change distribution
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
I have this error
The Gradle project does not define a task suitable for the requested build.
Review the android/app/build.gradle file and ensure it defines a debug build type.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'null' not found in root project 'android'.
I don't know what to do
The Netflix fenzo (https://github.com/Netflix/Fenzo) build fails complaining on gradle plugin from netflix not available.
Stack trace below
> Configure project :
Inferred project: fenzo, version: 1.1.0-SNAPSHOT
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/UKHANVA/git/Fenzo/build.gradle' line: 32
* What went wrong:
A problem occurred evaluating root project 'fenzo'.
> Failed to apply plugin [class 'nebula.plugin.info.dependencies.DependenciesInfoPlugin']
> Could not create plugin of type 'DependenciesInfoPlugin'.
> No signature of method: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator.asStringComparator() is applicable for argument types: () values: []
Possible solutions: asVersionComparator()
* 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 12s
I suspect you are using the version of gradle you have in your path:
gradle build
Try running the build with the gradle wrapper script in the repository:
./gradlew build
The version of gradle used by the wrapper is configured in gradle/wrapper/gradle-wrapper.properties. Fenzo is using 2.13 which is quite old.
By experimenting with the wrapper version, I found that it builds successfully with Gradle 2.x & 3.x but not 4.x.
Gradle 4.0 gave me the exact same error as above. 4.8 also failed but with a different error.
I've been playing with a legacy project's build script and I get the following error with Gradle 2.13.
myhost jthoms$ gradle clean build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
FAILURE: Build failed with an exception.
* Where:
Build file '/<my-project>/build.gradle' line: 10
* What went wrong:
A problem occurred evaluating root project 'com.mycompany.myorg.myproject'.
> org/gradle/internal/metaobject/MethodMixIn
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.494 secs
My build.gradle file looks as follows:
buildscript {
repositories {
maven { url 'http://<my-nexus-repo>/' }
}
dependencies {
classpath 'com.bmuschko:gradle-clover-plugin:2.1.2'
}
}
apply plugin: 'com.bmuschko.clover'
// more build stuff below irrelevant to error line.
My build fails, so how can this error be fixed?
I worked this error out, but I couldn't find anything related to the class mentioned in the error output, so I thought that I would share my finding here.
I found this thread for a similar error. In the thread, #bmuschko recommended upgrading to a newer version of Gradle. For me, upgrading from Gradle version 2.13 to 3.5.1 worked like a charm.