Ant vs maven - class differences

I am working on a project converting programs from ant to maven, and I thought I had successfully completed my first migration, but when I made a comparison in araxis merge, it showed that the .class files were different. I decided that I went in and launched javap and parsed the files of the output class to understand why they appear as different (fortunately, there were only 7 of them). Then I compared the disassembled files and saw that there are many differences. I am confused why these differences exist and will be happy to see if anyone can explain this?

One thing I saw is that the maven version includes these 2 outputs of LineNumberTable and LocalVariableTable, and ant does not:

LineNumberTable:
    line 1207: 0
    line 1208: 5
  LocalVariableTable:
    Start  Length  Slot  Name   Signature
           0       6     0  this   Lbeans/BasicDao;
           0       6     1 password   Ljava/lang/String;

I also see that constant pools are different from numbers, compare:

   #63 = Methodref          #667.#668    //  java/lang/Integer.parseInt:(Ljava/lang/String;)I

at

#63 = Methodref          #552.#553    //  java/lang/Integer.parseInt:(Ljava/lang/String;)I

? !

+4

All Articles