Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Compile order
Compile order [message #203448] Fri, 13 May 2005 13:21 Go to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We have a plugin that has two jars in it that we are developing. Is
there any way to tell the incremental compiler to respect the jar order
for interdependencies even though they are in the same project.

The problem we have is when the plugin is actually built using the
standard Eclipse Ant build process, the jars are built in a specific
order. What happens is that if someone is not careful and puts a class
in jar A that references a class in jar B, but jar B is built after jar
A, we get compile errors in the Ant build, but there are no errors in
the incremental build. So the errors aren't caught until late in the
process when we do the builds. We'd like to bring it up closer to
development.

--
Thanks,
Rich Kulp
Re: Compile order [message #203456 is a reply to message #203448] Fri, 13 May 2005 15:04 Go to previous messageGo to next message
Eclipse UserFriend
Are you using 2 source folders, one per JAR ? And would like to constraint
first one to not see second one ?
If so, there is no way to restrain first folder to reach inside the second
during compilation; as the classpath is a project global property.
I would imagine your splitting the 2 source folders in separate projects,
and then yes you could express your dependencies through each project
classpath.
You can even achieve this by having the second project use linked source
folders into the other project, so you can guarantee it to be clean.

Post 3.1, we may investigate finer granularity classpath, but currently this
isn't possible.

"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:d62o8a$kih$1@news.eclipse.org...
> We have a plugin that has two jars in it that we are developing. Is
> there any way to tell the incremental compiler to respect the jar order
> for interdependencies even though they are in the same project.
>
> The problem we have is when the plugin is actually built using the
> standard Eclipse Ant build process, the jars are built in a specific
> order. What happens is that if someone is not careful and puts a class
> in jar A that references a class in jar B, but jar B is built after jar
> A, we get compile errors in the Ant build, but there are no errors in
> the incremental build. So the errors aren't caught until late in the
> process when we do the builds. We'd like to bring it up closer to
> development.
>
> --
> Thanks,
> Rich Kulp
Re: Compile order [message #203464 is a reply to message #203456] Fri, 13 May 2005 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Philippe Mulet wrote:
> Are you using 2 source folders, one per JAR ? And would like to constraint
> first one to not see second one ?

Yes that is correct.

> If so, there is no way to restrain first folder to reach inside the second
> during compilation; as the classpath is a project global property.
> I would imagine your splitting the 2 source folders in separate projects,
> and then yes you could express your dependencies through each project
> classpath.
I can't really split into two projects easily because this is built
through PDE also and it doesn't expect the jars in one plugin to be
built from two different projects. It would be confusing to describe
even if it is possible through some strange magic.

Thanks for the info. Just asking.

> You can even achieve this by having the second project use linked source
> folders into the other project, so you can guarantee it to be clean.
>
> Post 3.1, we may investigate finer granularity classpath, but currently this
> isn't possible.

--
Thanks,
Rich Kulp
Re: Compile order [message #203481 is a reply to message #203464] Sat, 14 May 2005 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Maybe then you could create a sibling project with only one linked source
folder and a reduced classpath.
This project would act as a way to control that no dependencies got
introduced onto the second source folder
(which wouldn't be on the classpath in this extra project).

This is what I do in JDTCore to control that no dependency is introduced
from batch compiler on Eclipse platform code.

"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:d62vdb$sjq$1@news.eclipse.org...
>
>
> Philippe Mulet wrote:
> > Are you using 2 source folders, one per JAR ? And would like to
constraint
> > first one to not see second one ?
>
> Yes that is correct.
>
> > If so, there is no way to restrain first folder to reach inside the
second
> > during compilation; as the classpath is a project global property.
> > I would imagine your splitting the 2 source folders in separate
projects,
> > and then yes you could express your dependencies through each project
> > classpath.
> I can't really split into two projects easily because this is built
> through PDE also and it doesn't expect the jars in one plugin to be
> built from two different projects. It would be confusing to describe
> even if it is possible through some strange magic.
>
> Thanks for the info. Just asking.
>
> > You can even achieve this by having the second project use linked source
> > folders into the other project, so you can guarantee it to be clean.
> >
> > Post 3.1, we may investigate finer granularity classpath, but currently
this
> > isn't possible.
>
> --
> Thanks,
> Rich Kulp
Re: Compile order [message #203613 is a reply to message #203481] Mon, 16 May 2005 12:25 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,

I just took a look out on CVS for org.eclipse.jdt.core and I don't see
two projects. It looks like one project. Is the example you are
describing out on CVS?

Philippe Mulet wrote:
> Maybe then you could create a sibling project with only one linked source
> folder and a reduced classpath.
> This project would act as a way to control that no dependencies got
> introduced onto the second source folder
> (which wouldn't be on the classpath in this extra project).
>
> This is what I do in JDTCore to control that no dependency is introduced
> from batch compiler on Eclipse platform code.
>

--
Thanks,
Rich Kulp
Previous Topic:Unable to access archive ( 3.1 M7 )
Next Topic:M7 JDT Open Type Dialog with multiple projects
Goto Forum:
  


Current Time: Fri Nov 07 06:48:05 EST 2025

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

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

Back to the top