[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Plugin development: accessing a project's maven coordinates - CONTINUED

2012/4/13 Igor Fedorenko <igor@xxxxxxxxxxxxxx>
You will have to implement this in your code, we can't help from m2e
end. Quick&dirty way is to mark m2e.core dependency as optional in your
bundle manifest and be ready to handle ClassNotFoundError at runtime.

Yeah, the Quick&dirty way should prove sufficient for my needs, thanks for your help!

--
Regards,
Laurent
 

--
Regards,
Igor

On 12-04-13 6:55 AM, Laurent PETIT wrote:
2012/4/13 Igor Fedorenko <igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>


   You need to get new version of the facade each time you need to get
   Maven information about a project.


Last question please : my plugin may or may not be installed with m2e on
my users Eclipse installs.

So I'd like to have a possibility to gracefully downgrade in this case
(I'll probably not just offer the related feature).

But this is asking the question of how could I get the information
without hard dependency ?

Is there a way to ask the project via e.g. an OSGi service which I could
discover at runtime ?


   --
   Regards,
   Igor


   On 12-04-12 7:27 PM, Laurent PETIT wrote:

       Thanks Igor for the quick answer. I continue my questions on the
       m2e-dev
       ml, then.

       So I should use
       MavenPlugin.__getMavenProjectRegistry().__create(project,

       monitor), which will return me an IMavenProjectFacade.

       My next question relates to the expected usage of this facade : am I
       expected to use it and throw it away (requiring a new facade
       next time I
       want to access the project's coordinates) ? Or rather should I
       store it
       for future usage (and thus I imagine it would be always kept up
       to date
       with the project's state by e.g. listening to proper project change
       events) ?

       Thanks in advance,

       -- Laurent


       _________________________________________________
       m2e-dev mailing list
       m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
       https://dev.eclipse.org/__mailman/listinfo/m2e-dev
       <https://dev.eclipse.org/mailman/listinfo/m2e-dev>

   _________________________________________________
   m2e-dev mailing list
   m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
   https://dev.eclipse.org/__mailman/listinfo/m2e-dev

   <https://dev.eclipse.org/mailman/listinfo/m2e-dev>




_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev