I am currently working on a Java EE project. I have successfully developed a web service and deployed it under the build-in Apache server of Eclipse, for test purpose.
I have now split my project into 2 projects : A master one and a dependency one (let's say "Utils"). When developing, eclipse doesn't complain about compilation problems, since I have added the "Utils" project as a dependency in my "build path" setup.
However, when launching Tomcat (as a embedded server), it complains about not finding the classes of "Utils" project.
I was expecting eclipse to copy the "Utils/bin" into WebContent/WEb-INF/classes, but it does not. How do I automate that ? So that "Utils/bin" gets deployed into the WebFolder whenever a change occurs ?
FYI, I do not use Maven yet (but I plan to).
Thanks in advance for your help, Kind regards,
Raphael
Ross' answer put me on the right track, but in Eclipse Helios I couldn't find the Java EE Module in my dynamic web project.
Instead I found the way to add dependencies so they are built into the correct location was under the project's Properties -> Deployment Assembly, and from there I could add archives via path variable, from the file system, or from the workspace, as well as from a folder, a build path entry, or another project.
You can do this by adding the Utils project as a module to your 'Master' project. I assume the master project is a web or ear application. Right click on the project -> properties -> Java EE module Dependencies. Add the Utils project to it. Eclipse will include the Utils project in the deployment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With