> -----Original Message-----
> From: Carsten Ziegeler [mailto:[email protected]]
> Sent: Thursday, May 17, 2012 3:36 PM
> To: [email protected]
> Subject: Re: Parent pom updates
> 
> 2012/5/17 Robert Munteanu <[email protected]>:
> >> -----Original Message-----
> >> From: Carsten Ziegeler [mailto:[email protected]]
> >> Sent: Wednesday, May 16, 2012 11:02 AM
> >> To: [email protected]
> >> Subject: Parent pom updates
> >>
> >> Hi,
> >>
> >> I've updated our parent pom with SLING-2480 and SLING-2481 and I
> would
> >> like to release this in the near future.
> >> If you have anything else which could be changed/added in our parent
> >> pom, now is a good time :)
> >
> > Hi,
> >
> > I don't know if the good time is still on, but I'd like to point that
> the org.apache.sling:sling pom.xml configures m2eclipse to 'execute'
> actions for many plugins:
> >
> > * maven-dependency-plugin:unpack/copy-dependencies
> > * maven-antrun-plugin:run
> > * maven-scr-plugin:scr
> >
> > This is discouraged by the M2Eclipse developers [1] and leads to a
> lot of unnecessary work being done on every project build ( even
> incremental ones ). I've only discovered that by being annoyed by
> Eclipse taking so long to build the projects.
> >
> > If there is still a time window and there is no explicit reason for
> the 'execute' mappings I suggest moving them to 'ignore' in order to
> reduce Eclipse build times.
> >
> Hmm, ok to be honest, I don't know what the best approach is here.
> What does the default eclipse maven build do (= what is it used for)
> and what happens if e.g. the scr annotations are not interpreted?


1. By default M2Eclipse maps a limited number of well-known plugin goals to be 
executed *. If an unknown plugin execution is found in the resources or compile 
lifecycle phase then m2eclipse does not execute it but flags it as an error and 
requires an action:

- install a Eclipse configurator which knowns when and how to execute the maven 
plugin
- manually set the execution as 'to ignore'
- manually set the execution as 'to execute'

Manually setting to execute is reserved for plugins which are stable, known to 
execute fast, do not leak any resources and bring value in an IDE environment 
(leading to the next part)

2. If the scr:scr goal is executed in Eclipse AFAIK it generates the DS XML 
descriptors and rewrites the annotated classes to have the methods specified in 
the XML descriptors ( bind/unbind/activate/deactivate etc ). 

I am not aware of any real situtation where this is needed when working in an 
IDE. All of the time this work is performed when packaging a bundle before 
deployment. 

Robert

* If you're curious to see the m2eclipse mappings open a Eclipe project's 
properties and go to Maven -> Lifecycle Mapping .

Reply via email to