ant-intellij-tasks<br />Automated build at your fingertips<br />tomer@tomergabel.com<br />http://code.google.com/p/ant-int...
Agenda<br />Mission statement<br />Architecture<br />Customization<br />Overview and limitations<br />Customizing tests<br...
Mission statement<br />Developers typically employ at least three tools:<br />Code editor;<br />Project structure manager ...
Mission statement<br />Keeping two different project structure definitions means:<br />Duplication of effort;<br />Manual ...
Architecture<br />ant-intellij-tasks comprises three components:<br />ant-intellij-tasks.jar - Extends Ant with IntelliJ-I...
Architecture<br />ant-intellij-tasks.jar is an Ant task library primarily capable of:<br />Parsing project (.ipr) and modu...
Architecture<br />common.xml implements the four classic build targets:<br />Clean module output<br />Build module – curre...
Architecture<br />build-all.xml extends the module targets to the entire project<br />Entire codebase can be built with on...
Customization<br />Typically the build is “customized” by tweaking the project settings within IntelliJ IDEA<br />It may, ...
Customization: Tests<br />Maximum heap size can be set with the junit.maxmemory property. (The default is defined by junit...
Customization: Limitations<br />ant-intellij-tasks was designed to resolve IntelliJ IDEA metadata files, and leave most of...
What’s next?<br />Cleanup<br />Better script documentation<br />Better JavaDocs<br />Significant work on test corpus<br />...
Questions, comments and groans are welcome!<br />Visit the project page at http://code.google.com/p/ant-intellij-tasks/ or...
Upcoming SlideShare
Loading in...5
×

ant-intellij-tasks: Automated build at your fingertips

1,974

Published on

An overview of ant-intellij-tasks (an open source, Ant-based build system for IntelliJ IDEA, see http://code.google.com/p/ant-intellij-tasks/).

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,974
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

ant-intellij-tasks: Automated build at your fingertips

  1. 1. ant-intellij-tasks<br />Automated build at your fingertips<br />tomer@tomergabel.com<br />http://code.google.com/p/ant-intellij-tasks/<br />
  2. 2. Agenda<br />Mission statement<br />Architecture<br />Customization<br />Overview and limitations<br />Customizing tests<br />Customizing packaging<br />What’s next?<br />
  3. 3. Mission statement<br />Developers typically employ at least three tools:<br />Code editor;<br />Project structure manager (modules, dependencies and compilation options);<br />Build system<br />In the Java world, the first two are typically handled by the IDE (Eclipse, IntelliJ IDEA etc.)<br />The build system is typically separate, and requires duplicating the project structure in the form of Ant or Maven scripts<br />
  4. 4. Mission statement<br />Keeping two different project structure definitions means:<br />Duplication of effort;<br />Manual synchronization is error-prone;<br />Synchronization issues are often subtle, hard to detect and resolve<br />ant-intellij-tasks is an open source (Apache license) build system which complements IntelliJ IDEA and builds on its project structure.<br />
  5. 5. Architecture<br />ant-intellij-tasks comprises three components:<br />ant-intellij-tasks.jar - Extends Ant with IntelliJ-IDEA-related tasks<br />common.xml - Provides common functionality (e.g. “build module”, “test module” etc.)<br />build-all.xml: A project-wide build script<br />Typically these three are enough to enable automated builds with no further customizations<br />
  6. 6. Architecture<br />ant-intellij-tasks.jar is an Ant task library primarily capable of:<br />Parsing project (.ipr) and module (.iml) files<br />Resolving module build order<br />Per-module resolution of:<br />Source/test directories<br />Source/test output paths (relative, absolute or project-inherited)<br />Classpath<br />Resources<br />
  7. 7. Architecture<br />common.xml implements the four classic build targets:<br />Clean module output<br />Build module – currently only Java is supported<br />Package module - currently only JARs and WARs are supported<br />Test module – currently only with JUnit. Test classes must follow the convention *Test.java, *Tests.java or Test*.java)<br />
  8. 8. Architecture<br />build-all.xml extends the module targets to the entire project<br />Entire codebase can be built with one command:ant –f build-all.xml package<br />Modules are resolved and processed in the correct build order<br />A module can override the default behavior by providing its own build.xml<br />
  9. 9. Customization<br />Typically the build is “customized” by tweaking the project settings within IntelliJ IDEA<br />It may, however, be necessary to additionally customize the build process<br />Typically this is done by adding a custom build.xml to a module directory<br />The four targets (clean, build, test, package) are then delegated to the custom script<br />Set the project-file property to the project file location<br />Override by defining a new target with the same name<br />Call the default script using<antcall target=“common.target” /><br />
  10. 10. Customization: Tests<br />Maximum heap size can be set with the junit.maxmemory property. (The default is defined by junit.maxmemory.default)<br />Pass system properties by prefixing junit.propertiesto the system property name<br /><?xml version="1.0" encoding="UTF-8"?><br /><project><br /> <import file="../libraries/ant/common.xml" /><br /> <target name="test"><br /> <property name="project-file" location="../Delver.ipr" /><br /> <property name="junit.properties.lucene.version" value="2.9-dev" /><br /> <property name="junit.maxmemory" value="128m" /><br /> <antcall target="common.test" /> <br /> </target><br /></project><br />
  11. 11. Customization: Limitations<br />ant-intellij-tasks was designed to resolve IntelliJ IDEA metadata files, and leave most of the heavy lifting to Ant<br />Due to time constraints, this design goal is not always met:<br />Global libraries are not supported<br />Packaged JARs and WARs cannot only be customized by tweaking the packaging instructions or manually manipulating the output<br />
  12. 12. What’s next?<br />Cleanup<br />Better script documentation<br />Better JavaDocs<br />Significant work on test corpus<br />Apache license headers<br />Testing on Linux<br />Optimization<br />Caching parsed modules/projects<br />Reusing build artifacts if they’re up-to-date<br />Reusing build artifacts for packaging<br />
  13. 13. Questions, comments and groans are welcome!<br />Visit the project page at http://code.google.com/p/ant-intellij-tasks/ or send feedback directly to tomer@tomergabel.com<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×