maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S. Ali Tokmen" <nos...@alishomepage.com>
Subject Re: Maven2/Maven3 plugin development: Ensuring only the available parameters are allowed
Date Tue, 14 Jan 2014 18:38:20 GMT
Hi Baptiste, Thomas

I guess you all got a point :) The reason why I want to check the
configuration is indeed something that would have to be done in each goal.

My remaining question would be whether there is a way to read the
<configuration> XML definition from the MOJO - I could then manually
implement such a verification in the different MOJOs.

Please advise

Thank you

S. Ali Tokmen
http://ali.tokmen.com/

My IM, GSM, PGP and other contact details
are on http://contact.ali.tokmen.com

On 14/01/14 14:24, Baptiste Mathus wrote:
> Hi,
> Stephen already answered along those lines. What are you missing?
> Cheers
>
>
> 2014/1/9 S. Ali Tokmen <nospam@alishomepage.com>
>
>> Hi Anders
>>
>> Thanks for your reply - and happy new year :)
>>
>> Is there any way I can inject / read the whole plugin configuration from
>> the plugin?
>>
>> Best regards
>>
>> S. Ali Tokmen
>> http://ali.tokmen.com/
>>
>> My IM, GSM, PGP and other contact details
>> are on http://contact.ali.tokmen.com
>>
>> On 08/01/14 20:00, Anders Hammar wrote:
>>> AFAIK there is no support for this. If you think there should be, please
>>> file a ticket [1].
>>>
>>> /Anders
>>>
>>> [1] http://jira.codehaus.org/browse/MNG/
>>>
>>>
>>> On Tue, Jan 7, 2014 at 7:38 PM, S. Ali Tokmen <nospam@alishomepage.com
>>> wrote:
>>>
>>>> Dear Maven users
>>>>
>>>> I am one of the owners of Codehaus CARGO, which has a Maven2/Maven3
>>>> plugin; and would have a question with regards to how parameters are
>>>> managed.
>>>>
>>>> We defined our MOJOs with parameters (you can see
>>>>
>>>>
>> http://svn.codehaus.org/cargo/extensions/trunk/maven2/plugin/src/main/java/org/codehaus/cargo/maven2/AbstractCargoMojo.java
>>>> for example), but what happens is that if a user unwillingly puts a
>>>> parameter in the wrong place then the plugin execution doesn't stop.
>>>>
>>>> As an example, I can write the below POM and build still works (even
>>>> thought the MOJO has no parameter called "foo"):
>>>>
>>>>   <plugin>
>>>>     <groupId>org.codehaus.cargo</groupId>
>>>>     <artifactId>cargo-maven2-plugin</artifactId>
>>>>     <version>1.4.6</version>
>>>>     <configuration>
>>>>       <foo>
>>>>         bar
>>>>       </foo>
>>>>     </configuration>
>>>>   </plugin>
>>>>
>>>> Is there any way I can instruct by MOJO to fail if there is an unknown
>>>> parameter?
>>>>
>>>> Please advise
>>>>
>>>> Thank you
>>>>
>>>> --
>>>>
>>>> S. Ali Tokmen
>>>> http://ali.tokmen.com/
>>>>
>>>> My IM, GSM, PGP and other contact details
>>>> are on http://contact.ali.tokmen.com
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>> --
>> Baptiste <Batmat> MATHUS - http://batmat.net
>> Sauvez un arbre,
>> Mangez un castor ! nbsp;! <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