0
votes

I am trying to build ear using gradle build and ear is building fine.In my project ejb module is creating multiple custom jar along with ejb jar .How to add them onto ear root directory instead of adding them in lib folder

I am able to include them in ear lib folder but not in EAR root directory

EAR/APP-INF/lib/A.jar should be EAR/A.jar

project(':A-project')
earproject(path: ':A-project',configurations:'provided')
earfiles(project(':A-project').tasks.findByName('ATask'))
2

2 Answers

0
votes

Try adding deploy(A.jar) to your dependencies{} code block. This will create an ejb entry in the application.xml

build.gradle

dependencies {
   deploy(A.jar)
}

Reference

0
votes
dependencies
{
deploy project(path: ':A-Project')//jar files
deploy project(path: ':B-Project',configuration:'archives')//war files
deploy project(project(':C-Project').tasks.findByName("app"))//project in built jars
}