We have enterprise license for Aspose Word and this license file is placed in resources folder
Below code part of static block is used to load license file
License lic = new License();
lic.setLicense(Program.class.getResourceAsStream(“Aspose.Words.Java.lic”));
Our process is triggered from main file and it is working fine when this main class executed from eclipse but when fat jar is built using maven shade plugin, Aspose.Words.Java.lic file in resources folder is replaced with “Aspose.License.BlackList.Real.xml” file and license is not loaded with above code.
When I changed code to below file is loaded into stream but it fail to validate the license as file does not have license information and give NPE
lic.setLicense(Program.class.getResourceAsStream("/resources/Aspose.License.BlackList.Real.xml"));
so i updated the content of Aspose.License.BlackList.Real.xml file with Aspose.Words.Java.lic content within jar and run the process and it is working.
Can someone explain why lic file is changed to “Aspose.License.BlackList.Real.xml” while creating fat jar