Transformer does not need the old or new packages on the classpath to transform. It uses the information in the transformation rules to determine the mapping from old package names to new package names and
 processes the class files in the artifact being transformed. This is primarily done by mutating the constant pool in the class file to use the new names instead of the old names. 
  
 
BJ Hargrave 
Senior Technical Staff Member, IBM // office: +1 386 848 1781 
Open Source Development // mobile: +1 386 848 3788 
hargrave@xxxxxxxxxx 
  
 
 
  
  
From:
transformer-dev <transformer-dev-bounces@xxxxxxxxxxx> on behalf of jan luehe via transformer-dev <transformer-dev@xxxxxxxxxxx> 
Date: Thursday, April 11, 2024 at 06:25 
To: transformer-dev@xxxxxxxxxxx <transformer-dev@xxxxxxxxxxx> 
Cc: jan luehe <janluehe@xxxxxxxxx> 
Subject: [EXTERNAL] [transformer-dev] Question about package rename scope 
 
Is my assumption correct that in order for the transformer to be able to apply the package rename rules at https: //github. com/eclipse/transformer/blob/main/org. eclipse. transformer. jakarta/src/main/resources/org/eclipse/transformer/jakarta/jakarta-renames. properties,
 
 
This Message Is From an External Sender
 
 
This message came from outside your organization.
 
 
 
 
For example, if the hosting app still has jakarta.servlet-api-4.0.4.jar (which provides the "old" javax.servlet) on its class path, then the rename rule from javax.servlet to jakarta.servlet
 will fail.  
 
In other words, only class references to "currentPackageName" will be renamed (e.g, "Foo implements javax.servlet.Servlet"), but not the class definitions themselves ("package
 javax.servlet; public interface Servlet { ... }"). 
 
Could you please confirm? Thank you! 
 
 
 
 
 
 |