Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » JDT launch configuration classpath
JDT launch configuration classpath [message #259441] Wed, 08 April 2009 05:42 Go to next message
Eclipse UserFriend
Hi everyone,

I'm having some classpath problems in one of my projects. Generally I'm
using maven (with m2eclipse) as my build tool. However at some point I still
have to use a "conventional" launch configuration for debugging. What I need
to do is to start debugging from a main method in a test-only-purpose
library which depends on some other libraries. So I put everthing in
/src/test/resources/lib and thought I tell the launch configuration to
include that folder in its classpath. Only problem the classloader would not
find anything from that folder. I also tried adding each library explicitely
to the classpath but to no avail :-(
If I put the liraries in my project classpath everything works just fine.

Anybody got a clue what I'm doing wrong?

thx M;chi
Re: JDT launch configuration classpath [message #259454 is a reply to message #259441] Wed, 08 April 2009 10:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

Are you creating "conventional" launch configuration for m2e Maven
project by any chance? Can you try to reproduce the problem with "plain"
Java project?

FYI, m2e plays some tricks to insure proper Maven classpath is used to
launch applications and tests from Maven projects. You should be able to
get desired test classpath using dependencies with scope=test in pom.xml.

--
Regards,
Igor

M;chi wrote:
> Hi everyone,
>
> I'm having some classpath problems in one of my projects. Generally I'm
> using maven (with m2eclipse) as my build tool. However at some point I still
> have to use a "conventional" launch configuration for debugging. What I need
> to do is to start debugging from a main method in a test-only-purpose
> library which depends on some other libraries. So I put everthing in
> /src/test/resources/lib and thought I tell the launch configuration to
> include that folder in its classpath. Only problem the classloader would not
> find anything from that folder. I also tried adding each library explicitely
> to the classpath but to no avail :-(
> If I put the liraries in my project classpath everything works just fine.
>
> Anybody got a clue what I'm doing wrong?
>
> thx M;chi
>
Re: JDT launch configuration classpath [message #259509 is a reply to message #259454] Thu, 09 April 2009 07:03 Go to previous message
Eclipse UserFriend
Igor Fedorenko wrote:

> Are you creating "conventional" launch configuration for m2e Maven
> project by any chance? Can you try to reproduce the problem with "plain"
> Java project?
tried it and it's the same cheese. I simply imported some library with a
static main method into a fresh Java project, created a Java launch
configuration, added that library to the launch configuration classpath (not
the project classpath) and then tried to find the main class from the "Main"
tab of the launch configuration - but had no luck.
btw. I'm running eclipse 3.5M6
> FYI, m2e plays some tricks to insure proper Maven classpath is used to
> launch applications and tests from Maven projects. You should be able to
> get desired test classpath using dependencies with scope=test in pom.xml.
that does not work with libraries not present in any repository, or is it?
> --
> Regards,
> Igor
>
> M;chi wrote:
>> Hi everyone,
>>
>> I'm having some classpath problems in one of my projects. Generally I'm
>> using maven (with m2eclipse) as my build tool. However at some point I
>> still have to use a "conventional" launch configuration for debugging.
>> What I need to do is to start debugging from a main method in a
>> test-only-purpose library which depends on some other libraries. So I put
>> everthing in /src/test/resources/lib and thought I tell the launch
>> configuration to include that folder in its classpath. Only problem the
>> classloader would not find anything from that folder. I also tried adding
>> each library explicitely to the classpath but to no avail :-(
>> If I put the liraries in my project classpath everything works just fine.
>>
>> Anybody got a clue what I'm doing wrong?
>>
>> thx M;chi
>>
Previous Topic:How to "setDirty" in the CommonNavigator
Next Topic:Breakpoint changes behavior of program?!
Goto Forum:
  


Current Time: Wed Apr 30 04:28:34 EDT 2025

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

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

Back to the top