On Fri, Jun 27, 2014 at 3:31 PM, Benson Margulies <bimargul...@gmail.com> wrote:
> On Fri, Jun 27, 2014 at 10:05 AM, Ian Dickinson <i.j.dickin...@gmail.com> 
> wrote:
>> Actually, now that I've reviewed it, there's a conflict between this
>> patch and the current behaviour. At the moment, the way to set the
>> output directory to something other than target/generated-sources is
>> to set the output configuration parameter. If this is a directory,
>> generated files go into that directory. If that option is set in the
>> defaults section of the schemagen config, it affects all of the
>> generated files. Tl;dr: there is already a mechanism for changing the
>> default output directory for all generated files.
>>
>> Voting to reject this patch until it's clearer why users need two
>> mechanisms for achieving the same end.
>
> So, I'll remove the redundancy, but have I convinced you about the
> problem of it not getting compiled?
Yes, absolutely. I'm not using the plugin day-by-day (I rarely do Java
dev these days, in fact), so direct experience by someone using the
tool definitely takes precedence.

I'm actually not sure what the right solution here is. With the
current mechanism, the output directory can be specified on an
vocabulary-by-vocabulary basis. Any of those locations might already
be in the source tree already (e.g. we support the scenario where
someone generates the .java file directly under src/main/java, so that
the translated file can be kept under source control). So I'm not sure
- and you are in a better position to advise on this - that just
calling addCompileSourceRoot() on each output directory would be
correct.

Perhaps the answer is that the location of the output files should
remain with the current configuration process, but there should be an
additional means, via the pom.xml, to add one or more directories to
the sources root. That could have a default value, so *if* the default
default output is left as target/generated-sources/jena, and *if* the
user doesn't change anything in the pom, then the output Java files
will still compile.

With respect to changing the default, if writing to
target/generated-sources simply doesn't work with Maven 3, then the
change of default will be less intrusive, because presumably people
are not doing that at the moment. I still think it would be worth
raising on users@, to see if anyone would be impacted.

There's enough complexity here that it's probably worth extending the
current set of integration tests to cover this new scenario.

Ian

Reply via email to