I am migrating a project from Spring to Springboot. Let's call it Project X. Inside it, I am having a class named ClassA. I am also using Apache ANT (we cannot migrate to Maven now). I have managed to create a runnable jar file with ANT using Spring Boot AntLib Module named projectX.jar.
My problem is now Project Y - a project which has a compile dependency of Project X. When I try to compile Project Y with ANT, I have:
<path id="compile.classpath">
<pathelement path="D:\ProjectX\projectX.jar"/>
</path>
Since I have migrated to SpringBoot, the structure of projectX.jar has changed a little bit. Now my classes are under BOOT-INF/classes inside projectX.jar (instead of directly in the root path of projectX.jar). Because of this, Project Y is no longer finding classA.
Error is:
error: cannot find symbol
[javac] import myPackage.classA;
Is there any way to reference those classes by specifying their location inside the jar? What I have tried is:
<path id="compile.classpath">
<pathelement path="D:\ProjectX\projectX.jar\BOOT-INF\classes"/>
</path>
but it doesn't seem to work. I was also thinking about unpacking those classes from ProjectX to disk, reference them from there on ProjectY and then delete them at the end, but this looks like a dirtly solution.
Any help will be highly appreciated.