More Related Content
More from Dmitry Buzdin (20)
Build r
- 3. Step 1. Define project define 'killer-app' do project.version= '0.1.0' end
- 4. Step 2. Add dependencies repositories.remote << 'http://www.ibiblio.org/maven2/' repositories.remote << 'http://maven.alfresco.com/nexus/content/groups/public/’ LIBS = struct( :alfresco_repo => 'org.alfresco:alfresco-repository:jar:labs:2.1.0', :alfresco_core => 'org.alfresco:alfresco-core:jar:labs:2.1.0', :alfresco_remote => 'org.alfresco:alfresco-remote-api:jar:labs:2.1.0', :apache_collections => 'commons-collections:commons-collections:jar:3.1', :apache_beanutils => 'commons-beanutils:commons-beanutils:jar:1.7.0', )
- 5. Step 3. Compile define 'al', :layout => ab_layout do project.version = 1.5 compile.options.target = '1.5' compile.with LIBS end
- 6. Step 4. Package define 'al', :layout => ab_layout do project.version = 1.5 compile.options.target = '1.5' compile.with LIBS package :jar end $ buildr package
- 7. Step 5. Directory structure ab_layout = Layout.new ab_layout[:source, :main, :java] = 'src' ab_layout[:source, :main, :resources] = 'resources' define 'al', :layout => ab_layout do project.version = 1.5 compile.options.target = '1.5' compile.with LIBS package :jar end
- 8. Step 6. Add custom task define 'al', :layout => ab_layout do project.version = 1.5 compile.options.target = '1.5' compile.with LIBS task :run => :compile do system 'java -cp target/classes org.apache.killer.Main' end end
- 9. Step 7. Test define 'al', :layout => ab_layout do project.version = 1.5 compile.options.target = '1.5' compile.with LIBS test.with'commons- ollections:commons- collections:jar:3.2' test.using:testng end
- 10. Step 8. Call java task :generate do p 'calling ant..' Java.org.apache.tools.ant.Main.main( ['-file', 'build.xml', 'generate', '-Dserver=localhost'] ) end