manandbytes / architecturerules

Automatically exported from code.google.com/p/architecturerules
0 stars 2 forks source link

maven plugin/ maven report #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Someone one day mentioned a maven plugin. I'm not sure what its features
would be, but I imagine it would run the test without you having to
implement a unit test. You'd just write architecture-rules.xml. 

Also, an architecture-rules-report-plugin that created a report for the
site goal would be cool too. Maybe something that resembles
http://architecturerules.googlecode.com/svn/docs/maven-generated-site/surefire-r
eport.html.
It could list each rule, its id and description, which class broke a rule,
or which packages are involved in cycles.

Any one have any other thoughts? Anyone want to pursue this task?

Original issue reported on code.google.com by mikenere...@gmail.com on 10 Feb 2008 at 2:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If you got to this this issue through dzone, and you need more information 
about this
project, check out the homepage...

http://architecturerules.googlecode.com/svn/docs/index.html

Original comment by mikenere...@gmail.com on 10 Feb 2008 at 6:44

GoogleCodeExporter commented 9 years ago
Some time ago I've started some development. My goals are:

- run the architecturerules without a "custom" unit test implementation in a
multiproject environment, see http://maven.apache.org/getting-started.html, 
Multiple
Modules.

- use a single "parent" architecture-rules.xml for all modules to reduce 
maintenance
efforts

And I'm not bothered with reports right now ;-)

Original comment by mykola.nickishov on 11 Feb 2008 at 2:31

GoogleCodeExporter commented 9 years ago

Original comment by mykola.nickishov on 25 Feb 2008 at 12:43

GoogleCodeExporter commented 9 years ago
Here is a first working version of the maven2 plugin. See sample project's 
pom.xml
for how to configure it. I plan to implement automatic binding to the test 
phase later.

Now plugin requires only a configuration file for architecture-rules. There is 
no
need for a custom unit test.

Unfortunately plugin unable to find source code for affected classes and reports
'cycle.DoCycle: referenced classes not found'. It is a single obstacle on the 
way.

If there are no objections I'll commit them both.

Original comment by mykola.nickishov on 27 Feb 2008 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/architecturerules/source/detail?r=333
http://code.google.com/p/architecturerules/source/detail?r=332

Original comment by mykola.nickishov on 27 Feb 2008 at 8:31

GoogleCodeExporter commented 9 years ago
This is what I have as a prototype for the report so far...

== Summary ==
  some sort of summary

== Rules ==
  each rule listed out, rule id is the header
  each package is listed with each violations listed below it, 
    and that violations status

== Cycles ==
  dunno yet

-- Breakdown --

  Rules Sample configuration:

<rule id="dao">
  <comment>The dao interface package should rely on nothing.</comment>
  <packages>
    <package>com.seventytwomiles.pagerank.core.dao</package>
    <package>com.seventytwomiles.pagerank.core.dao.hibernate</package>
  </packages>
  <violations>
    <violation>com.seventytwomiles.pagerank.core.services</violation>
    <violation>com.seventytwomiles.pagerank.core.builder</violation>
    <violation>com.seventytwomiles.pagerank.util</violation>
  </violations>
</rule>

  Contains id=dao a comment, two packages, and three violations. 
  The resulting report would include a 

  header: 'dao'
  paragraph: comment: The dao interface package should rely on nothing.

  sub header: com.seventytwomiles.pagerank.core.dao

  <table>
  [OK]  com.seventytwomiles.pagerank.core.services
  [OK]  com.seventytwomiles.pagerank.core.builder
  [OK]  com.seventytwomiles.pagerank.util
  </table>

  sub header: com.seventytwomiles.pagerank.core.dao.hibernate

  <table>
  [OK]  com.seventytwomiles.pagerank.core.services
  [ERR] com.seventytwomiles.pagerank.core.builder
          xxx depends on yyy
  [OK]  com.seventytwomiles.pagerank.util
  </table>

  The result is the entire violations list is listed for each
  package, with the status as a graphic.

Original comment by mikenere...@gmail.com on 4 Mar 2008 at 12:22

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mikenere...@gmail.com on 6 Sep 2008 at 3:23

GoogleCodeExporter commented 9 years ago

Original comment by mikenere...@gmail.com on 6 Sep 2008 at 3:35

GoogleCodeExporter commented 9 years ago

Original comment by mikenere...@gmail.com on 26 Jun 2009 at 3:45

GoogleCodeExporter commented 9 years ago

Original comment by mykola.nickishov on 31 Aug 2009 at 7:26

GoogleCodeExporter commented 9 years ago

Original comment by mykola.nickishov on 31 Aug 2009 at 7:28

GoogleCodeExporter commented 9 years ago

Original comment by mykola.nickishov on 3 Jan 2010 at 4:59