You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2007/05/15 11:06:59 UTC

Distribution build problems

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

Re: Distribution build problems

Posted by Simon Nash <na...@hursley.ibm.com>.
I'm pleased to say that it's working for me from the branch as well.

   Simon

Simon Laws wrote:

> The distribution build in the release 0.90 branch works fine for me all the
> way through, Very strange!
> 
> Simon
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Distribution build problems

Posted by Simon Laws <si...@googlemail.com>.
The distribution build in the release 0.90 branch works fine for me all the
way through, Very strange!

Simon

Re: Distribution build problems

Posted by Simon Laws <si...@googlemail.com>.
I haven't found a solution to this yet. I involves debugging through the
shader plugin and I have got round to that yet. I have a very ugly and
manual work round that allows me to get on. Here is what I do:

1/ Edit sca/disitribution/pom.xml to remove bundle reactor reference so that
I can do the manual step after the budle build has finished but before the
rest of the distribution build happens

<module>bundle</module> becomes <!--module>bundle</module-->

2/ Run the bundle build

cd sca/distribution/bundle
mvn

3/ The manual step. Copy the shaded jar to the local maven repository

cp sca/disitribution/bundle/target/tuscany-
bundle-1.0-incubating-SNAPSHOT-shaded.jar

.m2/repository/org/apache/tuscany/sca/tuscany-bundle/1.0-incubating-SNAPSHOT/tuscany-
bundle-1.0-incubating-SNAPSHOT.jar

This represents what the bundle build should have done in the first place
and overwrites the empty jar that is put into the local repository
erroneously.

4/ Run the disitribution build

cd sca/disitribution
mvn

Hope this helps

Simon

Re: Distribution build problems

Posted by Simon Laws <si...@googlemail.com>.
I already tried that to no avail :-(

Simon

Re: Distribution build problems

Posted by ant elder <an...@gmail.com>.
On 5/15/07, Simon Laws <si...@googlemail.com> wrote:
>
> 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?


There's a 1.0-alpha-8 version of the shade plugin out now, could you try
that and see if it makes any difference?

   ...ant