You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "christofer.dutz@c-ware.de" <ch...@c-ware.de> on 2011/11/03 09:50:22 UTC

Implementing ModelValidators for Plugins

Hi,



I am currently working on a way to report common configuration problems of the flexmojos plugin. The reason for this ist hat about 99% of the problems users on the mailinglist are having are all related to mis-configurations. 90% of those adress a small hand-full of mistakes. We would like to add configuration-validation to the flexmojos plugin in order to provide some initial help in sorting out the errors.



Which extensionpoints does Maven offer to implement something like this? I found the ModelValidator interface together with its DefaultModelValidator class, but could not find any way to provide custom validation code. It even seems that the normal builder only suports a single instance of a ModelValidator.



As I'm pretty new to plexus, is there a way to configure maven to reconfigure the internal weaving, so I could provide my own CascadingModelValidator?



Help greatly appreciated.

   Chris


[ C h r i s t o f e r  D u t z ]

C-Ware IT-Service
Inhaber
Dipl. Inf. Christofer Dutz
Karlstraße. 104, 64285 Darmstadt

fon:  0 61 51 / 27315 - 61
fax:  0 61 51 / 27315 - 64
mobil:  0171 / 7 444 2 33
email:  christofer.dutz@c-ware.de<ma...@c-ware.de>
http://www.c-ware.de<http://www.c-ware.de/>

UStId-Nr. DE195700962


AW: Implementing ModelValidators for Plugins

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
Hi Thanks for that :-)

Your tip with the "extension" in "lib/ext" was exactly what I was looking for :-)
With this I managed to inject my own ModelValidator that no longer fires warnings for my flexmojos build.

Thanks,
     Chris

[ C h r i s t o f e r  D u t z ]

C-Ware IT-Service
Inhaber
Dipl. Inf. Christofer Dutz
Karlstraße. 104, 64285 Darmstadt

fon:  0 61 51 / 27315 - 61
fax:  0 61 51 / 27315 - 64
mobil:  0171 / 7 444 2 33
email:  christofer.dutz@c-ware.de
http://www.c-ware.de

UStId-Nr. DE195700962

-----Ursprüngliche Nachricht-----
Von: Olivier Lamy [mailto:olamy@apache.org] 
Gesendet: Freitag, 4. November 2011 16:07
An: Maven Developers List
Betreff: Re: Implementing ModelValidators for Plugins

2011/11/3 christofer.dutz@c-ware.de <ch...@c-ware.de>:
> Hi,
>
>
>
> I am currently working on a way to report common configuration problems of the flexmojos plugin. The reason for this ist hat about 99% of the problems users on the mailinglist are having are all related to mis-configurations. 90% of those adress a small hand-full of mistakes. We would like to add configuration-validation to the flexmojos plugin in order to provide some initial help in sorting out the errors.
>
>
>
> Which extensionpoints does Maven offer to implement something like this? I found the ModelValidator interface together with its DefaultModelValidator class, but could not find any way to provide custom validation code. It even seems that the normal builder only suports a single instance of a ModelValidator.
>
>
>
> As I'm pretty new to plexus, is there a way to configure maven to reconfigure the internal weaving, so I could provide my own CascadingModelValidator?
Currently no.
You must load an issue in MNG for that.
Note if you want to add something like that.
It will be an extension so the jar will have to be in $M2_HOME/lib/ext .
>
>
>
> Help greatly appreciated.
>
>   Chris
>
>
> [ C h r i s t o f e r  D u t z ]
>
> C-Ware IT-Service
> Inhaber
> Dipl. Inf. Christofer Dutz
> Karlstraße. 104, 64285 Darmstadt
>
> fon:  0 61 51 / 27315 - 61
> fax:  0 61 51 / 27315 - 64
> mobil:  0171 / 7 444 2 33
> email:  christofer.dutz@c-ware.de<ma...@c-ware.de>
> http://www.c-ware.de<http://www.c-ware.de/>
>
> UStId-Nr. DE195700962
>
>



