Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Test claspath in Eclipse x Maven CLI

>> Create a launch for a main class where I would like to in some cases run with runtime classpath and in others with testscope.
> 
> I understand what you want to do, but I want to understand why you want
> to do it. Do you have a real-life example where you'd need to switch
> between runtime and test scope for a main class?

To basically debug/rule-out classpath problems with use of eclipse directly instead of via maven.

>> Also for being able to use a mvn classpath for other things in eclipse where a classpath can be used. i.e. hibernate query execution.
> 
> What stops you from doing this now? You probablyu need special launch
> configuration for hibernate query execution and
> IClasspathManager#getClasspath lets clients choose between runtime and
> test classpath already.

Why should hibernate tools become dependent on m2e to allow users configuring its eclipse classpath ?

/max

> 
>> 
>> -max
>> 
>>> 
>>> I think for tests we have to use test scope to make sure results are
>>> comparable to command line build. So this leaves application main class
>>> launches, and I can't think of a scenario when using different scope
>>> would be required.
>>> 
>>> --
>>> Regards,
>>> Igor
>>> 
>>> On 11-07-12 6:14 PM, Max Rydahl Andersen wrote:
>>>> On the topic of classpath's in m2e - is there a reason why the maven classpath container does not
>>>> have an option to select which scope one wants for a specific launch?
>>>> 
>>>> /max
>>>> 
>>>> On Jul 7, 2011, at 01:25, Igor Fedorenko wrote:
>>>> 
>>>>> Expected runtime classpath is documented in [1]. If this does not match
>>>>> observed behaviour when using clean m2e 1.0 install, please open a
>>>>> bugreport and provide sample project and steps to reproduce the problem.
>>>>> 
>>>>> [1] https://docs.sonatype.org/display/M2ECLIPSE/Runtime+classpath
>>>>> 
>>>>> --
>>>>> Regards,
>>>>> Igor
>>>>> 
>>>>> On 11-07-07 1:17 AM, Daniel Serodio (lists) wrote:
>>>>>> How can I use the same test classpath both for running JUnit tests from
>>>>>> within Eclipse and for running "mvn test" from the commandline?
>>>>>> 
>>>>>> Currently, when I run JUnit tests from Eclipse it loads resources from
>>>>>> src/main/resources instead of src/test/resources.
>>>>>> 
>>>>>> I'm using Maven 2.2.1, Eclipse 3.6.2 and m2e 0.12
>>>>>> 
>>>>>> Thanks in advance,
>>>>>> Daniel Serodio
>>>>>> _______________________________________________
>>>>>> m2e-users mailing list
>>>>>> m2e-users@xxxxxxxxxxx
>>>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>>> _______________________________________________
>>>>> m2e-users mailing list
>>>>> m2e-users@xxxxxxxxxxx
>>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>> 
>>>> /max
>>>> http://about.me/maxandersen
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> m2e-users mailing list
>>>> m2e-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>> _______________________________________________
>>> m2e-users mailing list
>>> m2e-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>> 
>> /max
>> http://about.me/maxandersen
>> 
>> 
>> 
>> _______________________________________________
>> m2e-users mailing list
>> m2e-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users

/max
http://about.me/maxandersen





Back to the top