Differences between revisions 2 and 3
Revision 2 as of 2009-01-08 19:10:55
Size: 4430
Comment:
Revision 3 as of 2009-09-20 23:52:06
Size: 4502
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
http://people.apache.org/~adelmelle/fop-intellij-setup/1_checkout.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/1_checkout.png}}
Line 8: Line 8:
http://people.apache.org/~adelmelle/fop-intellij-setup/2b_newrepo_url.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/2b_newrepo_url.png}}
Line 10: Line 10:
http://people.apache.org/~adelmelle/fop-intellij-setup/2c_trunk_checkout.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/2c_trunk_checkout.png}}
Line 12: Line 12:
http://people.apache.org/~adelmelle/fop-intellij-setup/3_destination.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/3_destination.png}}
Line 14: Line 14:
http://people.apache.org/~adelmelle/fop-intellij-setup/3a_destination_opts.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/3a_destination_opts.png}}
Line 16: Line 16:
http://people.apache.org/~adelmelle/fop-intellij-setup/3b_svn_format.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/3b_svn_format.png}}
Line 18: Line 18:
http://people.apache.org/~adelmelle/fop-intellij-setup/3c_checking_out.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/3c_checking_out.png}}
Line 25: Line 25:
http://people.apache.org/~adelmelle/fop-intellij-setup/4a_from_sources.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4a_from_sources.png}}
Line 27: Line 27:
http://people.apache.org/~adelmelle/fop-intellij-setup/4b_name_location.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4b_name_location.png}}
Line 29: Line 29:
http://people.apache.org/~adelmelle/fop-intellij-setup/4c_source_roots.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4c_source_roots.png}}
Line 31: Line 31:
http://people.apache.org/~adelmelle/fop-intellij-setup/4d_libraries.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4d_libraries.png}}
Line 33: Line 33:
http://people.apache.org/~adelmelle/fop-intellij-setup/4e_module_structure.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4e_module_structure.png}}
Line 35: Line 35:
http://people.apache.org/~adelmelle/fop-intellij-setup/4f_finish.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4f_finish.png}}
Line 37: Line 37:
http://people.apache.org/~adelmelle/fop-intellij-setup/4g_creating_project.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/4g_creating_project.png}}
Line 44: Line 44:
http://people.apache.org/~adelmelle/fop-intellij-setup/5b_target_compile.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/5b_target_compile.png}}
Line 47: Line 47:
http://people.apache.org/~adelmelle/fop-intellij-setup/6a_jdk_compatibility.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/6a_jdk_compatibility.png}}
Line 50: Line 50:
http://people.apache.org/~adelmelle/fop-intellij-setup/6b_add_dependencies.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/6b_add_dependencies.png}}
Line 52: Line 52:
http://people.apache.org/~adelmelle/fop-intellij-setup/6d_libs_added.png {{http://people.apache.org/~adelmelle/fop-intellij-setup/6d_libs_added.png}}

Setting up FOP Trunk with IntelliJ IDEA

Checking out

  • Start IntelliJ IDEA and select 'Check out from Version Control'

http://people.apache.org/~adelmelle/fop-intellij-setup/1_checkout.png

  • Create the repository root if it does not exist yet. Setting the root to the 'fop' directory, rather than 'fop/trunk', will allow to reuse the same repository root to check out branches.

http://people.apache.org/~adelmelle/fop-intellij-setup/2b_newrepo_url.png

  • Select the 'trunk' directory, and choose 'Checkout'.

http://people.apache.org/~adelmelle/fop-intellij-setup/2c_trunk_checkout.png

  • Choose the destination directory ...

http://people.apache.org/~adelmelle/fop-intellij-setup/3_destination.png

  • ... and change some other options, if needed. For a standard setup, everything can be left unchanged here.

http://people.apache.org/~adelmelle/fop-intellij-setup/3a_destination_opts.png

  • Choose the Subversion format for the working copy, if applicable (depends on which SVN versions you have installed).

http://people.apache.org/~adelmelle/fop-intellij-setup/3b_svn_format.png

  • Just wait while all files are checked out. Clicking on the status bar at the bottom of the screen will show some details.

http://people.apache.org/~adelmelle/fop-intellij-setup/3c_checking_out.png

Creating the project

Once everything has been checked out, IntelliJ will ask you whether you want to create a new project from it. Choose 'Yes' and...

  • Select 'Create Java project from existing sources'

http://people.apache.org/~adelmelle/fop-intellij-setup/4a_from_sources.png

  • Set project name and location on the filesystem

http://people.apache.org/~adelmelle/fop-intellij-setup/4b_name_location.png

  • When asked to select the source roots, for a basic setup, it suffices to leave only the 'src/java' entry checked. For developers and more adventurous contributors, it may make sense to generate modules for the other locations as well.

http://people.apache.org/~adelmelle/fop-intellij-setup/4c_source_roots.png

  • For the libraries, it is not necessary to include the 'build' set. Those are only referenced by the Ant build file, and not necessary to be able to compile from within IntelliJ. For the 'lib' set, we allow to generate a module library set for convenience. Nothing is added for the rest at this point. Further on, we will need to add some dependencies, but the 'lib' set is enough to get us started.

http://people.apache.org/~adelmelle/fop-intellij-setup/4d_libraries.png

  • Confirm the module structure, ...

http://people.apache.org/~adelmelle/fop-intellij-setup/4e_module_structure.png

  • ... and click 'Finish'

http://people.apache.org/~adelmelle/fop-intellij-setup/4f_finish.png

  • Wait while IntelliJ generates the project.

http://people.apache.org/~adelmelle/fop-intellij-setup/4g_creating_project.png

Initial project setup

Once the project has been generated, there's some smaller tasks to perform before IntelliJ can compile the org.apache.fop package.

  • Use the Ant Build plugin to load FOP's build.xml, and run the 'compile' target. This target will create and compile classes for which the code is generated at build time (font- and event-related classes).

http://people.apache.org/~adelmelle/fop-intellij-setup/5b_target_compile.png

  • When the 'compile' target has been run, we have everything we need to add two necessary dependencies, but there's one other important thing to take care of. Choose 'File->Project Structure'.

  • At the time of writing, FOP still has to remain Java 1.4 compatible, so you will want to modify that now.

http://people.apache.org/~adelmelle/fop-intellij-setup/6a_jdk_compatibility.png

  • Selecting 'Module' will allow to add two missing dependencies: the classes generated by the Ant build (under build/classes), and Apache Ant itself for the org.apache.fop.tools package.
    • Create the dependencies...

http://people.apache.org/~adelmelle/fop-intellij-setup/6b_add_dependencies.png

  • ... and confirm

http://people.apache.org/~adelmelle/fop-intellij-setup/6d_libs_added.png

Note: Upon clicking OK, if the JDK version has changed, IntelliJ will ask you to close and re-open the project now.

Compiling

  • If the above produced no errors/irregularities, then it should now be possible to compile the org.apache.fop package, by selecting it and choosing 'Build->Compile org.apache.fop'.

FOPIntelliJSetup (last edited 2009-09-20 23:52:06 by localhost)