- This topic has 7 replies, 2 voices, and was last updated 18 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
QASMemberHi,
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??
Riyad KallaMemberYou 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.
QASMemberHi,
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
Riyad KallaMember(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.
QASMemberhi, 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? 🙂
QASMemberooo no, that was a lie. ticking off workspace settings and manually setting smart *does* do the job .. so i guess default is not smart.
QASMemberoh and thanks! this is a great feature.
Riyad KallaMemberWoops sorry about that, thought it was smart. Glad it is working now.
-
AuthorPosts