Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Migrating Projects to Eclipse
Migrating Projects to Eclipse [message #171006] Thu, 14 September 2006 15:21 Go to next message
Eclipse UserFriend
Originally posted by: mwood.api.com

I need some help migrating our Java projects from JBuilder to Eclipse as
part of an evaluation. We have an existing structure that works very well
for us with ant and JBuilder but I can't understand how to get Eclipse to
integrate with it.

I have read the user's guide, read the FAQs, and tried the plugins to no
avail. Maybe someone has an idea that will help.

Our projects are comprised of an in-house framework + applications which
reside in the same source code tree. The framework is shared across 5
different released products. The source code root looks like this:

src/com/api/

frome there it is separated into:
com/api/applications/ // all applications reside within here
com/api/applications/app1/ // code for product "app1"
com/api/applications/app2/ // code for product "app2"

and our framework (small subset):
com/api/framework
com/api/framework/image // framework code associated with images
com/api/framework/util // utility code

Our framework is built as a project distributed as one or more jars files
and our application is built and released as separate jar file.

We create two projects for each application
- Application project which only includes the application sub-package:
com.api.application.app1 - used by ant script for building release -
Development project which includes application package + framework - used
by developer (doesn't use jar files, just classes)

I have failed to figure out how to get Eclipse to recognise and build only
a subset of packages (or files). When I create a project and ask it to
import code or I define the source code location it wants to pull in
EVERYTHING with no options for excluding items.

Can anyone help me with this?

Thank you,

Mike
Re: Migrating Projects to Eclipse [message #171495 is a reply to message #171006] Mon, 18 September 2006 23:08 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Mike Wood wrote:
> I need some help migrating our Java projects from JBuilder to Eclipse as
> part of an evaluation. We have an existing structure that works very
> well for us with ant and JBuilder but I can't understand how to get
> Eclipse to integrate with it.
>
> I have read the user's guide, read the FAQs, and tried the plugins to no
> avail. Maybe someone has an idea that will help.
>
> Our projects are comprised of an in-house framework + applications which
> reside in the same source code tree. The framework is shared across 5
> different released products. The source code root looks like this:
>
> src/com/api/
>
> frome there it is separated into:
> com/api/applications/ // all applications reside within here
> com/api/applications/app1/ // code for product "app1"
> com/api/applications/app2/ // code for product "app2"
>
> and our framework (small subset):
> com/api/framework
> com/api/framework/image // framework code associated with images
> com/api/framework/util // utility code
>
> Our framework is built as a project distributed as one or more jars
> files and our application is built and released as separate jar file.
>
> We create two projects for each application
> - Application project which only includes the application sub-package:
> com.api.application.app1 - used by ant script for building release -
> Development project which includes application package + framework -
> used by developer (doesn't use jar files, just classes)
>
> I have failed to figure out how to get Eclipse to recognise and build
> only a subset of packages (or files). When I create a project and ask it
> to import code or I define the source code location it wants to pull in
> EVERYTHING with no options for excluding items.

My current work has a setup like this, and I've done it several times
before, too. My organization style has it like so:

I create a separate project for the "common" stuff (framework, in your
case). In my situations, that is usually a separate CVS module (or
whatever equivalent your SCM tool provides). Then, each application or
product Project depends on the "Common" one. The "Common" one also has
an Ant script that can be used to build a JAR of just the common stuff
when needed (for example when deploying the app).
If all your code is rooted at the same place (for example, shares the
src/ directory as the root), then you have to configure the various
projects to include/exclude the appropriate source subdirectories for
that project. When you edit the Project properties, the Java Build Path,
Source tab has the ability to apply include/exclude filters to each
source location. It should be fairly obvious from the UI, but if you
have further questions feel free to ask.

The key is that you can set up Eclipse projects to depend directly on
the framework project for development (no JAR building is needed) but
for runtime you'll want Ant scripts to build the framework/common JAR(s)
and deploy them to the correct place so that the product/application
code can access them during runtime. It is always a good idea to have
build scripts for the "authoritative" builds anyway, regardless of your
development set-up.

--
Hope this helps,
Eric
Previous Topic:Any risks to Eclipse 3.1.2 instance by installing 3.2?
Next Topic:Debugger stops working when calling static function
Goto Forum:
  


Current Time: Thu Apr 25 08:05:25 GMT 2024

Powered by FUDForum. Page generated in 0.07924 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top