Gradle upgrade problem

(ratnachary.varada) #1

Hi all…Iam currently using gradle 0.9.2,and now wanted to upgrade it to 1.0.I downloaded gradle 1.0 and gave the classpath to the concerned folder.If i try to run gradle help,iam sticking with an error jta1.0.1B jar not found.Could any one help me to get out of this problem?

(Peter Niederwieser) #2

Could you please describe exactly what you are doing and what error you are getting (paste the output inside HTML code tags)? You don’t have to set a class path to run Gradle. Just unzip the distribution and put the ‘bin’ directory on your ‘PATH’. Or, even simpler, use the Gradle wrapper.

(ratnachary.varada) #3

HI PETER, My project is a dynamic webapplication with java(1.6),spring(3.0) support and selenium test coverage.We are currently using sts 2.5.2,and gradle 0.9.2 to build and run the test cases.Now we want to upgrade gradle to 1.0 final.After setting path in environment variables,i ran gradle help command.i got an exception that property source compatibility 1.6 is not valid and some classesdir property not found.please give solution to this problem.Thanks in advance.

(Peter Niederwieser) #4

At the very least, you will need to paste the relevant parts of your build script and the exact build output. Please use HTML ‘code’ tags when doing so. Also make sure to study the release notes and migration guide for Gradle 1.0.

(ratnachary.varada) #5

hi peter,

sorry for the late reply!!!

if i ran (gradle help) command i get following output on the prompt.

Dynamic properties are deprecated:
Deprecated dynamic property: "sourceCompatibility" on "root project ''", va
lue: "1.5".
Deprecated dynamic property: "coberturaRunner" on "root project '", value:
  FAILURE: Build failed with an exception.
  * Where:
Build file 'C:\projects\SR(01-07)\sr-3\build.gradle' line: 37
  * What went wrong:
A problem occurred evaluating root project
 > Could not find property 'classesDir' on source set main.
  * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

This is my build.gradle file…

def properties = new Properties()
file("src/main/resources/").withInputStream { properties.load(it) }
  def springGroup = 'org.springframework'
def springVersion = '3.0.5.RELEASE'
  def springIntegrationGroup = 'org.springframework.integration'
def springIntegrationVersion = '2.0.3.RELEASE'
  def slf4jGroup = 'org.slf4j'
def slf4jVersion = '1.6.1'
  sourceCompatibility = JavaVersion.VERSION_1_6
  buildscript {
    // using a variable to make wiki look cleaner
    def githubBase = ''
    repositories {
        /* keep any existing buildscript repositories you might have */
        /* here's the github repository */
        add(new org.apache.ivy.plugins.resolver.URLResolver()) {
            name = 'cobertura'
            addArtifactPattern "${githubBase}/[organization]/[module]/[revision]/[module].[ext]"
            addIvyPattern "${githubBase}/[organization]/[module]/[revision]/ivy.xml"
        mavenCentral() // you'll need this if you don't already have it
    dependencies {
        classpath 'gradle_cobertura:gradle_cobertura:1.0-rc3' // here's the ivy resolution for the cobertura plugin
        classpath 'org.grails:grails-docs:1.2.2'
  allprojects {
    apply plugin: 'idea'
    apply plugin: 'eclipse'
    apply plugin: com.orbitz.gradle.cobertura.CoberturaPlugin
      repositories {
        mavenRepo urls: ['']
  subprojects {
    apply plugin: 'java'
      dependencies {
                [group: springGroup, name: 'spring-context', version: springVersion],
                [group: springIntegrationGroup, name: 'spring-integration-file', version: springIntegrationVersion],
                [group: slf4jGroup, name: 'slf4j-api', version: slf4jVersion],
                [group: 'commons-lang', name: 'commons-lang', version: '2.4'],
                [group: 'commons-io', name: 'commons-io', version: '2.0.1'],
                [group: 'org.aspectj', name: 'aspectjweaver', version: '1.6.10'],
                          [group: springGroup, name: 'spring-jms', version: springVersion],
                [group: 'org.apache.activemq', name: 'activemq-all', version: '5.2.0']
             /* End of Documenatation */
  /* Liquibase */

Please find a solution for this problem,in the meanwhile i will go through the release notes. Thanks in advance.

(Peter Niederwieser) #6

Please wrap all code with HTML code tags. If you can’t edit your post, post again.

(ratnachary.varada) #7

Hi peter, i resolved this my application is running with gradle successfully. Thanks.