I'm having difficulty publishing an artifact to my local Ivy repository
with "gradle uploadArchives".

I have one project called 'ias_ta_common' that creates 2 Jars
('ias_ta_common.jar', and 'ias_ta_common_service_facade.jar')

Calling "gradle uploadArchives" will upload my 'ias_ta_common.jar' as
expected but I can't seem to find a way for it to publish the extra Jar.


Looking at the documentation under "Artifact management" it would appear
that assigning the artifact to the 'archives' configuration should be
enough.

Can anyone see what I'm doing wrong?. My build.gradle is as follows:

--------------------------------->8----------------------------------
usePlugin 'java'

srcRootName="sources"
srcDirNames = ['ie']
    
group = 'vhi'
version = '1.0'
  
repositories{
  add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
    name = 'ivyLocalRepository'
    addIvyPattern
"C:/apps/ivy-local-repository/[organisation]/[module]/[revision]/ivys/iv
y.xml"
    addArtifactPattern
"C:/apps/ivy-local-repository/[organisation]/[module]/[revision]/[ext]s/
[artifact].[ext]"
    descriptor = 'optional'
    checkmodified = true
  }
}

dependencies {
  compile group: 'commons-collections', name: 'commons-collections',
version: '3.2'
}

task serviceFacade(type: Jar, dependsOn: compile){
  configuration = configurations.archives
  ant.jar(destfile:
"$buildDir/libs/ias_ta_common_service_facade-${version}.jar") {
    fileset(dir: "$classesDir") {
      include(name: "ie/vhi/ias/ta/common/services/facade/**")
    }
  }
}

artifacts {
  archives serviceFacade
}

uploadArchives {
  uploadDescriptor = true
  repositories{
      add project.repositories.ivyLocalRepository
    }
}

--------------------------------->8----------------------------------

Thanks for your help,
Donal.

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

    http://xircles.codehaus.org/manage_email


Reply via email to