@@ -497,11 +497,11 @@ private void logSummaryOfDuplicates(MultiValuedMap<Collection<File>, String> ove
497
497
int max = 10 ;
498
498
499
499
for (int i = 0 ; i < Math .min (max , all .size ()); i ++) {
500
- logger .warn (" - {}" , all .get (i ));
500
+ logger .warn (" - " + all .get (i ));
501
501
}
502
502
503
503
if (all .size () > max ) {
504
- logger .warn (" - {} more..." , all .size () - max );
504
+ logger .warn (" - " + ( all .size () - max ) + " more..." );
505
505
}
506
506
}
507
507
}
@@ -554,7 +554,7 @@ private void addRemappedClass(
554
554
jos .putNextEntry (entry );
555
555
IOUtil .copy (is , jos );
556
556
} catch (ZipException e ) {
557
- logger .debug ("We have a duplicate {} in {}" , name , jar );
557
+ logger .debug ("We have a duplicate " + name + " in " + jar );
558
558
}
559
559
560
560
return ;
@@ -583,27 +583,28 @@ private void addRemappedClass(
583
583
throw new MojoExecutionException ("Error in ASM processing class " + name , ise );
584
584
}
585
585
586
- String mappedName = packageMapper .map (name , true , false );
587
-
588
586
// If nothing was relocated by ShadeClassRemapper, write the original class, otherwise the transformed one
589
587
final byte [] renamedClass ;
590
588
if (cv .remapped ) {
591
- logger .debug ("Rewrote class bytecode: {} to {}" , name , mappedName );
589
+ logger .debug ("Rewrote class bytecode: " + name );
592
590
renamedClass = cw .toByteArray ();
593
591
} else {
594
- logger .debug ("Keeping original class bytecode: {}" , name );
592
+ logger .debug ("Keeping original class bytecode: " + name );
595
593
renamedClass = originalClass ;
596
594
}
597
595
596
+ // Need to take the .class off for remapping evaluation
597
+ String mappedName = packageMapper .map (name .substring (0 , name .indexOf ('.' )), true , false );
598
+
598
599
try {
599
600
// Now we put it back on so the class file is written out with the right extension.
600
- JarEntry entry = new JarEntry (mappedName );
601
+ JarEntry entry = new JarEntry (mappedName + ".class" );
601
602
entry .setTime (time );
602
603
jos .putNextEntry (entry );
603
604
604
605
jos .write (renamedClass );
605
606
} catch (ZipException e ) {
606
- logger .debug ("We have a duplicate {} in {}" , mappedName , jar );
607
+ logger .debug ("We have a duplicate " + mappedName + " in " + jar );
607
608
}
608
609
}
609
610
0 commit comments