Hi,
I’m adding custom attributes to MANIFEST.MF file and deplomentDescriptor in ear. whichworks as expected when we build via gradle cli, but when I deploy to a server in eclipse it dosen’t generate or deploy the MANIFEST.MF and application.xml files.
Gradle Version:6.5.1
ear module DIR structure
sampleEAR
--META-INF
-MANIFEST.MF
-application.xml
--build.gradle
--settings.gradle
sampleEAR build.gradle file
step-1: referring to META-INF dir
plugins {
id 'ear'
id 'eclipse-wtp'
}
description = "Sample Application"
dependencies{
deploy fileTree(dir: "../SampleEAR", include: 'core*.jar')
deploy project(path: ':SampleWeb', configuration: 'archives')
deploy project(':SampleService')
earlib project(':SampleModel')
}
ear {
metaInf {
from 'META-INF'
exclude 'MANIFEST.MF'
}
manifest {
attributes('Created-By': "Gradle $gradle.gradleVersion",
'version': archiveVersion,
'Built-By': System.getProperty('user.name'),
)
}
}
step-2: generate application.xml via gradle
ear {
deploymentDescriptor {
applicationName = 'Sample'
description = "Generated by Gradle $gradle.gradleVersion"
displayName = project.name
webModule("SampleWeb.war", 'Sample')
}
manifest {
attributes('Created-By': "Gradle $gradle.gradleVersion",
'version': archiveVersion,
'Built-By': System.getProperty('user.name'),
)
}
}
step-3:
ear {
from("META-INF"){
into("META-INF")
}
generateDeploymentDescriptor = false
manifest {
attributes('Created-By': "Gradle $gradle.gradleVersion",
'version': archiveVersion,
'Built-By': System.getProperty('user.name'),
)
}
}
I have tried above 3 steps and it works fine via cli, but not with eclipse IDE.
When deployed to a server in eclipse, it would not create a META-INF content. I need the META-INF content from the src to be deployed via eclipse into ear and deploy if customized via manifest attirbutes or deplomentDescriptor.
Thanks,
Karthik