Package dependecy rules

1 message Options
Embed this post
Permalink
Niklas () Package dependecy rules
Reply Threaded More More options
Print post
Permalink
Hello, I tried out the Maven plugin and had it run successfully to detect package cycles.

I also managed to disable package cycle detection for an individual project.


I have two questions:

1. I want to selectively disable package cycle detection for individual packages in a Maven project.

   Is this possible?
If yes, how?

2.  Look at the  architecture-rules below.
     The rule is not enforced! Can you tip me off about what could be wrong here?
 
   I have checked that the source is found by trying the non-existing  "target/classes/foo"
  instead of "target/classes" and then an exception is thrown


Cheers,

Niklas

<architecture>   
  
     <configuration>   
  
         <sources no-packages="exception"> 
             <!--  source not-found="ignore">core\target\classes</source> 
             <source not-found="ignore">web\target\classes</source> --> 
             <source not-found="exception">target/classes</source> 
         </sources>    
  
         <cyclicalDependency test="false"></cyclicalDependency>   
  
     </configuration>   
  
     <rules>   
  
         <rule id="parent"> 
             <comment> 
                  
             </comment> 
             <packages> 
                 <package>my.package.server.impl</package> 
                
             </packages> 
             <violations> 
                 <violation>my.package.server.impl.subpackage</violation> 
                
             </violations> 
          </rule>   
  
         
  
     </rules>   
  
 </architecture>