maven - Extracting files downloaded as a dependency in Gradle -



maven - Extracting files downloaded as a dependency in Gradle -

i've got gradle script goes following:

apply plugin: 'java' apply plugin: 'maven' defaulttasks 'build' ext.basedir = file('.').getabsolutepath() repositories{ maven { url "http://package.repo.com:8081/nexus/content/repository } configurations.all { // check updates every build resolutionstrategy.cachechangingmodulesfor 0, 'seconds' } dependencies { compile group:'com.repo.wwpd', name:'kernel_utilities', version:'3.0.0', changing:true } task copy_dependencies(type: copy) { configurations.compile basedir+'\\install' include '*' { filetree iotree = filetree(dir: "c:\\users\\username\\install") } iotree.each { f -> re-create { tartree(resources.gzip(f)) "c:\\users\\user\\test" } } }

the goal dependencies, move them install folder, , extract them tar files test folder.

the problem appears task executed before dependencies downloaded. if files exist in install works fine, if install folder empty result empty test folder total install folder.

[edit - updated comments peter n.] should 1 way solve case ; note contains 2 tasks, take one(s) fulfill needs: simple re-create vs total extraction

def installdir = "${builddir}/install" def extractdir = "${builddir}/extract" // task re-create dependencies task copydependencies(type: copy) { configurations.compile installdir } // task extract dependencies task extractdependencies(type: copy) { configurations.compile.collect{tartree (it)} extractdir }

maven gradle

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

SQL Server : need assitance parsing delimted data and returning a long concatenated string -