From: Eric L. <ele...@us...> - 2004-10-01 22:05:43
|
elegoubin 04/10/01 15:04:22 Added: macker/src/plugin-resources macker-report.xsl macker/xdocs changes.xml goals.xml index.xml navigation.xml properties.xml macker .cvsignore plugin.jelly plugin.properties project.properties project.xml Log: Add Macker plugin for Macker 0.4.2. Revision Changes Path 1.1 maven-plugins/macker/src/plugin-resources/macker-report.xsl Index: macker-report.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/macker-report"> <document> <properties> <title>Macker</title> </properties> <body> <xsl:apply-templates select="ruleset"/> </body> </document> </xsl:template> <xsl:template match="//ruleset"> <xsl:element name="section"> <xsl:attribute name="name"> <xsl:value-of select="@name"/> </xsl:attribute> <table> <tr> <th>Severity</th> <th>Message</th> <th>From</th> <th>To</th> </tr> <xsl:apply-templates select="descendant::access-rule-violation"/> </table> </xsl:element> </xsl:template> <xsl:template match="access-rule-violation"> <tr> <td> <xsl:value-of select="@severity"/> </td> <td> <xsl:value-of select="message"/> </td> <td> <xsl:value-of select="from/full-name"/> </td> <td> <xsl:value-of select="to/full-name"/> </td> </tr> </xsl:template> </xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved. <metaInformation> <scenarios ><scenario default="yes" name="macker-raw-report.xml" userelativepaths="yes" externalpreview="no" url="macker-raw-report.xml" htmlbaseurl="" outputurl="" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="macker-report.xml" destSchemaRoot="document" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="macker-raw-report.xml" srcSchemaRoot="macker-report" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="document/body/section/table/xsl:for-each" x="180" y="252"/><block path="document/body/section/table/xsl:for-each/tr/th[1]/xsl:value-of" x="180" y="142"/><block path="document/body/section/table/xsl:for-each/tr/th[2]/xsl:value-of" x="220" y="142"/><block path="document/body/section/table/xsl:for-each/tr/th[3]/xsl:value-of" x="140" y="142"/><block path="document/body/section/table/xsl:for-each/tr/th[4]/xsl:value-of" x="100" y="142"/></template><template name="access-rule-violation"><block path="tr/tr[1]/xsl:value-of" x="180" y="135"/><block path="tr/tr[2]/xsl:value-of" x="220" y="135"/><block path="tr/tr[3]/xsl:value-of" x="140" y="135"/><block path="tr/tr[4]/xsl:value-of" x="100" y="135"/></template><template name="**/access-rule-violation"><block path="tr/tr[1]/xsl:value-of" x="180" y="135"/><block path="tr/tr[2]/xsl:value-of" x="220" y="135"/><block path="tr/tr[3]/xsl:value-of" x="140" y="135"/><block path="tr/tr[4]/xsl:value-of" x="100" y="135"/></template></MapperBlockPosition></MapperMetaTag> </metaInformation> --> 1.1 maven-plugins/macker/xdocs/changes.xml Index: changes.xml =================================================================== <?xml version="1.0"?> <document> <properties> <title>Changes</title> <author email="eri...@la...">Eric Legoubin</author> </properties> <body> <release version="0.4.2" date="2004-10-01"> <action dev="elegoubin" type="add"> Check that a project is compliant with the dependencies rules specified in the Macker configuration file(s). </action> <action dev="elegoubin" type="add"> Register a report Macker. </action> </release> </body> </document> 1.1 maven-plugins/macker/xdocs/goals.xml Index: goals.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <title>Maven Macker Plugin Goals</title> </properties> <body> <goals> <goal> <name>macker</name> <description>Check Macker rules</description> </goal> <goal> <name>macker:info</name> <description>Display information on the plugin</description> </goal> <goal> <name>macker:macker</name> <description>Check Macker rules</description> </goal> <goal> <name>macker:report</name> <description>Generate Macker report</description> </goal> <goal> <name>maven-macker-plugin:deregister</name> <description> </description> </goal> <goal> <name>maven-macker-plugin:register</name> <description> </description> </goal> <goal> <name>maven-macker-plugin:report</name> <description> </description> </goal> </goals> </body> </document> 1.1 maven-plugins/macker/xdocs/index.xml Index: index.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <document> <properties> <title>Maven Macker Plugin</title> </properties> <body> <section name="Maven Macker Plugin"> <p> Macker is a build-time architectural rule checking utility for Java developers. It's meant to model the architectural ideals programmers always dream up for their projects, and then break -- it helps keep code clean and consistent. You can tailor a rules file to suit a specific project's structure, or write some general "good practice" rules for your code. Macker doesn't try to shove anybody else's rules down your throat; it's flexible, and writing a rules file is part of the development process for each unique project. </p> </section> </body> </document> 1.1 maven-plugins/macker/xdocs/navigation.xml Index: navigation.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <project name="Maven Macker Plugin"> <title>Maven Macker Plugin</title> <body> <links> <item href="http://maven.apache.org/" name="Maven"> </item> </links> <menu name="Overview"> <item href="/goals.html" name="Goals"> </item> <item href="/properties.html" name="Properties"> </item> </menu> </body> </project> 1.1 maven-plugins/macker/xdocs/properties.xml Index: properties.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <title>Maven Macker Plugin Properties</title> </properties> <body> <section name="Maven Macker Plugin Settings"> <table> <tr> <th>Property</th> <th>Optional?</th> <th>Description</th> </tr> <tr> <td>maven.macker.fork</td> <td>Yes</td> <td> <p>Default value is <code>no</code>.</p> </td> </tr> <tr> <td>maven.macker.ruleset.dir</td> <td>Yes</td> <td> <p>Default value is <code>${basedir}</code>.</p> </td> </tr> <tr> <td>maven.macker.verbose</td> <td>Yes</td> <td> <p>Default value is <code>false</code>.</p> </td> </tr> <tr> <td>maven.macker.ruleset.includes</td> <td>Yes</td> <td> <p>Default value is <code>macker.xml</code>.</p> </td> </tr> <tr> <td>maven.macker.failonerror</td> <td>Yes</td> <td> <p>Default value is <code>no</code>.</p> </td> </tr> <tr> <td>maven.macker.ruleset.excludes</td> <td>Yes</td> <td> <p>Default value is <code>package.html</code>.</p> </td> </tr> </table> </section> </body> </document> 1.1 maven-plugins/macker/.cvsignore Index: .cvsignore =================================================================== target LICENSE.txt *.log build.properties *.iws *.ipr classes maven-macker-plugin.iml 1.1 maven-plugins/macker/plugin.jelly Index: plugin.jelly =================================================================== <?xml version="1.0"?> <!-- | macker | | @todo Set default goal. |--> <project xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:doc="doc"> <path id="macker.classpath"> <pathelement path="${plugin.getDependencyPath('bcel')}"/> <pathelement path="${plugin.getDependencyPath('commons-lang')}"/> <pathelement path="${plugin.getDependencyPath('innig+util')}"/> <pathelement path="${plugin.getDependencyPath('innig:macker')}"/> <pathelement path="${plugin.getDependencyPath('regexp')}"/> <pathelement path="${plugin.getDependencyPath('jdom')}"/> <pathelement path="${plugin.getDependencyPath('xalan')}"/> <pathelement path="${plugin.getDependencyPath('xerces:xercesImpl')}"/> <pathelement path="${plugin.getDependencyPath('xerces:xmlParserAPIs')}"/> </path> <!-- | Defines the macker ant task. |--> <taskdef name="macker" classname="net.innig.macker.ant.MackerAntTask" classpathref="macker.classpath"/> <taskdef name="macker-report" classname="net.innig.macker.ant.MackerReportAntTask" classpathref="macker.classpath"/> <goal name="maven-macker-plugin:register"> <doc:registerReport name="Macker" pluginName="maven-macker-plugin" link="macker-report" description="Checks Java dependencies rules."/> </goal> <goal name="maven-macker-plugin:deregister"> <doc:deregisterReport name="Macker"/> </goal> <goal name="maven-macker-plugin:report"> <attainGoal name="macker:report"/> </goal> <goal name="macker:info" description="Display information on the plugin"> <echo>maven-macker-plugin</echo> <echo>${pom.description}</echo> </goal> <goal name="macker" prereqs="macker:macker" description="Check Macker rules"/> <!-- | macker:macker | | Run Macker on the project. | | rule file : the file 'macker.xml' under ${basedir}. | If this file is missing, the execution is stopped | | scope : any java classes |--> <goal name="macker:macker" description="Check Macker rules" prereqs="java:compile"> <macker verbose="${maven.macker.verbose}" failonerror="${maven.macker.failonerror}" fork="${maven.macker.fork}"> <!-- This classpath tells Macker where to look for classes. --> <classpath> <pathelement location="${maven.build.dest}"/> <path refid="maven.dependency.classpath"/> <path refid="macker.classpath"/> </classpath> <!-- Rules come from this file: --> <rules dir="${maven.macker.ruleset.dir}" includes="${maven.macker.ruleset.includes}" excludes="${maven.macker.ruleset.excludes}"/> <!-- Macker will apply those rules to these classes: --> <classes dir="${maven.build.dest}"> <include name="**/*.class" /> </classes> </macker> </goal> <goal name="macker:report" description="Generate Macker report" prereqs="java:compile"> <mkdir dir="${macker.report.dir}"/> ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')} <macker xmlReportFile="${macker.report.xml}" verbose="${maven.macker.verbose}" failonerror="false" fork="${maven.macker.fork}"> <!-- This classpath tells Macker where to look for classes. --> <classpath> <path refid="maven.dependency.classpath"/> <pathelement location="${maven.build.dest}"/> <path refid="macker.classpath"/> </classpath> <!-- Rules come from this file: --> <rules dir="${maven.macker.ruleset.dir}" includes="${maven.macker.ruleset.includes}" excludes="${maven.macker.ruleset.excludes}"/> <!-- Macker will apply those rules to these classes: --> <classes dir="${maven.build.dest}"> <include name="**/*.class" /> </classes> </macker> <!-- <macker-report xmlReportfile="${macker.report.xml}" outputFile="${macker.report.html}" /> --> <xslt in="${macker.report.xml}" out="${maven.build.dir}/generated-xdocs/macker-report.xml" style="${plugin.resources}/macker-report.xsl"/> </goal> </project> 1.1 maven-plugins/macker/plugin.properties Index: plugin.properties =================================================================== # ---------------------------------------------------------------------- # maven.macker.fork # Should Macker run in its own JVM? As of version 0.3, the answer is # probably "no", unless you encounter problems. # ---------------------------------------------------------------------- maven.macker.fork = no # ---------------------------------------------------------------------- # maven.macker.failonerror # Should a Macker error will cause the Ant build to fail? yes # ---------------------------------------------------------------------- maven.macker.failonerror = no # ---------------------------------------------------------------------- # maven.macker.verbose # Instructs Macker to dump some information useful for debugging a rules # file, including the complete set of references and classes matched # by each pattern. # ---------------------------------------------------------------------- maven.macker.verbose = false maven.macker.ruleset.dir = ${basedir} maven.macker.ruleset.includes = macker.xml maven.macker.ruleset.excludes = package.html macker.report.dir = ${maven.build.dir}/macker macker.report.xml = ${macker.report.dir}/macker-report.xml 1.1 maven-plugins/macker/project.properties Index: project.properties =================================================================== # ------------------------------------------------------------------- # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- maven.xdoc.date=left maven.xdoc.version=${pom.currentVersion} 1.1 maven-plugins/macker/project.xml Index: project.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <project> <extend>${basedir}/../plugin-project.xml</extend> <id>maven-macker-plugin</id> <name>Maven Macker Plugin</name> <currentVersion>0.4.2</currentVersion> <organization> <name>Innig</name> <url>http://innig.net</url> <logo>http://innig.net/images/footperson.gif</logo> </organization> <inceptionYear>2002</inceptionYear> <logo>http://innig.net/images/footperson.gif</logo> <description><![CDATA[Macker is a build-time architectural rule checking utility for Java developers. It's meant to model the architectural ideals programmers always dream up for their projects, and then break -- it helps keep code clean and consistent. You can tailor a rules file to suit a specific project's structure, or write some general "good practice" rules for your code. Macker doesn't try to shove anybody else's rules down your throat; it's flexible, and writing a rules file is part of the development process for each unique project. ]]></description> <shortDescription>Build-time architectural rule checking utility</shortDescription> <url>http://innig.net/macker</url> <developers> <developer> <name>Eric Legoubin</name> <id>elegoubin</id> <email>eri...@la...</email> <organization>NET2S</organization> <roles> <role>Developer</role> </roles> </developer> </developers> <contributors> <contributor> <name>Cantrell</name> <id>cantrell</id> <email>can...@po...</email> <organization>Innig</organization> <roles> <role>Macker author</role> </roles> </contributor> </contributors> <dependencies> <!-- | macker |--> <dependency> <groupId>innig</groupId> <artifactId>macker</artifactId> <version>${pom.currentVersion}</version> <url>http://innig.net/macker/</url> </dependency> <dependency> <id>innig+util</id> <version>${pom.currentVersion}</version> <url>http://innig.net/macker/</url> </dependency> <dependency> <id>bcel</id> <version>5.1</version> </dependency> <dependency> <id>commons-lang</id> <version>1.0.1</version> </dependency> <dependency> <id>regexp</id> <version>1.2</version> </dependency> <!-- packaged in the JDK 1.4--> <!-- <dependency> <id>jaxp</id> <version>${pom.currentVersion}</version> </dependency> --> <dependency> <id>jdom</id> <version>b9</version> <type>jar</type> <jar>jdom-b9.jar</jar> </dependency> <dependency> <id>xalan</id> <version>2.5.1</version> <properties> <classloader>root</classloader> </properties> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xmlParserAPIs</artifactId> <version>2.2.1</version> </dependency> </dependencies> </project> |