Eclipse does not update dependency JARs when deploying to the Internet

In eclipse, I have a project like ProjectA, which is a dynamic web module. ProjectB is the library used by ProjectA. I added the ProjectB assembly to ProjectA for web deployment using the deployment path /WEB-INF/lib/ProjectB.jar .

When I deploy ProjectA to the Tomcat v6.0 server, everything works fine. However, if I make any changes to ProjectB, no matter what I do, these changes do not seem to be picked up by the deployment.

I tried the following options Project-> Clean ... from the main menu and Clean Directory Work Directory ... from the server context menu, but it does not work. The only thing that works is to delete the project and then re-import it into Eclipse.

Any ideas would be greatly appreciated!

thanks

+4
source share
3 answers

Have you verified that Eclipse recognizes ProjectB.jar as a dependency on Project-> Properties-> Java Build Path? In general, he should appear there. However, I am not sure about your specific situation.

+1
source

You can verify that ProjectB should be exported as a dependency on ProjectA (Project Properties → Java Build Path → Order and Export). This may solve your problem. But since I usually work with an EAR file, I could be wrong.

0
source

Is ProjectB exported as part of ProjectA? Or does ProjectA reference ProjectB from the outside? Looks like you want ProjectB to be part of ProjectA:

 Properties -> Java Build Path -> Order and Export 

(make sure ProjectB is exported).

If you use the ant construct or some other builder, make sure that these projects are also exported during the build process, since you manually copy the ProjectB insert into the ProjectA WEB-INF folder.

Also have you checked Build Automatically? This ensures that all projects and any project that depends on them will be rebuilt.

0
source

All Articles