Example for doing so
This is an exmple with some custom properties set. You should have a look what exactly you need.
Code Block |
---|
define "test_with_ejbdoclet" do ant("ejbdoclet") do |doclet| doclet.path :id => "project.class.path" do |path| # this is where our libs live path.fileset :dir => "lib/compile" do |fileset| fileset.include :name => "*.jar" end end doclet.taskdef :name => "ejbdoclet", :classname => "xdoclet.modules.ejb.EjbDocletTask", :classpathref => 'project.class.path' doclet.ejbdoclet :destdir => "src-generated", :mergedir => "templates", :ejbspec => 2.1, :force => true, :verbose => true do |doc| doc.fileset :dir => "src/java" do |fileset| fileset.include :name => "**/*Bean.java" end # this fuckr needs special treatment, cause it uses a minus in its name doc.send :"service-endpoint", :pattern => "{0}Endpoint" doc.remoteinterface :templateFile => "yourlocation/remoteIF.xdt" doc.localinterface() doc.homeinterface :templateFile => "yourlocation/homeIF.xdt" doc.localhomeinterface doc.valueobject :templateFile => "yourlocation/valueobject.xdt" doc.entitypk :templateFile => "yourlocation/entitypk.xdt" doc.entitycmp :templateFile => "yourlocation/entitycmp.xdt" doc.entitybmp doc.session doc.dao doc.utilobject :cacheHomes => "true", :templateFile => "yourlocation/util.xdt" doc.deploymentdescriptor :destdir => "build/META-INF", :validatexml => true, :mergedir => "src-merge" doc.jboss :version => 4.0, :unauthenticatedPrincipal => "nobody", :xmlencoding => "UTF-8", :destdir => "build/META-INF", :mergeDir => "config/jboss/merge", :validatexml=>false, :preferredrelationmapping=>"relation-table", :removeTable => false, :createTable =>false, :datasource =>"java:/your_datasource", :datasourceMapping => "Oracle8ForExample" end end end |