I've been looking into TUSCANY-1265 which happens on my machine but not on
others machines. The symptom is that the tuscany-all... jar is empty in the
binary distribution. The cause is that the shader plugin cannot copy its
output (tuscany-bundle-1.0-incubating-SNAPSHOT-shaded.jar) over the to up
the Bundle modules artifact (tuscany-bundle-1.0-incubating-SNAPSHOT.jar). It
tries to do this by first doing a File.delete on the artifact file followed
by a File.rename on the shaded file. The delete doesn't work and hence the
rename fails.

I've tried repeating the shader delete/rename code in a standalone java
program and it works fine so it seems to be some timing problem between Java
and the filesystem  or possibly to do with some garbage collection effect. I
managed to get a similar effect by introducing some maven exec plugin
targets. I tried to delete the artifact using maven exec and this failed as
by the time the exec ran the file didn't exist. Introduce a little delay
with a sleep before the exec and it does find the file. So I'll Google up
any references I can find to do with Maven and timing but in the mean time
does anyone have any ideas?

B.t.w I'm on Windows XP SP2 with an IBM JVM.

Thanks

Simon

Reply via email to