facebook

Dependeicies for web projects [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #225590 Reply

    gcormier
    Member

    I’ve tried searching for this but havn’t come up with anything yet, other then some outdated materials. I found a few forum posts, and also this in the faq

    ·  I used the deployment tool to deploy an app that has project dependencies on X number of other projects, but the dependent projects were not deploy, what is going on?
    
    As of version 2.7/3.7 of MyEclipse, the deployment tool's fundamental function is to recursively copy (and optionally package) the contents of your web root folder and deploy it into the appropriately configured application server. As an added benefit, the deployment tool will also follow linked resources (if any are in use) and deploy the target resources themselves. MyEclipse does not currently support the ability to deploy project dependencies, but it is very high on our priority list as a feature for MyEclipse 2.8.
    Back to top

    I have a plain java project with class files. I’d like to use these also in my web project. Short of constantly exporting my plain project to a jar, is there an automated method to have it included in the WAR, or putting the JAR in the lib folder?

    Thanks,
    Greg

    #225672 Reply

    Riyad Kalla
    Member

    Greg,
    Yes this is supported. Open up your Web Project, go to Java Build Path > Projects and add your Java project on the build path, also go to Project References and check the Java Project. Now unless you changed any of the deployment preferences, you should be all set. The Java project will be JAR’ed into the WEB-INF/lib dir of your deployed web project.

    #225983 Reply

    gcormier
    Member

    Thanks.

    I’ve tried this and it doesn’t work. A custom location packaged archive doesn’t have any JAR file of the project I’m referencing.

    I’m referencing a plain java project. That shouldn’t affect anything?

    I’d like to have a project with my common tools in it. Then I just use that JAR file with various applications I make.

    #225985 Reply

    Riyad Kalla
    Member

    1) Please tell me what version of Eclipse, MyEclipse you are using (both).
    2) Please tell me what all the projects are, their types and how their relationships are setup (tell me how to reproduce this locally)
    3) Tell me HOW the JARs of each project are added on the build path. Are they normal JARs, External JARs, User Libraries, what are they?

    All these little things effect how deployment works, that is why I am asking.

    #225986 Reply

    gcormier
    Member

    Eclipse 3.0.1
    ME 3.8.4

    Project TOOLS
    JAVA Project
    Buiders : Java Builder, Validation
    Build Path : all defaults, nothing added nothing removed
    Project References : nothing selected

    Project SOME_WEB_APP
    Web Application
    Builder : A whole wack of the ME builders
    Build path
    Source is normal
    Projects : Tools is ticked
    Libraries : nothing changed, normal
    Order and Export : tools was NOT ticked, i just ticked it, re deployed, still no JAR
    Project References : tools is ticked

    I never explicitly build a JAR file, this was my original question, perhaps there is a misunderstanding. I want this to be done automatically.

    Thanks,
    Greg

    #225989 Reply

    Riyad Kalla
    Member

    I never explicitly build a JAR file, this was my original question, perhaps there is a misunderstanding. I want this to be done automatically.

    That’s ok, “Smart deployment” will JAR depenent projects for you and deploy them. Please check your Project settings and MyEclipse-Web and the then the deploy tab, make sure you have Workbench defaults checked.

    Then go to WIndow > Prefs > MyEclipse > J2EE > Web Projects > Deployment, what do you have checked here? I might need you to create two sample projects that don’t work and email them to me so I can see what is going on.

    #226036 Reply

    gcormier
    Member

    Bingo.

    The options under MyEclipse, deployment, it doesn’t have the smart deployment selected by default.

    It now includes my JAR for me! Sweet!

    #226037 Reply

    Riyad Kalla
    Member

    Whew, glad it is working now.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Dependeicies for web projects [Closed]

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