Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] m2e 1.6 M6 to enable automatic update project configuration



On Wed, Mar 18, 2015 at 5:42 PM, Bruno Haible <bruno.haible@xxxxxxxxxx> wrote:
Hi,

> we have decided to turn the workspace preference on by
> default (Preferences > Maven > Automatically update Maven projects
> configuration (experimental))

Does this automatically update only the Maven dependencies in memory?
Or does it also automatically modify the project's .classpath file on
disk?


All project configurators are invoked, followed by a clean build
There's no fine tuning about which configurators are invoked (or not) during automatic configuration.

It doesn't make sense to update the dependencies in memory and not update the classpath : each dependency needs to be added/updated as an individual classpath entry to the Maven classpath library. Changes to the .classpath file are a byproduct of this step.

 
In the latter case, I would like to ask for an option to not update/change
the .classpath files. Like the option
  project > (popup menu) > Maven > Update Project...
  > Update project configuration from pom.xml
allows to avoid modifying .classpath files.

The same command is invoked automatically. That command does not "allow to avoid modifying .classpath files.". Or else you're using a fork of m2e.

Manual classpath entries are supposed to be conserved between update project configurations. I reckon classpath attributes are still problematic though.
 
Rationale: In my team, developers frequently have local modifications of
the .classpath files, for various reasons:
  - To allow Eclipse navigation from project to project, rather than
    from project to maven snapshot. Different team members tweak/optimize

don't commit .classpath to your scm, then each developper can keep his own version locally.


 
    their .classpath files differently.
  - To work around inconsistencies between the m2e generated .classpath
    file and the pom.xml file. See
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=431578

I'd rather review a patch fixing that bug (and that doesn't introduce regressions to m2e) [1] :-)

 
Best regards,
----------------------------------------------------------------------------
Bruno Haible                            Email: <bruno.haible@xxxxxxxxxx>
IBM Deutschland
Wilhelm-Fay-Straße 30-34
65936 Frankfurt am Main
Germany
----------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


[1] https://www.eclipse.org/m2e/documentation/m2e-development-environment.html#submitting-patches

--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top