In one project , I have done daml codegen using a set of dars. I have used maven to do codgen.
In another project I used same dars and used daml codegen java .i.e through daml command. Some package id are same , but for few dars package id differ?
I have tried unpacking and comparing dars and they are same.
I am not able to undertand how same dars can produce different package Id. That causes further issues when I am using java classes for migration purpose.
Can someone suggest what can be the issue?
If I understand, you are seeing different package ids listed in the codegen’ed Java code.
Keep in mind that the package id is a property of the package in the DAR. The package id is calculated when the DAR is compiled, not at the time the Java code is codegen’d.
One thing that might help is to use this command to double-check the package ids across your various projects: