You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Niranjan Rao <nh...@gmail.com> on 2012/02/08 22:26:56 UTC

Maven/M2E and eclipse projects.

Posted this question to stackoverflow first, but then figured chances of 
question read by knowledgeable people is much higher here.

We use maven/m2e/eclipse combo for our work. We start with importing 
master maven pom file in eclipse and our projects get imported. Our 
source control system is set up to ignore eclipse generated project 
files as we don't want to check in anything generated. It all works 
nicely and not problems on this end.

What we would like to do is set up some common eclipse preferences for 
all the projects to ensure standard coding style across all developers 
and follow java best practices. Example is reorganize imports setting in 
eclipse, reformat code when file is saved, and standard line widths (we 
prefer 120 characters as against standard 80 eclipse default)

It seems like m2e can be configured to generate some of these settings 
using project configurator, but could not find any examples.

Any thoughts how we can achieve this functionality? It would be much 
nicer to have project specific entries generated from maven pom 
configuration and everyone will share same settings automatically.

I don't mind writing some code for the m2extension, but I am not 
familiar with eclipse guts and don't know what needs to be done.

With many thanks in advance,



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven/M2E and eclipse projects.

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Niranjan,

> What we would like to do is set up some common eclipse preferences for
all the projects to ensure standard coding style across all developers and
follow java best practices.

What my team does is to export the relevant Eclipse settings as XML, then
commit the files to source control. Each developer must import them
manually once (and again if you change them) but it works reasonably well.

I do not know a better way, because AFAIK these settings are only stored in
Eclipse's .metadata folder outside your project structure, so it is not
clear how to commit the raw config to the VCS. Perhhaps you could write a
shell script to automate it...

HTH,
Curtis

On Feb 8, 2012 3:29 PM, "Niranjan Rao" <nh...@gmail.com> wrote:
>
> Posted this question to stackoverflow first, but then figured chances of
question read by knowledgeable people is much higher here.
>
> We use maven/m2e/eclipse combo for our work. We start with importing
master maven pom file in eclipse and our projects get imported. Our source
control system is set up to ignore eclipse generated project files as we
don't want to check in anything generated. It all works nicely and not
problems on this end.
>
> What we would like to do is set up some common eclipse preferences for
all the projects to ensure standard coding style across all developers and
follow java best practices. Example is reorganize imports setting in
eclipse, reformat code when file is saved, and standard line widths (we
prefer 120 characters as against standard 80 eclipse default)
>
> It seems like m2e can be configured to generate some of these settings
using project configurator, but could not find any examples.
>
> Any thoughts how we can achieve this functionality? It would be much
nicer to have project specific entries generated from maven pom
configuration and everyone will share same settings automatically.
>
> I don't mind writing some code for the m2extension, but I am not familiar
with eclipse guts and don't know what needs to be done.
>
> With many thanks in advance,
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Maven/M2E and eclipse projects.

Posted by Wayne Fay <wa...@gmail.com>.
> We use maven/m2e/eclipse combo for our work. We start with importing master
> maven pom file in eclipse and our projects get imported. Our source control
...
> It seems like m2e can be configured to generate some of these settings using
> project configurator, but could not find any examples.

m2e is a product from the Eclipse Foundation. Please contact them for
your support needs:
http://www.eclipse.org/m2e/

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org