scala/scala — pull request #3061 by retronym (2013-10-20 07:05:24+00:00)
Title: Fix problem assembling sources and docs of modules.

A recent commit added 'overwrite=true' to all usages of the Ant copy task.

This was enough to show up a bug in our dist.src and dist.docs tasks, as was
seen on the Windows build:

Failed to copy:

C:\Users\scala\.m2\repository\org\scala-lang\modules\scala-xml_2.11.0-M5\1.0-RC4\scala-xml_2.11.0-M5-1.0-RC4-javadoc.jar
to

H:\jenkins\workspace\scala-nightly-windows\dists\scala-2.11.0-20131019-064627-8848f24161\doc\scala-devel-docs\C:\Users\scala\.m2\repository\org\scala-lang\modules\scala-xml_2.11.0-M5\1.0-RC4\scala-xml_2.11.0-M5-1.0-RC4-javadoc.jar
...

This commit uses a "flattening" copy to put the JARs directly into
scala-devel-docs.

The Ant docs note [1] this gotcha:

> Note that some resources (for example the file resource) return
> absolute paths as names and the result of using them without
> using a nested mapper (or the flatten attribute) may not be what
> you expect.

These appear to be the only places we fell into the trap:

ack '
1949:
1992:
2007:
2008:

[1] http://ant.apache.org/manual/Tasks/copy.html