Build r

797 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
797
On SlideShare
0
From Embeds
0
Number of Embeds
66
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Build r

  1. 1. Building tool of new generation<br />BuildR<br />
  2. 2. BuildR<br />Extension of Rake<br />Apache project<br />
  3. 3. Step 1. Define project<br />define 'killer-app' do <br />project.version= '0.1.0' <br />end<br />
  4. 4. Step 2. Add dependencies<br />repositories.remote << 'http://www.ibiblio.org/maven2/'<br />repositories.remote << 'http://maven.alfresco.com/nexus/content/groups/public/’<br />LIBS = struct(<br /> :alfresco_repo => 'org.alfresco:alfresco-repository:jar:labs:2.1.0',<br /> :alfresco_core => 'org.alfresco:alfresco-core:jar:labs:2.1.0',<br /> :alfresco_remote => 'org.alfresco:alfresco-remote-api:jar:labs:2.1.0',<br /> :apache_collections => 'commons-collections:commons-collections:jar:3.1',<br /> :apache_beanutils => 'commons-beanutils:commons-beanutils:jar:1.7.0',<br />)<br />
  5. 5. Step 3. Compile<br />define 'al', :layout => ab_layout do<br />project.version = 1.5<br />compile.options.target = '1.5'<br />compile.with LIBS<br />end<br />
  6. 6. Step 4. Package<br />define 'al', :layout => ab_layout do<br />project.version = 1.5<br />compile.options.target = '1.5'<br />compile.with LIBS<br /> package :jar<br />end<br />$ buildr package<br />
  7. 7. Step 5. Directory structure<br />ab_layout = Layout.new<br />ab_layout[:source, :main, :java] = 'src'<br />ab_layout[:source, :main, :resources] = 'resources'<br />define 'al', :layout => ab_layout do<br />project.version = 1.5<br />compile.options.target = '1.5'<br />compile.with LIBS<br /> package :jar<br />end<br />
  8. 8. Step 6. Add custom task <br />define 'al', :layout => ab_layout do<br />project.version = 1.5<br />compile.options.target = '1.5'<br />compile.with LIBS<br /> task :run => :compile do <br /> system 'java -cp target/classes <br />org.apache.killer.Main' <br /> end<br />end<br />
  9. 9. Step 7. Test<br />define 'al', :layout => ab_layout do<br />project.version = 1.5<br />compile.options.target = '1.5'<br />compile.with LIBS<br />test.with'commons- ollections:commons- collections:jar:3.2' <br />test.using:testng<br />end<br />
  10. 10. Step 8. Call java<br /> task :generate do<br /> p 'calling ant..'<br />Java.org.apache.tools.ant.Main.main( ['-file', <br /> 'build.xml', 'generate', '-Dserver=localhost'] )<br /> end<br />
  11. 11. Languages<br />Java<br />Scala<br />Groovy<br />Ruby<br />
  12. 12. Other stuff<br />Interactive Shell (JavaRebelsupport)<br />IDE project file generation<br />Cobertura, Emma, Jdepend<br />

×