OK, for all those interested in using eclipse to develop on Babeldoc
(don't all rush at once ;-)
I assume that you have a working knowledge of eclipse. In addition, you
need to have eclipse 3.0 build M4 or later. Anything earlier will not
work.
1. Open eclipse
2. Make sure that you can see the CVS Repositories View. If you can't,
click Window | Show View | Other ... and select CVS Repositories.
3. The Repositories View will (probably) come up empty. Right click on
the white space, and click New | Repository Location ... Enter all the
repository details (extssh for anybody with a developer account,
otherwise pserver), and click OK.
4. A new entry for the repository will appear. It's the root node in a
tree. Open the tree. Below you should see entries HEAD, Branches and
Versions. If you want to develop on the HEAD, as most core developers
would probably want, open the HEAD node.
5. Right-click on the babeldoc node that appears under the HEAD, and
select Check Out As... A dialog will appear. I used "Check out as a
project configured using the New Project Wizard". This may have created
problems for me further on; if you want to try the "Check out as a
project in the workspace", feel free to let me know how it goes.
6. Complete the New Project Wizard details. I don't think there was
anything special. Just fill it out, and click Finish when you get to
the end.
7. Once the New Project Wizard has finished processing, you should have
a project open in the Java perspective. If not, click on the Add
Perspective button, and add a Java Perspective.
8. Right-click on the project node, and select Properties. Select the
Java Build Path option, and select the Source tab.
9. You should see your project appear with a single (empty) exclusion
filter. Edit the filter, and set it to **, i.e.: exclude all files
(trust me, I'm a programmer), and click OK.
10. Select Add Folder... and add each of the src/ folders. You can
multiselect on the folder selection dialog. For example, you should
open the root node, and then open modules/, and then open babelfish/,
and then select the src/ directory. Then open the conversion/
directory, and select src/ (with the Ctrl button down, this time), and
so on. In the j2ee/ folder, don't forget to add both src/ and gensrc/.
All src/ directories inside modules/ should be added.
11. Now in the Properties dialog, still in the Java Build Path option,
select the Libraries tab. Click Add JARs... and select all the jar
files in build/lib, except for any library beginning with "babeldoc_".
Also add support/ant/lib/ant.jar and support/ant/lib/junit.jar.
12. Now click OK in the Properties dialog. Eclipse will probably spend
a few seconds rebuilding its project information.
You should now have a happy eclipse system showing all the source
modules, and the libraries. Eclipse should not show any errors detected
by the background compiler. However, there will be a stack of
warnings. They can, for the moment, be ignored.
Now to get ant working.
13. In the Java perspective, right-click on build.xml, and select Run
Ant...
14. The Ant dialog will now appear. Click on the Main tab, and ensure
that the Base Directory is set to the project root. It will probably
look something like this: ${workspace_loc:/Babeldoc}
15. Click on the Classpath tab. Uncheck the "Use global classpath as
specified in the Ant runtime preferences". Click Add JARs... and add
support/ant/lib/babeldoc_bootstrap.jar, support/ant/lib/xercesImpl.jar,
and support/jalopy/lib/jalopy-ant-0.6.1.jar, or whatever the current
version is.
16. Click on the JRE tab. Click Alternate JRE, and select one of your
JREs. You should probably set it to something fairly recent. Now, this
is critical. You have to set the Working directory. Uncheck the "Use
default working directory", and select "Workspace". Click Browse... and
select the root node of the project. Click OK. If you don't have a
"Working directory" section on the JRE tab, running ant is not going to
work. If you do not have the working directory section, you need to
upgrade your eclipse to at least version 3.0 build M4. Anything prior
to this, and you're SOL. Sorry.
17. Click Apply.
18. Click on the Targets tab. Select the "build" target, and click Run.
You should now get a Console View appear, and the ant output will be
spooled into the Console View.
Disclaimer: I did this all last night, and everything I've written here
is from memory. I may have left stuff out. If it doesn't work, feel
free to let me know, and I'll try to help out.
Happy eclipsing...
MikeA
|