Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Is m2e ignoring output location set in Eclipse?

This has nothing to do with Android or m2e-android. This happened to me on a web project. Pure maven in Eclipse project which is the main use case for m2e.
It's just that in the classpath file bin/classes was specified for the src output and not target/classes. But m2e silently ignores this and allows to use a different location from the specified one. This seems to be either a bug in m2e or a bug in that no warning is issued if it's considered forbidden that the user can change the entries in the .classpath file.

Why would an entry that has been explicitly be configured by the user be less important then a default value that appears nowhere in the project? That doesn't seem right.

On Wed Dec 31 2014 at 2:23:57 PM Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
This is not a problem in m2e, but expected and desired behaviour.

m2e maintains workspace and command line classes output locations in
sync. This is necessary to make sure that java compiler and
maven-resources-plugins and all other ide builders and maven plugins all
used the same location.

m2e/android tooling appears to introduce deliberate discrepancy between
eclipse workspace and command line build. You need to implement
classifierClasspathProviders to tell m2e about this, otherwise m2e will
use project configuration from MavenProject.

--
Regards,
Igor

On 2014-12-31 5:37, Raphael Ackermann wrote:
> wan't on the list before so cannot properly reply.
>
> This is not an m2e-android issue but looks to be a problem in m2e itself.
>
> Steps to reproduce:
> Have a maven project in Eclipse.
> Build it on the command line with mvn test. Tests pass
> Run the tests in Eclipse. Tests pass.
> Change production code in Ecilpse that would make the tests fail.
> Run the tests in Eclipse. Tests still pass even though they should not
> Clean the project in Eclipse without rebuilding it.
> Run the tests in Eclipse. Tests still get executed and pass even tough
> the project is not built.
> Run the tests on the commandline. --> tests fail.
>
> See comments and log output at
> https://github.com/rgladwell/m2e-android/issues/221#issuecomment-68313050
>
>
> By default m2e indeed uses MavenProject to determine project classes and
> test-classes directories. There is classifierClasspathProviders
> extension point that should allow you to use alternative locations.
>
>
> --
> Regards,
> Igor
>
>
>
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev

Back to the top