gradle

gradle runJar task?

Dear All: I am trying to make a task to run my Jar file in gradle. I have come up with the following: task runJar(dependsOn:[jar]){ ant.java(jar:,fork:true) } However, I am unable to find the path to the jar file. Any help much appreciated. Thank you! Misha EDIT: OK this is rather odd. This task runs before compile, etc.??? EDI...

org.hibernate.HibernateException: Error while accessing enum.values(): class com.mksoft.fbautomate.domain.Account$Type

This error is driving me nuts!!! Caused by: java.lang.NoSuchMethodException: com.mksoft.fbautomate.domain.Account$Type.values() The same exact class works fine in a separate Groovy file. Any ideas/help much appreciated. Most confusing... http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html has no values() method! Here is m...

Gradle fat jar _leaving out_ META-INF from child jars?

Dear All: Is there any way to leave out certain paths from a Gradle fat jar. I am using: jar { from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } from http://docs.codehaus.org/display/GRADLE/Cookbook and would like to leave out META-INF directories if possible. Thank you! Misha ...

Declarative dependency handling for multi-module source projects in version-control.

We have a number of products that consist of a large number of modules, some of which are shared between some of the products. They are spread out over a few version control repositories. Products are built by master Ant scripts that are responsible for checking out all modules and building them in the correct order. The modules don't h...

Advice on a good Java build tool, well integrated with eclipse

Hi SO guys ! I am working in a small team (3 persons) on several modules (about 10 currently). The compilation, integration and management of build versions is becoming more and more tedious. I am looking for a good build / integration tool to replace / complete Ant. Here is the description of our current development environment : - S...

In Gradle, How do ignore the cache for a local ivy repository?

In my Gradle script (version 0.8), I have a local ivy repository which I use to publish a library, and I can't seem to get Gradle to ignore its cache. I'm accessing the local ivy repo. based on the recommendation in the Gradle manual. Here's there relevant code (with some variables renamed). dependencies{ // [several remote dependen...

Alternative configurations in Gradle for compiling Java

With Gradle there are some default configurations such as compile, runtime etc but for various reasons I wish to use some alternative configurations. How do I tell the compilation task about these configurations? The documentation seems to suggest that it can be set on the sourceset using compileClasspath but I'm unclear how exactly th...

gradle - how to declare a dependency of a jar in a jar

Using gradle, I am consuming a build from an archiva repository. One of the jars looks like this: javax.jms_1.1.0.200810061358.jar contents: about.html about_files LICENSE.txt jms.jar META-INF MANIFEST.MF The jar I need is actually the jms.jar inside this javax.jms_1.1.0.200810061358.jar The only way I've been able to consume this ...

gradle - how do I build a jar with a lib dir with other jars in it ?

In gradle - how can I embed jars inside my build output jar in the lib directory (specifially the lib/enttoolkit.jar and lib/mail.jar)? ...

Error in the build of project with gradle from Hudson and its deployment in artifactory !!

I just add the hudson-artifactory plugin and everything run marvelously!!! with maven but when I tried to buikld the project with gradle ("I added th gradle plugin to hudson") i have this error FAILURE: Build failed with an exception. * Where: Initialization script 'C:\Documents and Settings\qqqqqqqqqqqq.hudson\jobs\skiiiii...

automating telnet with Groovy

I am doing a gradle/OSGi build.... I have the OSGi bundle building fine, but want to automate the bundle deployment. I don't think there is a gradle task for this, so this becomes a groovy question. To deploy to an osgi container you do the following: 1) telnet to the OSGi container port 2) send ss command to list the bundles 3) pars...

gradle: "Could not determine which tasks to execute."

I received the following gradle build file (gae.gradle) with a sample project from SpringSource but when I attempt to run it with gradle as: gradle gae it generates the error: FAILURE: Could not determine which tasks to execute. Is this a properly formatted gradle file or am I doing something wrong? Is it possible I should be run...

Can Gradle handle local dependencies to other than sub-directories?

I don't know if I totally got the concept wrong, but I want to create several projects with dependencies to other projects which are not part of the directory structure of a parent project. I know that the normal way of doing this would be to use an external dependency which fetches from some external repository. But in this case, where ...

How do I create several ejb jars in a Gradle build project?

I have a multi-project build and in each of the projects I have several packages in the main src tree which need to be packaged up separately from the rest of the src as individual EJB artifacts: com/foo/ejb/ejb1 com/foo/ejb/ejb2 ... There can be an arbitrary number of these EJBs in each project (0 or several). My question is, how do ...

Create a hadoop jar with external dependencies using Gradle

How do I create a hadoop jar that includes all dependencies in the lib folder using Gradle? Basically, similar to what fatjar does. ...

How do I specify checkstyle version when using gradle 0.9-rc-1 code-quality plugin?

I've been using maven2 for a while now, and I'm trying out gradle build tool at the moment. One of the things I would like to do is to run checkstyle, but my current project is using checkstyle 4.4 with rules that don't seem to be compatible with the latest version of checkstyle which gradle code-quality plugin is using. Sure, I can and...

Gradle Task Dependencies

How on earth can I do this in gradle: eg. want to use HTTPBuilder in a task. build.gradle: repositories { mavenRepo urls: "http://repository.codehaus.org" } configurations { testConfig } dependencies { testConfig 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0' } task someTaskThatUsesHTTPBuilder (dependsOn: configurati...

Gradle download slow

I am using Gradle to do our build and it is running really slowly. When I run it in debug I see it is waiting on: 10:08:42.092 [main] DEBUG org.gradle.logging.IvyLoggingAdaper - trying http://gwtupload.googlecode.com/svn/mavenrepo/org/apache/apache/3/apache-3.jar 10:08:42.093 [main] DEBUG org.gradle.logging.IvyLoggingAdaper - ...

Capturing the standard output in Gradle 0.8 builds

Say I have src/test/groovy/MyTest.groovy: class MyTest extends GroovyTestCase { void testDummy() { println 'DUMMY' } } And there is nothing special with my build.gradle: usePlugin 'groovy' repositories { mavenCentral() } dependencies { groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.7.5' testCom...

How do I export the dependent libraries to a directory for deployment in gradle?

I need to deploy my code to another machine. How do I export the dependent jars to a lib directory? ...