On 1 Dec 2005, at 15:37, Peschier J. (Jeroen) wrote:
My use-case:<x-tad-smaller>Met vriendelijke groeten,
I build an EAR using Maven 2 and the Sun SDK 1.4.2. For testing I tend
to run a few JUnit tests from Eclipse. These tests typically invoke some
remote beans on the application server. This gives me the dreaded
InvalidClassException because the local serialVersionUID differs from
the remote serialVersionUID.
Evalution:
I think most of us dealing with RMI have encountered this problem
before. It is known that different compilers generate different
serialVersionUIDs for the same class. In my case the remote classes are
generated with the Sun JavaC while the local classes are generated by
Eclipse JDT.
Plan:
Although this problem is not actually a Maven 2 issue, I was thinking
Maven 2 could assist in the solution to the problem. The
maven-compiler-plugin has a compilerId setting which seems to indicate
it can be reconfigured to use another compiler. Would it be possible for
M2 to use the Eclipse compiler so that the artifacts will have the same
serialVersionUID as in Eclipse? If so, how would I go about this?
P.S.
I know I can manually add serialVersionUIDs to serializable classes, but
this is not an option as most of my serializable classes are value
objects generated by XDoclet. XDoclet does not have a way of specifying
serialVersionUID for generated value objects.
Jan Dockx
</x-tad-smaller><x-tad-smaller>
PeopleWare NV - Head Office</x-tad-smaller><x-tad-smaller>
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66 </x-tad-smaller><x-tad-bigger>
</x-tad-bigger><x-tad-smaller>
PeopleWare NV - Branch Office Geel</x-tad-smaller><x-tad-smaller>
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25</x-tad-smaller><x-tad-bigger>
</x-tad-bigger><x-tad-smaller>
http://www.peopleware.be/
</x-tad-smaller><x-tad-smaller>http://www.mobileware.be/</x-tad-smaller>
smime.p7s
Description: S/MIME cryptographic signature