On Fri, Feb 3, 2017 at 10:22 AM Stuart McCulloch wrote:
> Circling back to the original question: yes you can override components in
> recent versions of Maven but there are some caveats. First your component
> must be visible to the plugin (ie be in the same realm or a
On 3 Feb 2017 16:44, "Laird Nelson" wrote:
On Fri, Feb 3, 2017 at 1:15 AM Hervé BOUTEMY wrote:
> notice:@Component we're using in a Mojo is from Maven Plugin Tools
> org.apache.maven.plugins.annotations.Component [1]
>
Right; I (now :-)) understand
Here's a brief overview of the different layers...
Maven plugin annotations are only used at plugin build time to generate
Maven's plugin.xml - they are not used at runtime (at least the container
doesn't use them)
Maven uses this plugin.xml descriptor to setup the plugin in Plexus
(creating the
On Fri, Feb 3, 2017 at 1:15 AM Hervé BOUTEMY wrote:
> notice:@Component we're using in a Mojo is from Maven Plugin Tools
> org.apache.maven.plugins.annotations.Component [1]
>
Right; I (now :-)) understand this part and all of the things related to it.
The part I didn't
On Fri, 03 Feb 2017 12:39:56 +0100, Hervé BOUTEMY
wrote:
Le vendredi 3 février 2017, 10:43:42 CET Robert Scholte a écrit :
What I expect to happen is that Plexus Component Annotations will be
fully
replaced with JSR330 annotations.
In that case there will be only 1
Le vendredi 3 février 2017, 10:43:42 CET Robert Scholte a écrit :
> What I expect to happen is that Plexus Component Annotations will be fully
> replaced with JSR330 annotations.
> In that case there will be only 1 @Component annotation, i.e.
> org.apache.maven.plugins.annotations.Component, which
What I expect to happen is that Plexus Component Annotations will be fully
replaced with JSR330 annotations.
In that case there will be only 1 @Component annotation, i.e.
org.apache.maven.plugins.annotations.Component, which is fine by me.
Also, I expect the community to be more familiar with
notice:@Component we're using in a Mojo is from Maven Plugin Tools
org.apache.maven.plugins.annotations.Component [1]
it's different from @Component from Plexus, which is
org.codehaus.plexus.component.annotations.Component [2]
Using the same class name in a different package is probably a bad
On Thu, Feb 2, 2017 at 1:51 AM Robert Scholte wrote:
> So basically it is still the same issue as a week or so ago: how to select
> a different implementation for an interface.
> Doing this within your code:
> AFAIK that's not possible, and I wonder if even JSR330 supports
So basically it is still the same issue as a week or so ago: how to select
a different implementation for an interface.
Doing this within your code:
AFAIK that's not possible, and I wonder if even JSR330 supports it.
If you don't specify a specific hint (or name), the default implementation
On Wed, Feb 1, 2017 at 1:27 PM Robert Scholte wrote:
> bq. If you want to use JSR-330, you must understand that your code won't
> be compatible with Maven 2 or 3.0.x but only with Maven 3.1.0+
>
> this is probably the reason why *I* haven't seen it used that much.
>
Sure.
bq. If you want to use JSR-330, you must understand that your code won't
be compatible with Maven 2 or 3.0.x but only with Maven 3.1.0+
this is probably the reason why *I* haven't seen it used that much.
Your confusion is probably coming from 2 different descriptors, which both
use
So...sorry, I am still confused. :-( If I look at the Maven and JSR 330
guide, especially with regard to plugins (
http://maven.apache.org/maven-jsr330.html#How_to_use_JSR-330_in_plugins),
then @Component is not used (see line 17 in the code sample). Are you
saying this is a mistake?
I think
@Component works for sure. We're still within the Maven Plugin Context, so
better use the Plugin Annotations.
And yes, you can refer to both Plexus @Component instances and JSR330
@Named instance.
Robert
On Wed, 01 Feb 2017 21:01:10 +0100, Laird Nelson
wrote:
Thanks; yeah, I understand--maybe I don't actually--that there are certain
Maven plugin annotations that get converted into the XML descriptor. But
what about line 52 and following in the link you sent:
1. @Component( role = MyComponentExtension.class,
2. hint = "..." )
3. private
No, plugin annotation are used to generate a plugin descriptor, i.e.
META-INF/maven/plugin.xml
At runtime this file is used to initialize the plugin, whereas the
specified components are injected with sisu/guice
Robert
On Wed, 01 Feb 2017 20:52:19 +0100, Laird Nelson
Thanks. But isn't _that_, in turn, replaced by JSR-330? This is what I'm
confused about.
On Wed, Feb 1, 2017 at 11:26 AM Robert Scholte wrote:
> This is what is used nowadays:
>
> https://maven.apache.org/components/plugin-tools/maven-plugin-tools-annotations/index.html
This is what is used nowadays:
https://maven.apache.org/components/plugin-tools/maven-plugin-tools-annotations/index.html
Robert
On Wed, 01 Feb 2017 19:21:09 +0100, Laird Nelson
wrote:
I apologize in advance for the inarticulate nature of this question.
I have this
JSR330 is supported [1]
JSR250 not yet [2]
-D
http://maven.apache.org/maven-jsr330.html
https://issues.apache.org/jira/browse/MNG-6084 cast your note
On Wed, Feb 1, 2017 at 10:21 AM, Laird Nelson wrote:
> I apologize in advance for the inarticulate nature of this
I apologize in advance for the inarticulate nature of this question.
I have this faint sense that Sisu and Guice are at the core of Maven these
days, with a Plexus layer on top.
This makes me think that perhaps I should be using different annotations in
my maven plugins than @Component etc.
Is
20 matches
Mail list logo