facebook

Dependent projects not being included as jars

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #343373 Reply

    Chris Cranford
    Participant

    I 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]

    #343394 Reply

    ccranford,

    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.

    #343418 Reply

    Chris Cranford
    Participant

    Your 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.
    #343420 Reply

    Chris Cranford
    Participant

    It appears for MyEclipse 10, I needed to look at
    MyEclipse -> Web -> Deployment Tab

    In 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.

    #343443 Reply

    ccranford,

    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 -> 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.

    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.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Dependent projects not being included as jars

You must be logged in to post in the forum log in