I am working with the Gradle build system in the Eclipse IDE. Whenever I create Gradle project in Java I always need to go to command prompt and then to specific project directory and build it first through command gradle build followed with the my corporate proxy settings. I am not able to build it directly from the IDE. can anyone suggest Where I can add my proxy setting to make it build and run my Gradle project from the Eclipse IDE directly rather than going to command prompt always.
Thanks in advance :-)
You can define the proxy settings in gradle.properties in your root project directory if it is the same for anyone using that repository, or in ~/.gradle/gradle.properties to set it for any Gradle project on your machine but not affecting other users of the repository.
See here for further information about the proper syntax.
Related
I am provisioning a dev environment to a VM using Vagrant and Chef. It works great for provisioning Eclipse and all needed plugins but leaves the developer the tasks of importing the Gradle project, their run configurations as well as Jboss Server run configuration. Is there a way to import the gradle projects and the run configurations using the command line? If so, these steps could be automated as part of creating the VM. TIA for your help.
run configuration: if you store them in the project folder, they are picked up by eclipse automatically. See also: https://stackoverflow.com/a/8625088/1861362
eclipse project: you can generate eclipse files using the gradle eclipse plugin, yet I'm not aware of any means to have them automatically imported in eclipse..
I have imported a groovy project in my eclipse and I have installed the groovy plugins in my eclipse too. now, I want to build my project(which is a groovy-gradle plugin) in eclipse and use it further. I have gone through a link http://www.selikoff.net/2013/01/11/creating-a-groovy-project-with-gradle-in-eclipse/ but I don't understand how to build my project. I don't get build option.
Install the gradle plugins.
Some tasks will be available in the tasks Window.
Right click on build task and run it.
I am trying to add build steps in an Eclipse project (Eclipse CDT Version: 3.8.0 on Debian).
For instance, when instructing Eclipse to build it would:
1- Run premake
2- Run make
You get the gist.
There's 0 tutorials on the subject and I looked everywhere... Is it because this feature doesn't exist? That's hard to believe...
There is no tutorial for Eclipse build :D
May be you want to build your project? Correct me if I am wrong.
As I know, Eclipse supports us to use Ant build to build/ execute the build step for projects (not for Eclipse itself) => build.xml
And If you really want to do some things else, i think create a bat file. and then execute it when start Eclipse is a suggestion.
I am using Gradle 1.12 to build an Android library. The build script works fine and the artifacts are installed to both a Maven local repository and deployed (using an S3 wagon Gradle plugin) to a remote Maven repository. When these artifacts are referenced by a Gradle (1.12) build of a sample app using the Maven local repo, all works fine. When the remote repository is used, a Gradle dependency resolution error is reported [details on the error will be provided later].
To get more information about the problem in order to fix my script or file a bug report, I would like to do some debugging of Gradle 1.12 while the sample app build script runs. Eclipse would seem to have the debugger of choice but configuring Eclipse is the subject of this post.
Following advice on the Gradle forums, it is straightforward to configure Gradle startup options to suspend on startup and await a connection from a client debugger (Eclipse).
Configuring Eclipse to do this is proving difficult. At first glance, it would seem that one needs a Gradle plugin. Spring Source provides a recommended one. But this plugin appears to bury and use Gradle 1.10. Perhaps upgrading this plugin to use 1.12 is easy and an answer that details how to do this would be a great answer.
The critical pieces of the answer I am looking for will enable me to place breakpoints in Gradle classes and step through source code until I either find a bug or figure out what I might be doing incorrectly in my build script.
Alternative approaches, such as using Intellij or Android Studio would be good answers as well if accompanied by details and/or references that make it clear how to enable the Gradle debugging process.
Debugging Gradle works exactly the same as (remotely) debugging any other Java application. No Gradle plugin is needed for this. In a nutshell, you need to start a remote debugging session from an Eclipse project that has Gradle sources. One way to create such a project is to clone the Gradle GitHub repository and run gradlew eclipse.
I use m2eclipse to integrate Eclipse (Indigo) and Maven. I also use a proxy, so I have a Settings.xml with the correct host and port. I've configured the LAN Settings of the OS too, so Eclipse is configured in the same way (Native mode). Finally, I have put an external maven as the Eclipse installation (Maven 2.2.1) .
Once I did that, I import from Eclipse a Maven project. When I do "mvn install" the artifacts are downloaded, and I get the "Build Succesfull". However, the project marks an error.
The error type is different if is a project with dependencies (pom dependencies) or a simple project. For example, in a simple project the error is "Could not calculate build plan: connection timed out". In a complex project doesn't read some artifacts, which are in the repository.
I think the problem is the plugin and the proxy because in the console appears when eclipse starts, "Unable to update index for central http://repo1.maven.org/maven2/".
Any idea?
Thank you for your help
Ángel
Since your build is working fine I believe your setting.xml is maven installation folder is working fine.
So try to change the maven setting in eclipse as shown below and refer the same setting.xml that is there in the maven folder configuration.
Not a very helpful answer, but I ran into the same problem.
m2eclipse didn't seem to handle proxies (either eclipse or .settings) very well.
My workaround at the time was to always have a command line handy to pull in new dependencies.
I had the same problem with the Maven error: Could not calculate build plan: connection timed out
What finally fixed it was a complete Clean and Rebuild:
Project > Clean...
(x) Clean all projects
(x) Build the entire workspace