Difference between revisions of "ANT"

From PCGen Wiki
Jump to: navigation, search
(Building)
(Add notes on fix for out of memory error)
 
Line 25: Line 25:
  
 
NB You can also use ant integration with your IDE (Eclipse and IDEA both support ant out of the box).
 
NB You can also use ant integration with your IDE (Eclipse and IDEA both support ant out of the box).
 +
 +
 +
==Troubleshooting==
 +
If you get out of memory issues, then you need to supply more memory to the JVM running ant. You can do this by setting the ANT_OPTS environment variable to something like
 +
* -DXms=1024M -DXmx=1024M -XX:+UseParallelGC

Latest revision as of 20:51, 13 November 2008

Introduction

PCGen is traditionally built with Ant. Here is how you can run ant:

Install ANT

  1. Get ANT from the Apache Ant site. The current version is just fine.
  2. Unpack it wherever you will.
  3. See the Ant Installation Guide. It basically means that you should add these two environment variables (the example is for Windows, adjust accordingly for other platforms).

ANT_HOME=wherever you unpacked ant, e.g., C:\ant-1.6.5
Add the following to the end of the PATH variable ;%ANT_HOME%\bin

For windows you can set (or update) these through the UI by

  1. Right click on my computer
  2. Select properties
  3. Click advanced and then Environment variables
  4. Under the System Variables list, click New

Building

  1. Open a command line, change to where you fetched PCGen from SVN, and test ant: ant -projecthelp, you should see a large list of targets with descriptions. If all is not well, please refer to the Ant documentation or drop one of the lists a line with your situation.
  2. Build pcgen and run the tests (note that test is the default target for our build.xml ant script): ant, you should see lots of output, hopefully a tests successful at the end. You are now ready to use Ant for command line builds, please see Building PCGen for more details

NB You can also use ant integration with your IDE (Eclipse and IDEA both support ant out of the box).


Troubleshooting

If you get out of memory issues, then you need to supply more memory to the JVM running ant. You can do this by setting the ANT_OPTS environment variable to something like

  • -DXms=1024M -DXmx=1024M -XX:+UseParallelGC