Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle idea failed #31382

Closed
dobbbb opened this issue Jun 16, 2018 · 12 comments
Closed

gradle idea failed #31382

dobbbb opened this issue Jun 16, 2018 · 12 comments
Labels
>bug :Delivery/Build Build or test infrastructure feedback_needed Team:Delivery Meta label for Delivery team

Comments

@dobbbb
Copy link

dobbbb commented Jun 16, 2018

Gradle Version : 4.8
OS Info : Mac OS X 10.13.4 (x86_64)
JDK Version : Oracle Corporation 10.0.1 [Java HotSpot(TM) 64-Bit Server VM 10.0.1+10]

Task :client:benchmark:ideaModule FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':client:benchmark:ideaModule'.

Could not resolve all dependencies for configuration ':client:benchmark:compileClasspath'.
A conflict was found between the following modules:
- org.elasticsearch.plugin:transport-netty4:7.0.0-alpha1-SNAPSHOT
- org.elasticsearch.plugin:transport-netty4:7.0.0-alpha1-SNAPSHOT

@jpountz
Copy link
Contributor

jpountz commented Jun 18, 2018

It works for me on master by running ./gradlew idea. What exact command are you running and on which branch? Is your checkout clean? Does it still reproduce if you run git clean -xdf?

@jpountz jpountz added >bug :Delivery/Build Build or test infrastructure feedback_needed labels Jun 18, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@ywelsch
Copy link
Contributor

ywelsch commented Jun 18, 2018

@doubleuhy please use Gradle 4.7 for now (i.e. the one provided by the wrapper). we're working on 4.8 compatibility, see #31271

@ywelsch ywelsch closed this as completed Jun 18, 2018
@ywelsch
Copy link
Contributor

ywelsch commented Jun 18, 2018

Can you use the gradle wrapper? i.e. invoke ./gradlew idea

@dobbbb
Copy link
Author

dobbbb commented Jun 18, 2018

gradle version change to 4.7, failed too😭

  • Where:
    Build file '/Users/zhouwuhong/elasticsearch/benchmarks/build.gradle' line: 31

  • What went wrong:
    A problem occurred evaluating project ':benchmarks'.

Failed to apply plugin [id 'elasticsearch.build']
JAVA_HOME must be set to build Elasticsearch

echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home

@dobbbb
Copy link
Author

dobbbb commented Jun 18, 2018

yes, i'm use ./gradlew idea

@dobbbb
Copy link
Author

dobbbb commented Jun 18, 2018

thanks, i have resolve this question. it seems like groovy System.getenv('JAVA_HOME') don't work when java version is 10 and gradle version is 4.7
solution:
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
@@ -206,6 +206,7 @@ class BuildPlugin implements Plugin {
}

     private static String findCompilerJavaHome() {
+        return "/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home"
         final String javaHome = System.getenv('JAVA_HOME')
         if (javaHome == null) {
             if (System.getProperty("idea.active") != null || System.getProperty("eclipse.launcher") != null) {

@ywelsch
Copy link
Contributor

ywelsch commented Jun 18, 2018

I have JDK 10 and gradle 4.7 on my machine and it works. This sounds more like something's wrong with how you've set up your JAVA_HOME.

@dobbbb
Copy link
Author

dobbbb commented Jun 18, 2018

i'm use fish shell, in config.fish
set JAVA_HOME (/usr/libexec/java_home)
echo $JAVA_HOME is work
......
......
and i have another problem, when i run Elasticsearch.java -Des.path.home=/Users/zhouwuhong/elasticsearch -Des.path.conf=/Users/zhouwuhong/elasticsearch/distribution/src/config -Dlog4j2.disable.jmx=true

[2018-06-18T19:46:45,235][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]

org.elasticsearch.bootstrap.StartupException: 
org.elasticsearch.bootstrap.BootstrapException:
 java.nio.file.NoSuchFileException: 
/Users/zhouwuhong/elasticsearch/modules/percolator/plugin-descriptor.properties

and modules/percolator/plugin-descriptor.properties is actually not exist

@ywelsch
Copy link
Contributor

ywelsch commented Jun 18, 2018

Please use https://discuss.elastic.co for these questions.

@alpar-t
Copy link
Contributor

alpar-t commented Jun 20, 2018

I think the second failure is #31399

@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
@warriorSL2016
Copy link

I try to build it on my pc, I found that first you download and unzip it , then attention that never modify any files and execute the command './gradlew idea' in the bash , and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Build Build or test infrastructure feedback_needed Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

7 participants