Why does the dependency resolution seem to be taking a project configuration even though it is defined as a binary dependency from a repository ie. group: project.group, name: project.name, version: project.version.toString(), ext: ‘zip’. This build script is apart of the larger gradle build which builds and publishes the artifacts.
It strictly a deployment buildscript for release artifacts used as a script plugin on 2 different packaging projects. I tried changing the dependency resolution caching as well which did not help. Code snippets of one of the packaging projects, deployment plugin, and download plugin files are below.
I’ve tested on 2 different versions of gradle 1.8 and 1.10 but most of the potential fixes were tested on 1.10.
Any help would be appreciated, I’ve been mucking around with this for hours.
-Ferzan
----------------------------------------------------------------- bulk-update-osgi\build.gradle -----------------------------------------------------------------
task archivePkg(type: Zip) {
baseName = project.name
into('jcr_root') {
from("${rootDir}/bulkupdate/src/main/content/jcr_root/") {
exclude '**/.vlt'
exclude '**/*.orig'
exclude '**/.hg'
}
}
into('META-INF') {
from("${rootDir}/bulkupdate/src/main/content/META-INF")
}
from bulkupdateCopySpec
from(configurations.embedded) {
into('jcr_root/apps/sni-bulkupdate/install/')
}
}
task build(dependsOn: archivePkg)
apply from: "$rootDir/gradle/publishArtifact.gradle"
artifacts {
archives archivePkg
}
apply from: "$rootDir/gradle/deployOsgiBundle.gradle"
----------------------------------------------------------------- downloadOsgiBundle.gradle -----------------------------------------------------------------
apply from: "$rootDir/repositories.gradle"
configurations {
deployCq
}
configurations.deployCq{
resolutionStrategy{
cacheDynamicVersionsFor 0, "seconds"
cacheChangingModulesFor 0, 'seconds'
}
}
dependencies {
if (env != 'LOCAL' && !version.toString().contains('SNAPSHOT')) {
logger.quiet "Using Release Bundle ${project.group}:${project.name}:${project.version} for Deployment Config"
deployCq group: project.group, name: project.name, version: project.version.toString(), ext: 'zip'
}else{
logger.quiet "Using Snapshot Bundle ${archivePkg.archivePath} for Deployment Config"
deployCq files(archivePkg.archivePath)
}
}
task fetchDeployArchives(type: Copy) {
println "PATH:" + project.configurations.deployCq.singleFile.canonicalPath
from project.configurations.deployCq
into "$buildDir/download/artifacts" as File
}
--------------------------------------------------------------------------------- StdOut ---------------------------------------------------------------------------------
:buildSrc:build UP-TO-DATE
Loading configuration for environment 'DEV'.
Using Release Bundle com.scrippsnetworks.wcm:bulkupdate-osgi:2.2.164 for Deployment Config
PATH:C:\Repos\fnr-imp\bulkupdate-osgi\build\distributions\bulkupdate-osgi-2.2.164.zip
<----- THIS IS THE ISSUE.. it should be resolved from "$buildDir/download/artifacts" after downloading from the repo
Using Release Bundle com.scrippsnetworks.imp.fnr:imp-osgi:2.2.164 for Deployment Config
PATH:C:\Repos\fnr-imp\imp-osgi\build\distributions\imp-osgi-2.2.164.zip
:bulkupdate-osgi:fetchDeployArchives UP-TO-DATE
:bulkupdate-osgi:cqDeploy-Author-10.47.28.211
Deploying artifact 'C:\Repos\fnr-imp\bulkupdate-osgi\build\distributions\bulkupdate-osgi-2.2.164.zip'