/ Published in: Groovy
Builds EJB Jar using AntBuilder
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
package com.sb.build.tool /*** * Builds a EJB Project into corresponding jar * @author sankarsan * */ class EJBBuilder { EJBBuilder(ant){ } /*** * Builds a EJB Project given the project/EJB name * @param name * @return */ { ant.delete(dir:buildroot) ant.delete(dir:distdir) println "Step2. Creating directories" ant.mkdir(dir:buildroot) ant.mkdir(dir:classdir) ant.mkdir(dir:metainfdir) ant.mkdir(dir:distdir) println "Step3. Copy META-INF contents" ant.copy(todir: metainfdir) { fileset(dir : confdir); } println "Step4. Compiling Classes" ant.javac( srcdir:sourcedir, destdir:classdir, classpath:classpath, includeantruntime:false ) println "Step5. Creating EJB Jar" ant.jar( compress:true, jarfile:distdir + name + ".jar", manifest:metainfdir + "\\MANIFEST.MF" ){ fileset(dir:classdir) } } }
URL: ejbbuilder