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?

pom.xml is the ultimate source of project configuration truth. Ideally,
we would like to enforce this, i.e. make it impossible for users to
change aspects of eclipse project configuration derived from pom.xml,
but there is no easy way to do this as far as I know. I agree a warning
would be beneficial but, frankly, this is the first time somebody
complained about it, so I am not sure how common this problem is.

--
Regards,
Igor

On 2014-12-31 10:02, Raphael Ackermann wrote:
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
<mailto: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/__m__2e-android/issues/221#__issuecom__ment-68313050
    <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 <mailto:m2e-dev@xxxxxxxxxxx>
     > To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
     > https://dev.eclipse.org/__mailma__n/listinfo/m2e-dev
    <https://dev.eclipse.org/mailman/listinfo/m2e-dev>
     >
    ___________________________________________________
    m2e-dev mailing list
    m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://dev.eclipse.org/__mailma__n/listinfo/m2e-dev
    <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