Home » Eclipse Projects » Eclipse Platform » nested projects in eclipse?
nested projects in eclipse? [message #330108] |
Tue, 15 July 2008 09:21  |
Eclipse User |
|
|
|
I just checked out a project from a repository and to my astonishment
that project contains nested projects, i.e. there is a .project and
..classfile in the main directory, but there are a couple of
subdirectories that also contain .project and .classpath.
I always thought, that eclipse does not allow to do that and for me,
these currently do not build, either, i.e. I get lots of "package ...
not found" messages for imports and references and in the subprojects I
see "declared package ... does not match the expected package ..." error
messages.
What is the trick to get these nested projects all built automatically,
because (I guess at least...) these projects built fine before they were
archived to the repository. Is there some procedure, setup or an
additional plugin that supports such nested projects and their automatic
(re-)builds?
Michael
|
|
| |
Re: nested projects in eclipse? [message #330110 is a reply to message #330109] |
Tue, 15 July 2008 10:13   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C8E695.AB5AA860
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Paul Webster wrote:
> Eclipse doesn't support nested projects, although that is a feature
> that they are working on for 4.0
>=20
> It might just be storage. Some eclipse projects (at least the top
> level ones in the repository) are simply holders ... when I work with
> them, I select the sub-folders that contains .projects and check them
> out (they then become top level workspace projects). But that's
> really because of how they're stored in CVS, not anything that
> eclipse decided to do.=20
>=20
> PW
Nope - I believe there must be somehow different here.
The projects are store as sketched below (you may want to look this =
using a fixed spaced font):
The subprojects are under the src tree of the main project, i.e.
+ Main
+-+ bin
| + ...
| |=20
+-+ src
| + .project
| | .classpath
| +-+ com
| | +-+ foo
| | | +-+ bar
| | | +- couple of .java files here
| | | +- referencing package yyy(under "SomeDirectory")
| | | ...
| | |
| | + SomeDirectory
| | +-+ .project
| | +-+ .classpath
| | | +-+ bin
| | | | +...
| | | |=20
| | | +-+ src
| | | | +-+ com
| | | | | +-+ xxx
| | | | | | +-+ yyy
| | | | | | +- couple of .java files here=20
| | | | | | +- referencing package bar (in "main" src-directory)
| | | | | | ...
The thing puzzling me is, that there are references between the projects =
*going in both directions*.
I doubt, that the people that had created these projects just stored =
things in the (admittedly rather odd) way. I think (although I can't =
prove it) that they actually built it that way.
Could it be, they had used some other eclipse based product (IBM RAD or =
something else) that allows to structure (sub)projects in this way? I am =
trying to recreate that environment to continue from there. Any ideas or =
comments?
Michael
------=_NextPart_000_000E_01C8E695.AB5AA860
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><LINK href=3D"C:\Program Files\OE-QuoteFix\styles.css" =
rel=3Dstylesheet>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16674" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DCourier size=3D2>Paul Webster wrote:<BR>> Eclipse =
doesn't=20
support nested projects, although that is a feature<BR>> that they =
are=20
working on for 4.0<BR>> <BR>> It might just be storage. Some =
eclipse=20
projects (at least the top<BR>> level ones in the repository) are =
simply=20
holders ... when I work with<BR>> them, I select the sub-folders that =
contains .projects and check them<BR>> out (they then become top =
level=20
workspace projects). But that's<BR>> really because of how =
they're=20
stored in CVS, not anything that<BR>> eclipse decided to do. <BR>> =
<BR>> PW<BR><BR><BR>Nope - I believe there must be somehow different=20
here.<BR>The projects are store as sketched below (you may want to look =
this=20
using a fixed spaced font):<BR><BR>The subprojects are under the src =
tree of the=20
main project, i.e.<BR><BR>+ Main<BR>+-+ bin<BR>| + =
....<BR> | |=20
<BR>+-+ src<BR>| + .project<BR>| | .classpath<BR>| +-+ com<BR>| | +-+ =
foo<BR>| |=20
| +-+ bar<BR>| | | +- couple of .java files here<BR>| |=20
| +- referencing package yyy(under "SomeDirectory")<BR>| |=20
| ...<BR>| | |<BR>| | + SomeDirectory<BR>| | +-+ =
..project<BR>| | +-+=20
..classpath<BR>| | | +-+ bin<BR>| | | | +...<BR>| | | | <BR>| | | +-+ =
src<BR>| |=20
| | +-+ com<BR>| | | | | +-+ xxx<BR>| | | | | | +-+ yyy<BR>| | | | |=20
| +- couple of .java files here <BR>| | | | | | =
+-=20
referencing package bar (in "main" src-directory)<BR>| | | | | =
| =20
....<BR><BR>The thing puzzling me is, that there are references between =
the=20
projects *going in both directions*.<BR>I doubt, that the people that =
had=20
created these projects just stored things in the (admittedly rather odd) =
way. I=20
think (although I can't prove it) that they actually built it that=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>Could it be, they had used some other =
eclipse=20
based product (IBM RAD or something else) that allows to structure =
(sub)projects=20
in this way? I am trying to recreate that environment to continue from =
there.=20
</FONT><FONT face=3DCourier size=3D2>Any ideas or comments?</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_000E_01C8E695.AB5AA860--
|
|
| | |
Re: nested projects in eclipse? [message #330116 is a reply to message #330114] |
Tue, 15 July 2008 12:33   |
Eclipse User |
|
|
|
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:g5ife4$8b9$1@build.eclipse.org...
> Walter Harley wrote:
>
> You mean, that there was some manual step in between? I.e. the projects
> didn't get all rebuilt "in one go" (like after a "build clean") but
> required a couple of manual steps every time? Hm, that might be - I hadn't
> thought about that. Very tedious! I myself would never have done it that
> way...
You might have done it that way if, for instance, it were a bureaucratic
process to get approval for a new top-level directory. E.g., in the Eclipse
organization, I can put more or less whatever I want to in my own plugin
project, but if I want to create a new sibling project, I need to get
approval from a bunch of other people, get the new project created by the
webmaster, add it to the releng scripts, and so forth. For something that's
only going to get built once in a rare while, it's not worth the effort; and
for that matter, the hierarchical organization is the right one anyway, it's
just that the Eclipse editor doesn't support it. (There is an effort afoot
to change that, but it's a big architectural change.)
> What puzzles me most at the moment are these references that go both ways.
> If one really declares that in eclipse one gets "build circles" and
> eclipse (IMHO quite righteous) refuses to build something like that.
It is possible to have project dependency cycles in Eclipse - I think by
default it's forbidden but that can be switched off. Switching it off does
create some challenges for the build, obviously.
> But if one packs stuff up into .jar files and copies those over, then how
> can one then ever be sure, that all these projects remain consistent among
> themselves?
>
> Probably one can't and has to take care of that manually... Very odd setup
> anyway!
I can think of two examples off the top of my head, one being the fact that
the JDT compiler uses a parser generator to generate some source files which
are then checked into version control (not literally a nested Eclipse
project, but still an example of a manual build step that is rarely
necessary) and the other being one of the test files in the APT test
scripts, a jar file that we need to test the ability to load stuff from a
jar - if I recall correctly, somewhere in the APT test project, there's an
archived mini-project to build that jar.
|
|
| | | | |
Re: nested projects in eclipse? [message #330201 is a reply to message #330110] |
Sat, 19 July 2008 13:58  |
Eclipse User |
|
|
|
Originally posted by: igor.ifedorenko.com
This structure looks somewhat similar to multi-module Maven project
imported into eclipse workspace by m2e. I am not sure if you can do this
from UI, but it works programmatically on eclipse 3.2+. I can show you
the code we use, if you're interested.
Michael Moser wrote:
> Paul Webster wrote:
> > Eclipse doesn't support nested projects, although that is a feature
> > that they are working on for 4.0
> >
> > It might just be storage. Some eclipse projects (at least the top
> > level ones in the repository) are simply holders ... when I work with
> > them, I select the sub-folders that contains .projects and check them
> > out (they then become top level workspace projects). But that's
> > really because of how they're stored in CVS, not anything that
> > eclipse decided to do.
> >
> > PW
>
>
> Nope - I believe there must be somehow different here.
> The projects are store as sketched below (you may want to look this
> using a fixed spaced font):
>
> The subprojects are under the src tree of the main project, i.e.
>
> + Main
> +-+ bin
> | + ...
> | |
> +-+ src
> | + .project
> | | .classpath
> | +-+ com
> | | +-+ foo
> | | | +-+ bar
> | | | +- couple of .java files here
> | | | +- referencing package yyy(under "SomeDirectory")
> | | | ...
> | | |
> | | + SomeDirectory
> | | +-+ .project
> | | +-+ .classpath
> | | | +-+ bin
> | | | | +...
> | | | |
> | | | +-+ src
> | | | | +-+ com
> | | | | | +-+ xxx
> | | | | | | +-+ yyy
> | | | | | | +- couple of .java files here
> | | | | | | +- referencing package bar (in "main" src-directory)
> | | | | | | ...
>
> The thing puzzling me is, that there are references between the projects
> *going in both directions*.
> I doubt, that the people that had created these projects just stored
> things in the (admittedly rather odd) way. I think (although I can't
> prove it) that they actually built it that way.
>
> Could it be, they had used some other eclipse based product (IBM RAD or
> something else) that allows to structure (sub)projects in this way? I am
> trying to recreate that environment to continue from there. Any ideas or
> comments?
>
> Michael
>
|
|
|
Goto Forum:
Current Time: Wed Apr 16 11:16:20 EDT 2025
Powered by FUDForum. Page generated in 0.04431 seconds
|