开发者

Eclipse not updating dependency JARs in web deployment

In eclipse, I have a project, say ProjectA, which is a dynamic web module. ProjectB is a library used by ProjectA. I have added Projec开发者_JAVA技巧tB to ProjectA's web deployment assembly, with the deploy path /WEB-INF/lib/ProjectB.jar.

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

I have tried the following options Project->Clean... from the main menu, and Clean Module Work Directory... from the server's context menu, but neither works. The only thing that seems to work is deleting the Project, then re-importing it into Eclipse.

Any ideas would be greatly appreciated!

Thanks


Have you checked that Eclipse recognizes ProjectB.jar as a dependency from Project->Properties->Java Build Path? In general, it should show up there. I'm not sure about your exact situation though.


You could check that ProjectB has to be exported as a dependency to ProjectA (Project Properties -> Java Build Path -> Order and Export). This may solve your problem. But since I usually work with an EAR file myself, I may be mistaken.


Is ProjectB exported as part of ProjectA? or does ProjectA refer to ProjectB externally? Seems like you want ProjectB to be part of ProjectA:

Properties -> Java Build Path -> Order and Export 

(make sure ProjectB is exported).

If you use ant build or some other builder, make sure those projects are exported too in the build process as oppose to you manually copy pasting ProjectB into ProjectA's WEB-INF folder.

Also, did you check the "Build Automatically" ? That make sure all projects and any project dependent on them will be re-built.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