On Mon, Jan 11, 2010 at 12:25 PM, Mark Hobson <[email protected]> wrote:
> Thanks for the info guys, just trying to understand what's happening here. > > I've just looked at the ant task [1] and the original bug [2] for > adding apt to ant. Their discussion of the 'preprocessdir' parameter > in the bug comments has clarified the somewhat confusing distinction > between -d and -s in the JDK documentation [3]. To emphasize: > > -d = directory for processor generated *resource* files (and compiled > class files, but we never generate any since we always specify > -nocompile) > -s = directory for processor generated *java* files > > I assume that these locations correlate to CLASS_TREE and SOURCE_TREE > respectively in com.sun.mirror.apt.Filer.Location. All the current > tests generate text files in the -s SOURCE_TREE, which now seems wrong > as they should be placed in the -d CLASS_TREE. > > So in light of all this, I think we need to: > > 1) change the plugin's outputDirectory parameter to set -d instead of -s > 2) add a sourceOutputDirectory parameter to explicit set -s > 3) add a test for sourceOutputDirectory > > Does this match everyone's understanding of apt? > > Re 1, no. Just changing -s to -d fails 16 unit tests on my system - just confirmed. Keeping -s and -d pointing to same directory does work fine ( as in patch). It seems both must be set - or perhaps I am being fooled since just -s is working at the moment too - ugh. Seeing a unit test that sets -s and -d to different values for the right reason using that additional config you mention would be a good idea. It may be a little confusing but look at my earlier post<http://jira.codehaus.org/browse/MOJO-1478?focusedCommentId=203259&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_203259>to see the hoops I went through testing it. I am bothered by using the cmd line, Ant and this plugin yielding differing results on same platform. Thanks, Peter > >
