frandobs (1) [Avatar] Offline
#1
In chapter 3, the BlogBean.java tries to import the following classes:

import com.xdocletbook.blog.util.BlogUtil;
import com.xdocletbook.blog.value.BlogSimpleValue;
import com.xdocletbook.blog.value.BlogValue;

These classes are missing from the zip file. Where can I get these files?
orb (16) [Avatar] Offline
#2
Re: Chapter 3 Zip File Missing Classes
These are generated by XDoclet when you build the code.
habuma (279) [Avatar] Offline
#3
Re: Chapter 3 Zip File Missing Classes
Specifically, these are generated by the <utilobject> and <valueobject> subtasks of <ejbdoclet>.

It's a chicken-and-egg problem if your IDE is complaining about these classes. In my case, I use Eclipse and it shows little red X's wherever I use these classes. Here's how I deal with it:

First, I setup a "gensrc" source folder (separate from the main "src" source folder) in Eclipse. This is also the destdir of most of my XDoclet tasks/subtasks. To get rid of the red X's, I run the "generate" target of the build, refresh the project in Eclipse, and everybody's happy.

(NOTE: The "clean" target is careful to only remove the contents of "gensrc", not the folder itself, so that Eclipse won't get confused by the "gensrc" folder going away.)

But that's my experience with Eclipse. Your mileage may vary with other IDEs.


Message was edited by: habuma