Generating EJB Clients

We are in the process of migrating maven build to gradle and we are able to build a multi component ear file using the ear gradle plugin. Now we have to generate the EJB client code. I was not able to find any easy way to do it using gradle. Can anybody point me to a ways to generate it using standard gradle plugins. I know that we can write custom plugin to do it. But we want to do away with writing custom plugins and use standard way or gradle provided plugins to achieve the same. Can anybody point me to ways of achieving this.

Thanks in advance.
Prashanth