- This topic has 4 replies, 2 voices, and was last updated 11 years, 1 month ago by support-pradeep.
-
AuthorPosts
-
Chris CranfordParticipantI have setup two maven projects in the same MyEclipse workspace. The first is a simple jar taglib project while the second is a web application. The web application has a pom dependency specified on the tag library and when we package the web application into a war, it packages the jar file in the WEB-INF/lib folder as we expected and the tag library can easily be loaded when the WAR is deployed to the servlet container.
But when I use the Run As MyEclipse Server Application feature to run the web application in a development mode, I notice that instead of using the taglib’s jar from the local repository, the contents of the tag library’s target directory is copied inline to the web application’s deployment structure. The problem is that the tag library’s TLD file isn’t found in this scenario because it gets placed in the WEB-INF/classes/META-INF directory instead and isn’t seen by the container nor do we want to explicitly specify this tag library definition since using production deployment this is a non-issue.
I was curious whether when two projects in the same workspace have a dependency, is it possible that the web application in my case would use the .jar file deployed to the WEB-INF\lib directory rather than copying the adjacent project’s compiled source inline with that of the web application.
[/b]
support-pradeepMemberccranford,
You need to uncheck/disable ‘Enable merged deployment of Utility and EJB modules’ option under ‘Merged deployment of modules’ section in Web Deployment assembly page. By doing so, after the deployment the dependent jar file will be copied to WEB-INF/lib folder instead of copying the compiled source to WEB-INF/classes folder.
Please check the below screenshot for a visual reference –
Let us know how it works for you.
Chris CranfordParticipantYour screen shot doesn’t comply with MyEclipse 10’s screen shot which I have attached to this message.
Attachments:
You must be logged in to view attached files.
Chris CranfordParticipantIt appears for MyEclipse 10, I needed to look at
MyEclipse -> Web -> Deployment TabIn this screen there was a section labeled “Web Project Deployment Policy” which was configured to use the workbench default settings. Selecting the [Configure workspace settings…] options lead me to a screen
MyEclipse -> Java Enterprise Project -> Web Project -> Deployment
On this particular tab there was a section called “Dependent Java Project Deployment Policy” that was originally set to use smart deployment but changing this to jar dependent java project output and place in ‘lib’ directory.
This seemed to do the trick but I’m not sure if there are any ill effects from this setting or whether it’s considered the same from your original screen shot.
support-pradeepMemberccranford,
Sorry for the confusion. The screenshot that was attached in my earlier response was based on MyEclipse 2013.
It appears for MyEclipse 10, I needed to look at
MyEclipse -> Java Enterprise Project -> Web Project -> DeploymentOn this particular tab there was a section called “Dependent Java Project Deployment Policy” that was originally set to use smart deployment but changing this to jar dependent java project output and place in ‘lib’ directory.
For MyEclipse 10.x, the deployment settings should be done in the same way you have mentioned. Performing this change should work for you and will not have any issues.
Our latest version is MyEclipse 2013 SR2. I suggest you give it a try. You can install it alongside your current MyEclipse 10.x. Click here to download the latest version of MyEclipse.
Let us know if you see any other issues.
-
AuthorPosts