Baptiste MATHUS wrote:

2008/1/15, spam.to.this <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Dear All,

    I have a strong opinion that m2eclipse should differentiate
    between src/main and src/test, namely that any Java main
    application, started from under src/test (or whatever is
    configured as test sources) should get a test-scoped classpath,
    while any Java main ran from src/main - should be given runtime
    scope classpath by m2eclipse. This kinda of unchartered territory
    as maven cli does not directly run applications.

    Would anyone agree or dis-agree with this as a requirement for
    m2eclipse?


I'm no developer on M2Eclipse, so I could be wrong. But I don't think that m2eclipse does something when you run a Java application application inside an eclipse project. M2Eclipse only defines a "virtual" user-lib that will the project classpath.
I guess, I did not clarify what I meant well enough, sorry. Maven Eclipse plugin, among other things, supplies so called "classpath container" which is interrogated by Eclipse when the latter tries to figure out the classpath.

And what I solicit the input for: a feature in m2eclipse that would check what Eclipse is trying to do - start a src/main class or start src/test class as Java main, and apply "runtime" or "test" scope correspondingly. While adding "provided" scope to either classpath should be optional and controlled by an m2eclipse preference.

I hope this better explains the requirement which, in my opinion, is essential for m2eclipse to successfully rule the world :)

Oleg

I'm not even sure that Eclipse would allow to define a classpath for compilation, and a classpath for executionn and so on as maven does. If Eclipse does, Then M2Eclipse could maybe define many classpath.

But to sum up, I guess it must more an Eclipse problem (if it doesn't already permit this as I guess) than an m2eclipse problem ?

Isn't it ?

Cheers.
--
Baptiste <Batmat> MATHUS
BMathus at Batmat point net - http://batmat.net
Si chacun de nous a une idée et que nous les partageons, nous
repartirons tous les deux avec deux idées... C'est ça le Libre.

Reply via email to