Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsServe modules without publishing causing classpath issue
https://www.eclipse.org/forums/index.php/mv/msg/68496/214794/#msg_214794
Originally posted by: jon.barnard.s1.com
I'm trying to run a dynamic web project in Server modules without
publishing mode. The web project has several jar libraries and several
utility projects. One of the utility projects is overwriting a class
definition in one of the jar files. The overwrite works just fine when I
publish the utility projects as a jar.
I did some deep debugging and I see that utility projects are at the end
of the classpath. Is there any way to configure this?]]>2008-06-03T20:16:05-00:00Re: Serve modules without publishing causing classpath issue
https://www.eclipse.org/forums/index.php/mv/msg/68496/214822/#msg_214822
Originally posted by: mauro.molinari.cardinis.com
Jon Barnard ha scritto:
> I did some deep debugging and I see that utility projects are at the end
> of the classpath. Is there any way to configure this?
Try to have a look at the Order and Export tab in the Java Build Path
property page of your project... Maybe it can help.
Mauro.]]>2008-06-04T11:56:09-00:00Re: Serve modules without publishing causing classpath issue
https://www.eclipse.org/forums/index.php/mv/msg/68496/214830/#msg_214830
> Jon Barnard ha scritto:
>> I did some deep debugging and I see that utility projects are at the
>> end of the classpath. Is there any way to configure this?
>
> Try to have a look at the Order and Export tab in the Java Build Path
> property page of your project... Maybe it can help.
>
> Mauro.
I could be wrong, but I'm not sure this will help. I haven't done any
experiments to verify this, and the code isn't easy to understand
completely, so it may be worth a try.
Resources local to the web project are processed first to ensure its
Java classes, which are destined for WEB-INF/classes, appear first,
ahead of anything destined for WEB-INF/lib. This behavior is something
required by the Servlet spec. This does result in jars declared in the
web project appearing ahead of the classes appearing in utility projects.
I'm not aware of any requirement in the Servlet spec relating to the
order of jars in WEB-INF/lib. If you were to export the web project as
a war, I don't think there would be any guarantees about which classes
would override which contained in multiple jars.
However, with "Serve modules without publishing" enabled, if you made
sure the jar needs to be overridden is declared and exported in the
build path of the utility project that contains the overriding classes,
it looks like the classes in that utility project would appear ahead of
that jar. Again, this is based on inspection of the code, which I could
be misunderstanding. Give it a try, if you haven't already. If this
overriding is supposed to happen in the final webapp, you may have
additional deployment issues to resolve.