Hi All,

I'm struggling with getting the maven deploy functionality to work. This is
the script I have (I removed some projects since they add no value for this
example). 

My question is:
1) What command do I need to type on the commandline? (Sorry for asking this
stupid question, but this information is not available in the
documentation).
2) If I call gradle -i uploadArchives, I get a message 

FAILURE: Build failed with an exception.

* Where:
Build file '/java/projects/multiverse/master/build.gradle' line: 51

* What went wrong:
A problem occurred evaluating root project 'master'.
Cause: Could not find property 'uploadResolvers' on task ':uploadArchives'.


This is the example script I'm using.


allprojects {
  apply plugin: 'base'
  apply plugin: 'java'
  apply plugin: 'maven'
  apply plugin: 'project-reports'

  install.dependsOn ':build'
  defaultTasks 'clean', 'install'

  sourceCompatibility = 1.6
  version = '0.6-SNAPSHOT'
  group = 'org.multiverse'

  def localMavenRepo = 'file://' + new File(System.getProperty('user.home'),
'.m2/repository').absolutePath

  repositories {
    mavenRepo urls: localMavenRepo
    mavenCentral()
    mavenRepo(urls: [
            'http://snapshots.repository.codehaus.org',
            'http://download.java.net/maven/2/',
            'https://maven.atlassian.com/content/groups/public'])
  }

  configurations {
    deployerJars
  }

  test {
    exclude("**/*AbstractTest*")
    exclude("**/*StressTest*")
    exclude("**/*LongTest*")
    exclude("**/*PerformanceTest*")
    exclude("**/*performanceTest*")
  }

  task integrationtest(type: Test) {
    include("**/*StressTest*")
    include("**/*stressTest*")
    include("**/*LongTest*")
    include("**/*longTest*")
  }

  dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.8.1'
    testCompile group: 'org.mockito', name: 'mockito-all', version: '1.8.2'
    deployerJars "org.apache.maven.wagon:wagon-ssh:1.0-beta-2"
  }

  uploadArchives {
      uploadResolvers.addMavenDeployer('repo-deployer') {
         addProtocolProviderJars(dependencies.resolve('deployerJars'))
         repository(url:
'dav:https://dav.codehaus.org/repository/multiverse/')
         snapshotRepository(url: 
'dav:https://dav.codehaus.org/snapshots.repository/multiverse/') 
      } 
   }
}

//
------------------------------------------------------------------------------------------------------------------

project(':multiverse-benchy') {
  dependencies {
    compile group: 'com.google.code.gson', name: 'gson', version: "1.4"
    compile group: 'args4j', name: 'args4j', version: "2.0.16"
  }
}

//
------------------------------------------------------------------------------------------------------------------

project(':multiverse-core') {

  configurations {
    testFixtures {
      extendsFrom testRuntime
    }
  }

  task testJar(type: Jar) {
    from sourceSets.test.classes
    classifier = 'test'
  }

  artifacts {
    testFixtures testJar
  }

}

//
------------------------------------------------------------------------------------------------------------------

project(':multiverse-instrumentation') {
  configurations {
    testFixtures {
      extendsFrom testRuntime
    }
  }

  task testJar(type: Jar) {
    from sourceSets.test.classes
    classifier = 'test'
  }

  artifacts {
    testFixtures testJar
  }

  dependencies {
    compile project(':multiverse-core')
    compile group: 'args4j', name: 'args4j', version: "2.0.16"
    compile group: 'asm', name: 'asm-all', version: "3.2"
    testCompile project(path: ':multiverse-core', configuration:
'testFixtures')
  }
}


I think it is a good idea to place a complete working multiple project
example on the website so others can copy paste from it. 

-- 
View this message in context: 
http://old.nabble.com/Problems-with-maven-deploy-functionality-getting-up-and-running.-tp28722018p28722018.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to