Hi Mike,
sorry, I seem to have not seen this thread when posting my wildcard
pattern suggestions <a href="
http://groups.google.com/group/
architecture-rules-users/t/f3029b8e5016b084">here</a>
the thing is that tools I have worked with before (SonarJ e.g.) define
the patterns on the type level as it actually is a wildcarded fully
qualified class name. So a.* would match all types in package a. One
of your posts above implies that you have thought about defining
patterns this way.
Currently I think simply a* would match package a PLUS direct
subpackages, wouldn't it?
Regards,
OIllie
On Jun 26, 2:43 pm, "Mike Nereson" <
mikenere...@gmail.com> wrote:
> > Unfortunately the problem I'm having isn't what you think it is. My demo
> > class that references the "b" package is not in the "a" package, it's in the
> > "a.child" package, so it should be found by "a.*" regardless of whether that
> > pattern includes the "a" package.
>
> Try the new snapshot. I think it might fix this problem
>
> FWIW, I do think that "a.*" should include "a". I can't think of any
>
> > scenario where that wouldn't be what the developer wanted, but maybe I just
> > haven't thought about it enough. But let me reiterate that that's not
> > related to the bug I'm reporting here.
>
> I have not figured out how to address this yet. So a.* still will not detect
> a. I'll think about this this weekend.
>
> Thanks for your patience, Andrew.
>
> ~ Mike Nereson
>
> On Tue, Jun 24, 2008 at 3:40 AM, Andrew Swan <
andrew.i.s...@gmail.com>
> wrote:
>
> > Hi Mike,
>
> > Unfortunately the problem I'm having isn't what you think it is. My demo
> > class that references the "b" package is not in the "a" package, it's in the
> > "a.child" package, so it should be found by "a.*" regardless of whether that
> > pattern includes the "a" package.
>
> > FWIW, I do think that "a.*" should include "a". I can't think of any
> > scenario where that wouldn't be what the developer wanted, but maybe I just
> > haven't thought about it enough. But let me reiterate that that's not
> > related to the bug I'm reporting here.
>
> > Cheers,
>
> > Andrew
>
> > On Tue, Jun 24, 2008 at 11:09 AM, Mike Nereson <
mikenere...@gmail.com>
> > wrote:
>
> >> Thanks for checking that out.
>
> >> The problem is that a.* is checking packages UNDER a. However, it is not
> >> checking package a. That is to say, it will check a.b, but not a
>
> >> So how do I address this... Should a.* match a? Should you have to
> >> explicitly define a topmost level package? Is this going to be a problem
> >> since java developers typically develop under a top level domain such as
> >> com. net. org. ect?
>
> >> I am not sure how to make a.* work. I don' think that a.* should include
> >> a.
>
> >> Ideas?
>
> >> ~ Mike Nereson
>
> >> On Mon, Jun 23, 2008 at 8:19 PM, Andrew Swan <
andrew.i.s...@gmail.com>
> >>> On Sun, Jun 22, 2008 at 6:56 AM, Mike Nereson <
mikenere...@gmail.com>
> >>> wrote:
>
> >>>> Andrew, I finally got the wild card support in. You can use
> >>>> 2.1.0-SNAPSHOT in the maven 2 repo to start using it now.
>
> >>>>
http://code.google.com/p/architecturerules/source/browse/maven2/com/s...
>
> >>>> If you're using maven and our repo, just update your version to
> >>>> 2.1.0-SNAPSHOT.
>
> >>>> I'd appreciate if you could try it out and give me any feedback.
>
> >>>> I have not updated the documentation and won't do so until we make the
> >>>> release (any day now?) but I am going to write a blog post about it at
> >>>>
72miles.com/blog where I write all my architecture rules posts.
>
> >>>> The basics are: you can use wildcards in the packages or violations.
>
> >>>> .* matches ONE package deeper.
> >>>> ..* matches one or more packages deeper.
>
> >>>> So that com.seventytwomiles.project.dao.*
> >>>> matches com.seventytwomiles.project.dao.hibernate
> >>>> matches com.seventytwomiles.project.dao.ldap
> >>>> does not match com.seventytwomiles.project.dao.hibernate.user
>
> >>>> but com.seventytwomiles.project.dao..*
> >>>> matches com.seventytwomiles.project.dao.hibernate
> >>>> matches com.seventytwomiles.project.dao.ldap
> >>>> matches com.seventytwomiles.project.dao.hibernate.user
>
> >>>> Also supports internal wildcards
>
> >>>> com.seventytwomiles..*.filter.*
> >>>> matches com.seventytwomiles.project1.web.filter.security
> >>>> matches com.seventytwomiles.project1.web.filter
> >>>> does not match com.seventytwomiles.project1.web.filter.security.wsbecause .* (..* would match this)
>
> >>>> Get it?
>
> >>>> So, you've got internal or terminating wildcards, and you have .* or ..*
> >>>> for a single package or many packages.
>
> >>>> Enjoy. Thanks for your patience. I'll let you know when I get the blog
> >>>> post up with more examples and explainations.
>
> >>>> 2.1.0 release will be this week sometime or next weekend maybe.
>
> >>>> ~ Mike Nereson
>
> >>>> On Wed, Jun 11, 2008 at 8:21 AM, Mike Nereson <
mikenere...@gmail.com>
> >>>> wrote:
>
> >>>>> Andrew, and everyone, if you're up for it, can you help me to define
> >>>>> the types of wild cards and then we can figure out what should be supported
> >>>>> and what should not.
>
> >>>>> Here is a list of what I have come up with:
>
> >>>>> Terminating: com.company.*
> >>>>> Starting: *.project.dao.UserDAO
> >>>>> Middle: com.company.*.dao.UserDAO
> >>>>> Class: com.company.project.dao.*DAO
>
> >>>>> Are there more? Should the tool support them all? Does defining a
> >>>>> violation using the class name wildcard make the configuration more complex
> >>>>> (harder to read and maintain?)
>
> >>>>> I'd appreciate your feedback. Tell me whatever you're thinking on this.
>
> >>>>> Thanks.
>
> >>>>> ~ Mike Nereson
>
> >>>>> On Wed, Jun 11, 2008 at 7:06 AM, Mike Nereson <
mikenere...@gmail.com>
> >>>>> wrote:
>
> >>>>>> Hi Andrew. Its temporary. Hopefully up today or tomorrow. Sorry about
> >>>>>> that.
>
> >>>>>> No progress on the wild cards. I am back on my computer though, so I
> >>>>>> will see if I can start them this weekend.
>
> >>>>>> Thanks for hanging in there with us.
>
> >>>>>> ~ Mike Nereson
>
> >>>>>> On Wed, Jun 11, 2008 at 2:30 AM, Andrew Swan <
andrew.i.s...@gmail.com>
> >>>>>> wrote:
>
> >>>>>>> Hi Mike,
>
> >>>>>>> Just checking in to see how wildcards are going; I went to the web
> >>>>>>> site but got a 404 error at this URL:
>
> >>>>>>>
http://www.72miles.com/architecturerules
>
> >>>>>>> Is the site just down temporarily?
>
> >>>>>>> Andrew
>
> >>>>>>> On Thu, May 15, 2008 at 10:18 AM, Mike Nereson <
> >>>>>>>
mikenere...@gmail.com> wrote:
>
> >>>>>>>> Andrew, I am glad to hear that. Mykola and I are the two developers
> >>>>>>>> on Architecture Rules. He is working hard on the maven plugin. I would have
> >>>>>>>> implemented the wild cards for you already if my main computer's motherboard
> >>>>>>>> didn't crash about 2 months ago. As soon as I replace that part, I'll be
> >>>>>>>> able to knock out that wild card support for you. I am really glad to hear
> >>>>>>>> that you want to use it.
>
> >>>>>>>> I really really appreciate the feedback. Once we get the wild cards
> >>>>>>>> in, and you are using it, please don't hesitate to send us an update as to
> >>>>>>>> how you are you using architecture rules, how well, or not well its working
> >>>>>>>> for you, and any suggestions that you have to make it better.
>
> >>>>>>>> Again, thanks.
>
> >>>>>>>> ~ Mike
>
> >>>>>>>> On Wed, May 14, 2008 at 7:46 PM, Andrew <
andrew.i.s...@gmail.com>
> ...
>
> read more »