facebook

[Closed] Linking projects for build

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #248611 Reply

    QAS
    Member

    Hi,

    I work on a range of internal projects each of which has its own project within my eclipse workspace. One of those projects is called the “common” project, which is a set of classes that all projects should be able to share since they are utilities.

    I’ve never found a way to hook the common project into the build of one of the parent projects. I usually have to use Ant to JAR common up and dump it into the lib of each project, but I don’t like having to do this.

    My ideal situation is to somehow configure any project to include the source of another project, such that when I build that project, it will copy, build and deploy the classes from the common project too.

    Is this possible??

    #248625 Reply

    Riyad Kalla
    Member

    You can make that common project part of the other projects by going to your Java Build Path and Project tab, then adding it as a reference. Then go to your “Project References” setting and check that common project for each project.

    If you do this for a web project, MyEclipse will automatically package and deploy that common project with your web project. If you are just asking about Java Projects, then no, you have to do it manually if you want to “deploy” it.

    #248697 Reply

    QAS
    Member

    Hi,

    That sounds like just the thing, having an issue getting that working though. It’s definately a MyEclipse web project (although is there a way to be 100%?). I added common to my build path project tab, and also to the project references with the checkbox. No dice though on build. I did a new deploy but that didn’t trigger it either.

    Is there anything else to check?

    Thanks for the help

    #248714 Reply

    Riyad Kalla
    Member

    (although is there a way to be 100%?)

    Sure, open your project properties, you should have a “MyEclipse-Web” property panel. Do you see one?

    I added common to my build path project tab, and also to the project references with the checkbox. No dice though on build. I did a new deploy but that didn’t trigger it either.

    Go to the property panel I mentioned above for your web project, and check your Deployment settings. If it’s set to Smart (default) and yo are creating an exploded deployment, it will actually merge the classes into your WEB-INF/classes folder and not JAR and put it into /lib for you; although that is an option if you want to.

    #248717 Reply

    QAS
    Member

    hi, ok yep MyEclipse-Web is there. The deployment stuff however is set to “workspace settings”. I note that when I uncheck this so that I can specify one of the options, the default checkbox is “manually manage” not smart. However, I have unchecked workspace and explictly set Smart on, but the common classes are neither exploded or jarred into the deployment location 🙁

    is there anything else i can do? 🙂

    #248718 Reply

    QAS
    Member

    ooo no, that was a lie. ticking off workspace settings and manually setting smart *does* do the job .. so i guess default is not smart.

    #248719 Reply

    QAS
    Member

    oh and thanks! this is a great feature.

    #248722 Reply

    Riyad Kalla
    Member

    Woops sorry about that, thought it was smart. Glad it is working now.

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

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