Hi,
I am trying to run ejbJar task to create an ejb jar which should include ejb classes plus all the classes on which ejbs are dependent upon.
ant.ejbjar(descriptordir:"$xdocletSrcPath/META-INF",
dependency:“full”,
srcdir:"$sourceSets.ejbJarSrc.output.classesDir",
destdir: “$libsDir”,
naming:“basejarname”,
basejarname:“my-ejb.jar”,
genericjarsuffix:"",
classpath:"$ejbClasspath") {
include(name:"/*ejb-jar.xml")
exclude(name:"/weblogic.xml")
}
Due to property dependency:"full"
it tries to load class org.apache.tools.ant.util.depend.bcel.FullAnalyzer which is not present in gradle-2.11 ( lib folder has only ant-1.9.3.jar and ant-launcher-1.9.3.jar which doesn’t have this file.) and sets property dependency:“full” to dependency:“none” and does not try to look for classes on which my ejbs are dependent upon.
I tried
-
Copying ant-apache-bcel-1.9.3.jar in libs folder which has this class , but ant instance can still not load it and gives warning Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.FullAnalyzer
-
Create a custom config and added a dependency for ant-apache-bcel-1.9.3.jar to it and provided this config.aspath in my ant taskdef but still ant cannot load the class while executing teh task
configurations{
ejbJarConfig
}
dependencies {
ejbJarConfig ‘org.apache.ant:ant-apache-bcel:1.9.3’
}
ant.taskdef( name: ‘ejbJar’,
classname: ‘org.apache.tools.ant.taskdefs.optional.ejb.EjbJar’,
classpath:configurations.ejbJarConfig.asPath)
)
ant.ejbJar(descriptordir:"$xdocletSrcPath/META-INF",
dependency:“full”,
srcdir:"$sourceSets.ejbJarSrc.output.classesDir",
destdir: “$libsDir”,
naming:“basejarname”,
basejarname:“my-ejb.jar”,
genericjarsuffix:"",
classpath:"$ejbClasspath") {
include(name:"/*ejb-jar.xml")
exclude(name:"/weblogic.xml")
}
Can’t get my head around it