Hello Robert, what about git repositories? As the default behavior of Maven is erroneous here for multi-module projects (the artifactId is just clutched at the end which makes no sense for git), you have to overwrite it in modules (see https://github.com/1and1/testlink-junit/blob/8f475fc5abcc10a4f7589d101883153b983def1e/tljunit-surefire/pom.xml#L13 for an example). How can I make sure, that I am in the project _defining the rule_, so it's configuration/property is taken as the default to compare against :-).
Regards Mirko On Tue, Mar 20, 2012 at 21:39, Robert Scholte <[email protected]> wrote: > Hi Mirko, > > I've just verified with help:evaluate that you could do the following: > compare ${project.scm.url} with ${project.parent.scm.url} > If these values are the same, your rule should fail. > > -Robert > > > > On Fri, 16 Mar 2012 21:00:00 +0100, Mirko Friedenhagen > <[email protected]> wrote: > >> Maven appends the artifactId to project.url as well automatically, so >> I would have to append ".*" as well to the regex for a diverging >> pattern. >> >> Is there a way to get easily to the pom/project defining a rule? Than >> I could at least get rid of the definingGA parameter. >> >> Regards Mirko >> >> On Thu, Mar 15, 2012 at 23:37, Mirko Friedenhagen >> <[email protected]> wrote: >>> >>> Hello Robert, >>> >>> actually I did not know how to get the parent's property. As well I >>> was thinking of the following constellation: >>> >>> company:superpom >>> company.project1:parent-pom (overrides project.url from company:superpom) >>> company.project1:child (does not need to override project.url from >>> company.project1:parent-pom). >>> >>> Now I guess when only looking for the parent's project.url the rule >>> would fail in company.project1:child? >>> >>> When using modules I observed Maven automatically appends the >>> artifactId to the scm section (which is an error IMO, as multi >>> projects mostly would be built together). >>> >>> Regards Mirko >>> -- >>> http://illegalstateexception.blogspot.com/ >>> https://github.com/mfriedenhagen/ >>> https://bitbucket.org/mfriedenhagen/ >>> >>> >>> >>> On Thu, Mar 15, 2012 at 23:17, Robert Scholte >>> <[email protected]> wrote: >>>> >>>> I think it's valid to only specify the propertyname. >>>> Compare its value with the result from its parent. >>>> If they are the same, the rule should fail. >>>> >>>> Thinking of the scm-section, I'd prefer to give a list of properties. >>>> Every value here must be different compared to its parent or null (in >>>> this >>>> case it'll be calculated, I'm not sure where this is done). >>>> >>>> -Robert >>>> >>>> >>>> On Thu, 15 Mar 2012 22:49:37 +0100, Mirko Friedenhagen >>>> <[email protected]> wrote: >>>> >>>>> Hello, >>>>> >>>>> I have implemented a new rule requirePropertyDiverges in a branch >>>>> >>>>> >>>>> (https://svn.codehaus.org/mojo/branches/mfriedenhagen/extra-enforcer-rules), >>>>> added unit tests, an integration test and a description >>>>> >>>>> >>>>> (http://huschteguzzel.de/hudson/job/extra-enforcer-rules/doclinks/1/requirePropertyDiverges.html). >>>>> >>>>> This rule checks that a property in a project diverges from one given >>>>> in another project, e.g. the parent. We often have the case that >>>>> developers forget to override the project's url pointing to a >>>>> describing wiki page. >>>>> >>>>> Any comments? Otherwise I would like to merge this back to trunk next >>>>> week. >>>>> >>>>> Regards Mirko >>>>> -- >>>>> http://illegalstateexception.blogspot.com/ >>>>> https://github.com/mfriedenhagen/ >>>>> https://bitbucket.org/mfriedenhagen/ >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>> >>>> >>>> -- >>>> Using Opera's revolutionary email client: http://www.opera.com/mail/ >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > > -- > Using Opera's revolutionary email client: http://www.opera.com/mail/ > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
