Peter Niederwieser wrote:
>
> The following should do the job:
>
> manifestClasspath << clientJar.archivePath
>
> Cheers,
> Peter
>
I tried that but get the following error:
Cause: No signature of method:
org.gradle.api.internal.file.CompositeFileCollection$2.leftShift() is
applicable for argument types: (java.io
.File) values: [D:\workspace-trunk\uwm\core\build\libs\core_client.jar]
//create a client jar
task clientJar(type: Jar, dependsOn: classes) {
from sourceSets.main.classesDir
include clientJarInclude
include '**/shared/openadaptor/OpenAdaptorDataTypeEnum.class',
'**/shared/importExport/xml/XMLImporterExporterConstants.class',
'**/shared/progress/api/archouse/*Exception.class',
'**/shared/*Exception.class', '**/shared/importExport/xml/*Exception.class',
'**/shared/client/**'
exclude clientJarExcludeList
baseName = 'core_client'
}
manifestExclusions = ['main', 'appserv-rt.jar', 'expression.jar',
'j2ee.jar', 'quartz.jar', 'xml_utils.jar']
manifestClasspath = sourceSets.main.runtimeClasspath.filter {
it.isFile() && !(it.getName() in manifestExclusions) }
manifestClasspath << clientJar.archivePath
//use doFirst so manifest added at execution time rather than
configuration time (at configuration time some of the JAR's haven't been
built)
jar.doFirst {
manifest {
attributes(
"Class-Path": manifestClasspath.collect { File file ->
file.name }.sort().join(' ') )
}
}
--
View this message in context:
http://gradle.1045684.n5.nabble.com/adding-clientJar-to-manifest-classpath-of-Jar-tp3344182p3346195.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