maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Tran <dant...@gmail.com>
Subject Re: How to retrieve list of dependencies user added in the plugin's dependencies configuration
Date Sun, 24 Feb 2013 23:45:34 GMT
I think MojoDecriptor can get me PluginDescriptor. but dont think
${mojo} would give me MojoDescriptor. Null is what I get.

-D

On Sun, Feb 24, 2013 at 2:25 PM, Dan Tran <dantran@gmail.com> wrote:
> what is the class for ${mojo}?
>
> the closest I can get from within my mojo is
> this.getPluginContext(), but this does not lead me to PluginDecriptor
>
> Thanks
>
> -D
>
> On Sun, Feb 24, 2013 at 1:03 PM, Robert Scholte <rfscholte@apache.org> wrote:
>> http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
>>
>> I wasn't aware that this is a M3 only feature, but through ${mojo} you
>> should be able to find the PluginDescriptor too
>>
>> Robert
>>
>> Op Sun, 24 Feb 2013 21:35:09 +0100 schreef Dan Tran <dantran@gmail.com>:
>>
>>
>>> Strange thing happens,
>>>
>>> under maven2 the contents of ${plugin} is empty, ( ie
>>> plugin.getArtifacts() = null ), does it has something to do with me
>>> upgrade to latest mojo-parent?
>>>
>>> Thanks
>>>
>>> -D
>>>
>>> On Sun, Feb 24, 2013 at 10:30 AM, Dan Tran <dantran@gmail.com> wrote:
>>>>
>>>> Thanks Robert, this gives me a good start
>>>>
>>>> -D
>>>>
>>>> On Sun, Feb 24, 2013 at 2:46 AM, Robert Scholte <rfscholte@apache.org>
>>>> wrote:
>>>>>
>>>>> Hi Dan,
>>>>>
>>>>> ${plugin} will return the ProjectDescriptor[1]
>>>>> From here you can get the artifacts or artifactsMap and maybe you could
>>>>> filter on runtime-scoped artifacts.
>>>>> That will probably be good enough most of the time, but it not really
>>>>> reliable (you're not sure if you get only the required artifacts).
>>>>> You could also do the same trick as with docletArtifacts in the
>>>>> maven-javadoc-plugin, but now the plugin is responsible for collecting
>>>>> these
>>>>> artifacts. Because of this the maven-release-plugin is not able to
>>>>> recognize
>>>>> these as dependencies it can't fail the build if these contain
>>>>> snapshots.
>>>>>
>>>>> Robert
>>>>>
>>>>> [1]
>>>>>
>>>>> http://maven.apache.org/ref/current/maven-plugin-api/apidocs/org/apache/maven/plugin/descriptor/PluginDescriptor.html
>>>>>
>>>>> Op Sun, 24 Feb 2013 09:25:02 +0100 schreef Dan Tran <dantran@gmail.com>:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am trying to fix https://jira.codehaus.org/browse/MOJO-1534  need
>>>>>> advice to how achieve the solution mentioned in to topic.
>>>>>>
>>>>>> Very much appreciated.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> -D
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>

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


Mime
View raw message