--
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


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


Re: Implementing ModelValidators for Plugins

Posted by Olivier Lamy <ol...@apache.org>.
2011/11/3 christofer.dutz@c-ware.de <ch...@c-ware.de>:
> Hi,
>
>
>
> I am currently working on a way to report common configuration problems of the flexmojos plugin. The reason for this ist hat about 99% of the problems users on the mailinglist are having are all related to mis-configurations. 90% of those adress a small hand-full of mistakes. We would like to add configuration-validation to the flexmojos plugin in order to provide some initial help in sorting out the errors.
>
>
>
> Which extensionpoints does Maven offer to implement something like this? I found the ModelValidator interface together with its DefaultModelValidator class, but could not find any way to provide custom validation code. It even seems that the normal builder only suports a single instance of a ModelValidator.
>
>
>
> As I'm pretty new to plexus, is there a way to configure maven to reconfigure the internal weaving, so I could provide my own CascadingModelValidator?
Currently no.
You must load an issue in MNG for that.
Note if you want to add something like that.
It will be an extension so the jar will have to be in $M2_HOME/lib/ext .
>
>
>
> Help greatly appreciated.
>
>   Chris
>
>
> [ C h r i s t o f e r  D u t z ]
>
> C-Ware IT-Service
> Inhaber
> Dipl. Inf. Christofer Dutz
> Karlstraße. 104, 64285 Darmstadt
>
> fon:  0 61 51 / 27315 - 61
> fax:  0 61 51 / 27315 - 64
> mobil:  0171 / 7 444 2 33
> email:  christofer.dutz@c-ware.de<ma...@c-ware.de>
> http://www.c-ware.de<http://www.c-ware.de/>
>
> UStId-Nr. DE195700962
>
>



-- 
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


AW: Implementing ModelValidators for Plugins

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
Well ... thanks for the support ... think I'll have to go reading the Source :-(

[ C h r i s t o f e r  D u t z ]

C-Ware IT-Service
Inhaber
Dipl. Inf. Christofer Dutz
Karlstraße. 104, 64285 Darmstadt

fon:  0 61 51 / 27315 - 61
fax:  0 61 51 / 27315 - 64
mobil:  0171 / 7 444 2 33
email:  christofer.dutz@c-ware.de
http://www.c-ware.de

UStId-Nr. DE195700962


-----Ursprüngliche Nachricht-----
Von: christofer.dutz@c-ware.de [mailto:christofer.dutz@c-ware.de] 
Gesendet: Donnerstag, 3. November 2011 09:50
An: dev@maven.apache.org
Betreff: Implementing ModelValidators for Plugins

Hi,



I am currently working on a way to report common configuration problems of the flexmojos plugin. The reason for this ist hat about 99% of the problems users on the mailinglist are having are all related to mis-configurations. 90% of those adress a small hand-full of mistakes. We would like to add configuration-validation to the flexmojos plugin in order to provide some initial help in sorting out the errors.



Which extensionpoints does Maven offer to implement something like this? I found the ModelValidator interface together with its DefaultModelValidator class, but could not find any way to provide custom validation code. It even seems that the normal builder only suports a single instance of a ModelValidator.



As I'm pretty new to plexus, is there a way to configure maven to reconfigure the internal weaving, so I could provide my own CascadingModelValidator?



Help greatly appreciated.

   Chris


[ C h r i s t o f e r  D u t z ]

C-Ware IT-Service
Inhaber
Dipl. Inf. Christofer Dutz
Karlstraße. 104, 64285 Darmstadt

fon:  0 61 51 / 27315 - 61
fax:  0 61 51 / 27315 - 64
mobil:  0171 / 7 444 2 33
email:  christofer.dutz@c-ware.de<ma...@c-ware.de>
http://www.c-ware.de<http://www.c-ware.de/>

UStId-Nr. DE195700962


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