Author: alexsmirnov
Date: 2009-08-14 02:21:49 -0400 (Fri, 14 Aug 2009)
New Revision: 15174
Modified:
root/cdk/trunk/plugins/generator/pom.xml
root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy
Log:
change build configuration to avoid rebuild of the same schema attributes.
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2009-08-14 01:11:58 UTC (rev 15173)
+++ root/cdk/trunk/plugins/generator/pom.xml 2009-08-14 06:21:49 UTC (rev 15174)
@@ -36,7 +36,7 @@
<version>1.0-rc-5</version>
<executions>
<execution>
- <phase>generate-resources</phase>
+ <phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
Modified:
root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy 2009-08-14
01:11:58 UTC (rev 15173)
+++
root/cdk/trunk/plugins/generator/src/main/script/SchemaAttributesParserTask.groovy 2009-08-14
06:21:49 UTC (rev 15174)
@@ -78,11 +78,15 @@
log.info("Writing serialized attributes to: " + outputFileName);
File outputFile = new File(outputFileName);
-
- outputFile.getParentFile().mkdirs();
-
+
if (outputFile.exists()) {
+ File inputFile = new File(sourceSchemaFileName);
+ if(outputFile.lastModified() > inputFile.lastModified()){
+ return;
+ }
outputFile.delete();
+ } else {
+ outputFile.getParentFile().mkdirs();
}
outputFile.createNewFile();
Show replies by date