# Anybody else having problem building an eclipse project using \`gradle eclipse\`?

**URL:** <https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105>\
**Category:** Elasticsearch\
**Created:** [August 10, 2011, 5:26am UTC](https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105 "2011-08-10T05:26:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt1/32/2986_2.png) [@Matt1](https://discuss.elastic.co/u/Matt1)\
**Post date:** [August 10, 2011, 5:26am UTC](https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105/1 "2011-08-10T05:26:16Z")

</div>

I've tried this a couple of times yesterday and today with no success.  
I get an error not being able to resolve ':plugins-cloud-  
aws:testRuntime':

$\> gradle eclipse  
11:17:39.600 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE:  
Build failed with an exception.  
11:17:39.601 [ERROR] [org.gradle.BuildExceptionReporter]  
11:17:39.601 [ERROR] [org.gradle.BuildExceptionReporter] \* What went  
wrong:  
11:17:39.601 [ERROR] [org.gradle.BuildExceptionReporter] Execution  
failed for task ':plugins-cloud-aws:eclipseClasspath'.  
11:17:39.601 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Could  
not resolve all dependencies for configuration ':plugins-cloud-  
aws:testRuntime':  
11:17:39.602 [ERROR] [org.gradle.BuildExceptionReporter] -  
unresolved dependency: com.amazonaws#aws-java-sdk;1.2.4: not found

I've also tried running `gradle` and `gradle test` per the  
instructions on [http://www.elasticsearch.org/guide/appendix/building-from-source.html](http://www.elasticsearch.org/guide/appendix/building-from-source.html)  
but also with no success.

Thanks in advance for any help!

Matt

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 18, 2011, 11:24am UTC](https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105/2 "2011-08-18T11:24:20Z")

</div>

$\> gradle eclipse

Thanks Matt for this command. I didn't know how to import my project into eclipse and actually it's quite simple... You save my day !

BTW, everything is working fine in compiling with gradle, gradle test and gradle eclipse when I have a direct internet access. (at home)  
When I'm behind a proxy (at work), I can not download all jars. Some works. Some others don't !  
Although I set up my JAVA\_OPTS with the right proxy, it still not work.

FAILURE: Build failed with an exception.

- Where:  
Build file 'D:\Dev\elasticsearch\modules\jarjar\build.gradle' line: 38

- What went wrong:  
Execution failed for task ':jarjar:jar'.  
Cause: Could not resolve all dependencies for configuration ':jarjar:runtime':

So perhaps you have the same problem on your side ?

---

<div class="post-metadata">

**Author:** ![Matt1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt1/32/2986_2.png) [@Matt1](https://discuss.elastic.co/u/Matt1)\
**Post date:** [August 19, 2011, 4:03am UTC](https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105/3 "2011-08-19T04:03:20Z")

</div>

Hey dadoonet,

Thanks for the reply! I'm glad this was helpful to you.

For me, I was able to get past the error that I original posted about,  
but then got stuck during `./gradlew test` because of a  
"java.lang.ClassNotFoundException: junit.framework.TestCase" during  
the ":plugins-lang-groovy:compileTestGroovy" phase.

One thing that's greatly complicating all of this for me is that I'm  
working from China, and the Great Firewall fo China is incredible in  
its breadth: random sites just don't work, or are so slow they just  
time out. For example, I can't access [jboss.org](http://jboss.org).

I'll keep trying, and will update if I make any progress. For  
reference, the following is the error that I get from `./gradlew test`.

:plugins-lang-groovy:compileTestGroovy  
[ant:groovyc] \>\>\> a serious error occurred: junit/framework/TestCase  
[ant:groovyc] \>\>\> stacktrace:  
[ant:groovyc] java.lang.NoClassDefFoundError: junit/framework/TestCase  
[ant:groovyc] at java.lang.ClassLoader.defineClass1(Native Method)  
[ant:groovyc] at  
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)  
[ant:groovyc] at java.lang.ClassLoader.defineClass(ClassLoader.java:  
615)  
[ant:groovyc] at  
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:  
141)  
[ant:groovyc] at  
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)  
[ant:groovyc] at java.net.URLClassLoader.access  
$000(URLClassLoader.java:58)  
[ant:groovyc] at java.net.URLClassLoader$1.run(URLClassLoader.java:  
197)  
[ant:groovyc] at java.security.AccessController.doPrivileged(Native  
Method)  
[ant:groovyc] at  
java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:  
306)  
[ant:groovyc] at sun.misc.Launcher  
$AppClassLoader.loadClass(Launcher.java:301)  
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:  
295)  
[ant:groovyc] at  
groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)  
[ant:groovyc] at  
groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:  
709)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:  
275)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:  
466)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:  
275)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:  
243)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:  
227)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:  
239)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:  
235)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:  
1271)  
[ant:groovyc] at  
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:  
148)  
[ant:groovyc] at org.codehaus.groovy.control.CompilationUnit  
$8.call(CompilationUnit.java:601)  
[ant:groovyc] at  
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:  
839)  
[ant:groovyc] at  
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:  
544)  
[ant:groovyc] at  
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:  
493)  
[ant:groovyc] at  
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:  
476)  
[ant:groovyc] at  
org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:  
67)  
[ant:groovyc] at  
org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:  
180)  
[ant:groovyc] at  
org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompile(FileSystemCompiler.java:  
148)  
[ant:groovyc] at  
org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:  
162)  
[ant:groovyc] Caused by: java.lang.ClassNotFoundException:  
junit.framework.TestCase  
[ant:groovyc] at java.net.URLClassLoader$1.run(URLClassLoader.java:  
202)  
[ant:groovyc] at java.security.AccessController.doPrivileged(Native  
Method)  
[ant:groovyc] at  
java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:  
306)  
[ant:groovyc] at sun.misc.Launcher  
$AppClassLoader.loadClass(Launcher.java:301)  
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:  
247)  
[ant:groovyc] ... 33 more

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ':plugins-lang-groovy:compileTestGroovy'.  
Cause: Forked groovyc returned error code: 1

Cheers!  
Matt

On Aug 18, 7:24 pm, dadoonet [da...@pilato.fr](mailto:da...@pilato.fr) wrote:

> Matt wrote:
> 
> > $\> gradle eclipse
> 
> Thanks Matt for this command. I didn't know how to import my project into  
> eclipse and actually it's quite simple... You save my day !
> 
> BTW, everything is working fine in compiling with gradle, gradle test and  
> gradle eclipse when I have a direct internet access. (at home)  
> When I'm behind a proxy (at work), I can not download all jars. Some works.  
> Some others don't !  
> Although I set up my JAVA\_OPTS with the right proxy, it still not work.
> 
> FAILURE: Build failed with an exception.
> 
> - Where:  
> Build file 'D:\Dev\elasticsearch\modules\jarjar\build.gradle' line: 38
> 
> - What went wrong:  
> Execution failed for task ':jarjar:jar'.  
> Cause: Could not resolve all dependencies for configuration  
> ':jarjar:runtime':
> 
> So perhaps you have the same problem on your side ?
> 
> --  
> View this message in context:[http://elasticsearch-users.115913.n3.nabble.com/Anybody-else-having-p](http://elasticsearch-users.115913.n3.nabble.com/Anybody-else-having-p)...  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:56am UTC](https://discuss.elastic.co/t/anybody-else-having-problem-building-an-eclipse-project-using-gradle-eclipse/5105/4 "2017-07-06T03:56:39Z")

</div>


