Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse builder incompatible with m2Eclipse and Maven
    primarykey
    data
    text
    <p>I'm seeing an issue where a given source file built by Maven produces a class file that is different than the one built by Eclipse.</p> <p>The Eclipse builder is optimising away the following method:</p> <pre><code>public SomeClass clone() { SomeClass clone = (SomeClass) super.clone(); return clone; } </code></pre> <p>This method is obviously unnecessary but I don't have the option to change the source because it is generated. </p> <p>Which builder is Eclipse using to compile these classes? I'm using the m2Eclipse plugin which I thought just invoked Maven to perform the build. Why is it that Eclipse then thinks it needs to perform another build with a different builder? Can I disable this Eclipse builder or configure it to prevent optimisation?</p> <ul> <li>Eclipse version: 3.7</li> <li>m2Eclipse version: 1.0.100.20110804-1717 (configured to use external Maven)</li> <li>Maven version: 2.2.1</li> </ul> <p><strong>Update</strong></p> <p>I found an <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=10104" rel="nofollow">Eclipse bug report</a> that describes what is going on. To clarify, its not actually the Eclipse compiler that is removing anything, it is just not introducing a synthetic 'bridge' method that the standard JDK compiler introduces. The bug report is marked as Resolved- Won't Fix. </p> <p>I still haven't found a way to prevent the Eclipse builder from running after the Maven builder has run. But our fix is to modify the code generator to add an explicit serialVersionUID to the generated code.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload