|
From: <tre...@us...> - 2007-10-31 13:50:50
|
Revision: 549
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=549&view=rev
Author: trevorolio
Date: 2007-10-31 06:50:49 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
Tracked down a bug in which populate silently failed when source space docs have the same timestamp.
It's no longer silent during failure, but keying files by timestamp is a weak idea since a single cp can (in fact did) break the world.
Modified Paths:
--------------
maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java
Modified: maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java
===================================================================
--- maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java 2007-10-30 03:00:11 UTC (rev 548)
+++ maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java 2007-10-31 13:50:49 UTC (rev 549)
@@ -182,6 +182,9 @@
FileInputStream inputStream = new FileInputStream(candidate);
String docContent = StreamUtils.readInput(inputStream);
SpaceDocument doc = new SpaceDocument(XMLElement.parseElementFromString(docContent));
+ if(localSpaces.get(candidate.lastModified()) != null){
+ throw new MojoExecutionException("Sadly, space-* docs must have unique timestamps.");
+ }
localSpaces.put(candidate.lastModified(), doc);
inputStream.close();
} catch (IOException e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|