You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dünnebeil Gerhard <Ge...@ait.ac.at> on 2012/07/26 10:26:59 UTC

A plugin to check the pomfiles for certain standards?

Hello everybody,

I am looking for a plugin that tests the pom-files of a project to adhere to certain standards.
The reason behind is that I want/need to enforce certain rules About the project layout (like URLK set/not set, scm links present, ...) for all colleagues that work on the same set of artifacts.

Is something like that available?

Best regards
Gerhard


RE: AW: A plugin to check the pomfiles for certain standards?

Posted by Martin Gainty <mg...@hotmail.com>.
Standards can be defined at system level (with a JSR)
or perhaps at the project level (at the pom)
You might want to take a look at writing a custom-rulehttp://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.htmlwhich throws EnforcerRuleException add the rule as a dependency of maven-enforcer-plugin     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0-beta-1</version>
        <dependencies>
          <dependency>
            <groupId>custom-rule</groupId>
            <artifactId>custom-rule-sample</artifactId>
            <version>1.0</version>
          </dependency>
        </dependencies>
        ...
      </plugin>   
then determine if EnforcerRuleException thrown from the custom-rule will fail the build   <configuration>
          <rules>
            <myCustomRule implementation="org.apache.maven.enforcer.rule.MyCustomRule">
              <shouldIfail>true</shouldIfail>
            </myCustomRule>
          </rules>
        </configuration>

Mit freundlichen Grüßen
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > Date: Sun, 29 Jul 2012 07:49:08 +0200
> Subject: Re: AW: A plugin to check the pomfiles for certain standards?
> From: mfriedenhagen@gmail.com
> To: users@maven.apache.org
> 
> Hello!
> 
> There are additional rules available called extra-enforcer-rules at
> mojo.codehaus.org.
> 
> Regards Mirko
> -- 
> Sent from my mobile
> 
> Am 27.07.2012 07:56 schrieb "Dünnebeil Gerhard" <
> Gerhard.Duennebeil@ait.ac.at>:
> 
> Thanks,
> 
> this looks close to what I was looking for.
> I will need custom rules though but it seems to be a good starting point.
> 
> Best regards
> Gerhard
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Wayne Fay [mailto:waynefay@gmail.com]
> Gesendet: Donnerstag, 26. Juli 2012 15:49
> An: Maven Users List
> Betreff: Re: A plugin to check the pomfiles for certain standards?
> 
> 
> > I am looking for a plugin that tests the pom-files of a project to
> > adhere to certain standards...
 		 	   		  

Re: AW: A plugin to check the pomfiles for certain standards?

Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello!

There are additional rules available called extra-enforcer-rules at
mojo.codehaus.org.

Regards Mirko
-- 
Sent from my mobile

Am 27.07.2012 07:56 schrieb "Dünnebeil Gerhard" <
Gerhard.Duennebeil@ait.ac.at>:

Thanks,

this looks close to what I was looking for.
I will need custom rules though but it seems to be a good starting point.

Best regards
Gerhard


-----Ursprüngliche Nachricht-----
Von: Wayne Fay [mailto:waynefay@gmail.com]
Gesendet: Donnerstag, 26. Juli 2012 15:49
An: Maven Users List
Betreff: Re: A plugin to check the pomfiles for certain standards?


> I am looking for a plugin that tests the pom-files of a project to
> adhere to certain standards...

AW: A plugin to check the pomfiles for certain standards?

Posted by Dünnebeil Gerhard <Ge...@ait.ac.at>.
Thanks,

this looks close to what I was looking for. 
I will need custom rules though but it seems to be a good starting point.

Best regards
Gerhard


-----Ursprüngliche Nachricht-----
Von: Wayne Fay [mailto:waynefay@gmail.com] 
Gesendet: Donnerstag, 26. Juli 2012 15:49
An: Maven Users List
Betreff: Re: A plugin to check the pomfiles for certain standards?

> I am looking for a plugin that tests the pom-files of a project to 
> adhere to certain standards.
> The reason behind is that I want/need to enforce certain rules About 
> the project layout (like URLK set/not set, scm links present, ...) for 
> all colleagues that work on the same set of artifacts.

The maven-enforcer-plugin is useful for things like this. There may or may not already be rules available for the things you care about so plan to write a custome rule.

http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

Wayne

---------------------------------------------------------------------
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

Re: A plugin to check the pomfiles for certain standards?

Posted by Wayne Fay <wa...@gmail.com>.
> I am looking for a plugin that tests the pom-files of a project to adhere to
> certain standards.
> The reason behind is that I want/need to enforce certain rules About the
> project layout (like URLK set/not set, scm links present, ...) for all colleagues
> that work on the same set of artifacts.

The maven-enforcer-plugin is useful for things like this. There may or
may not already be rules available for the things you care about so
plan to write a custome rule.

http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

Wayne

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


Re: A plugin to check the pomfiles for certain standards?

Posted by Ansgar Konermann <an...@googlemail.com>.
idea: custom rules for m-enforcer-p?
Am 26.07.2012 15:32 schrieb "Dünnebeil Gerhard" <
Gerhard.Duennebeil@ait.ac.at>:

> Hello everybody,
>
> I am looking for a plugin that tests the pom-files of a project to adhere
> to certain standards.
> The reason behind is that I want/need to enforce certain rules About the
> project layout (like URLK set/not set, scm links present, ...) for all
> colleagues that work on the same set of artifacts.
>
> Is something like that available?
>
> Best regards
> Gerhard
>
>