instead of writing ‘compile’ you nee to write ‘configurations.compile.asPath’. one downside atm is that this will trigger the resolve of the compile configuration at configuration time. as a workaround you can move the manifest configuration into a doFirst block
Thank you for your fast reply. I have another question :
I used the asPath and it worked, but I got the absolute jar paths from repository.
Is there a way to customize this ? for example a way to append the jars name to a path prefix which I determine lets say to append the jar names to 'myDir/jars/*.jar ?
hi … plz help me to get out from this problem … i want to create a WAR file … mine is creating … but war file contain only manifest file … other files are not there … i want to include all the jar files and want to create the exact war file for that …here is my code… plz help… i dont know gradle well… simply from net i have taken code and developed this
Sorry, I don’t understand your question. Are you saying that the war file created by the war task does not contain the (jar) files you’re expecting? Apart from declaring a compile dependency on the gradle wrapper file (Usually you don’t need that / can you explain why you have a dependency on the gradle wrapper?) you havn’t declared any dependencies. That’s why no jars end up in your war archive.