[
https://issues.apache.org/jira/browse/AVRO-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876346#action_12876346
]
Doug Cutting commented on AVRO-150:
-----------------------------------
Unfortunately I think this is a little harder than that. The compiler's
destination is a root directory. If you compile a protocol named org.foo.Bar
then it will generate an interface in org/foo/Bar.java. If that protocol uses
a record named com.baz.Goop then it will also write com/baz/Goop.java. Etc.
If we assume that org.foo.Bar lives in a file named ${src}/org/foo/Bar.avpr,
then we can simply check the dates between that and ${dest}/org/foo/Bar.java,
but I'm not sure whether we should assume that.
An alternative would be to change SpecificCompiler#compileToDestination() to
compare dates and write nothing when the existing file is newer. The
SpecificCompiler still has to parse the input file and generate output, but, if
no new files are written it should prevent subsequent javac and jar processing.
> Ant tasks re-generate code even if it's up-to-date
> --------------------------------------------------
>
> Key: AVRO-150
> URL: https://issues.apache.org/jira/browse/AVRO-150
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.2.0
> Reporter: Doug Cutting
> Attachments: AVRO-150.patch
>
>
> The Ant tasks for Java's protocol and schema should skip generation when the
> generated files are newer than their source.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.