mikewertheim (2) [Avatar] Offline
#1
I've been trying to use xdoclet to generate proxy classes based on some of my java classes. As a starting base, I have been using the transformation aggregation examples in sections 12.2.2 and 12.3.2, which use the "template" subtask.

What I have found is that a Java file with no "package" statement gets transformed just fine. But if a Java file has a package statement (as 99% of them do!), then it is ignored by the template subtask.

Can anyone explain what is going on, and what the workaround is?
orb (16) [Avatar] Offline
#2
Re: Ch 12: why are java files with "package" ignored by the "template" subtask?
Are the classes with packages in the right directories for those packages?
mikewertheim (2) [Avatar] Offline
#3
Re: Ch 12: why are java files with "package" ignored by the "template" subtask?
> Are the classes with packages in the right directories for those packages?


It doesn't seem to make any difference where they are. The java files are in a "src_core" directory that is in the same directory as the build.xml. So one file path might be src_core/com/mycompany/foo/bar/HiMom.java, and its package is com.mycompany.foo.bar. As an experiment, I tried changing the Java file's package line, and no change made it work, other than removing the package line entirely.

It occurred to me that perhaps I needed to add the "src_core" directory to some internal classpath somewhere, but didn't see any way to do that.