From: Arun N. <ana...@us...> - 2006-04-11 19:00:45
|
anachimuthu0 06/04/11 12:00:30 Added: hammurapi plugin.jelly plugin.properties project.properties project.xml hammurapi/src/net/sourceforge/mavenplugins/hammurapi/test HelloHammurapi.java hammurapi/src/plugin-resources junit-failed.jsl junit.jsl hammurapi/xdocs changes.xml download.xml faq.fml goals.xml index.xml installation.xml navigation.xml properties.xml Log: Moving plugin from java.net to SF.net Revision Changes Path 1.1 maven-plugins/hammurapi/plugin.jelly Index: plugin.jelly =================================================================== <?xml version="1.0"?> <!-- /* * 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. */ --> <project xmlns:ant="jelly:ant" xmlns:doc="doc" xmlns:j="jelly:core" xmlns:maven="jelly:maven"> <goal name="maven-hammurapi-plugin:register"> <j:if test="${sourcesPresent == 'true'}"> <doc:registerReport name="Hammurapi Report " pluginName="maven-hammurapi-plugin" description="Report on Hammurapi code review." link="hammurapi/report" target="_blank"/> </j:if> </goal> <goal name="maven-hammurapi-plugin:deregister"> <j:if test="${sourcesPresent == 'true'}"> <doc:deregisterReport name="Hammurapi Report"/> </j:if> </goal> <!-- ================================================================== --> <!-- C R E A T E H A M M U R A P I H T M L R E P O R T --> <!-- ================================================================== --> <goal name="hammurapi" prereqs="hammurapi:report"/> <goal name="maven-hammurapi-plugin:report" prereqs="hammurapi:report"/> <goal name="hammurapi:init"> <j:if test="${sourcesPresent == 'true'}"> <ant:taskdef name="hammurapi" classname="org.hammurapi.HammurapiTask"> <ant:classpath> <ant:pathelement location="${plugin.getDependencyPath('checkstyle:checkstyle')}"/> <ant:pathelement location="${plugin.getDependencyPath('checkstyle:checkstyle-optional')}"/> <ant:pathelement location="${plugin.getDependencyPath('antlr:antlr')}"/> <ant:pathelement location="${plugin.getDependencyPath('regexp:regexp')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-beanutils:commons-beanutils-core')}"/> <ant:pathelement location="${plugin.getDependencyPath('bcel:bcel')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-cli:commons-cli')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-jxpath:commons-jxpath')}"/> <ant:pathelement location="${plugin.getDependencyPath('org.hammurapi:hammurapi')}"/> <ant:pathelement location="${plugin.getDependencyPath('org.hammurapi:hammurapi-db')}"/> <ant:pathelement location="${plugin.getDependencyPath('org.hammurapi:historyinspector-db')}"/> <ant:pathelement location="${plugin.getDependencyPath('org.hammurapi:historyoutput-db')}"/> <ant:pathelement location="${plugin.getDependencyPath('hsqldb:hsqldb')}"/> <ant:pathelement location="${plugin.getDependencyPath('oro:oro')}"/> <ant:pathelement location="${plugin.getDependencyPath('jfree:jcommon')}"/> <ant:pathelement location="${plugin.getDependencyPath('jfree:jfreechart')}"/> <ant:pathelement location="${plugin.getDependencyPath('com.pavelvlasov:jsel')}"/> <ant:pathelement location="${plugin.getDependencyPath('com.pavelvlasov:jsel-db')}"/> <ant:pathelement location="${plugin.getDependencyPath('junit:junit')}"/> <ant:pathelement location="${plugin.getDependencyPath('ognl:ognl')}"/> <ant:pathelement location="${plugin.getDependencyPath('com.pavelvlasov:pvcommons')}"/> <ant:pathelement location="${plugin.getDependencyPath('com.pavelvlasov:pvcommons-db')}"/> <ant:pathelement location="${plugin.getDependencyPath('xalan:xalan')}"/> <ant:pathelement location="${plugin.getDependencyPath('xerces:xerces')}"/> <ant:pathelement location="${plugin.getDependencyPath('xml-apis:xml-apis')}"/> <ant:pathelement location="${plugin.getDependencyPath('log4j:log4j')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-jelly:commons-jelly')}"/> <ant:path refid="maven.dependency.classpath"/> <ant:pathelement path="${maven.build.dest}"/> </ant:classpath> </ant:taskdef> ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')} <!-- <ant:property environment="env"/> <ant:sysproperty name="javax.xml.transform.TransformerFactory" value="org.apache.xalan.processor.TransformerFactoryImpl"/> <ant:echo> prop is ${javax.xml.transform.TransformerFactory} </ant:echo> --> </j:if> </goal> <goal name="hammurapi:report" prereqs="hammurapi:init" description="Generate code reivew report from the source files"> <j:if test="${!sourcesPresent}"> <echo>No source files to review.</echo> </j:if> <j:if test="${sourcesPresent == 'true'}"> <j:if test="${!maven.hammurapi.reportsDirectory.exists()}"> <ant:mkdir dir="${maven.hammurapi.reportsDirectory}"/> </j:if> <hammurapi> <j:if test="${context.getVariable('maven.hammurapi.cloudscape') != null}"> <setProperty name="cloudscape" value="${maven.hammurapi.cloudscape}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.cleanup') != null}"> <setProperty name="cleanup" value="${maven.hammurapi.cleanup}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.skipIntactPackages') != null}"> <setProperty name="skipIntactPackages" value="${maven.hammurapi.skipIntactPackages}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.forceOnWaivers') != null}"> <setProperty name="forceOnWaivers" value="${maven.hammurapi.forceOnWaivers}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.baseLine') != null}"> <setProperty name="baseLine" value="${maven.hammurapi.baseLine}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.hostId') != null}"> <setProperty name="hostId" value="${maven.hammurapi.hostId}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.calculateDependencies') != null}"> <setProperty name="calculateDependencies" value="${maven.hammurapi.calculateDependencies}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.storeSource') != null}"> <setProperty name="storeSource" value="${maven.hammurapi.storeSource}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.unpackDir') != null}"> <setProperty name="unpackDir" value="${maven.hammurapi.unpackDir}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.debugType') != null}"> <setProperty name="debugType" value="${maven.hammurapi.debugType}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.embeddedInspectors') != null}"> <setProperty name="embeddedInspectors" value="${maven.hammurapi.embeddedInspectors}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.classPath') != null}"> <setProperty name="classPath" value="${maven.hammurapi.classPath}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.archive') != null}"> <setProperty name="archive" value="${maven.hammurapi.archive}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.dpmoThreshold') != null}"> <setProperty name="dpmoThreshold" value="${maven.hammurapi.dpmoThreshold}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.sigmaThreshold') != null}"> <setProperty name="sigmaThreshold" value="${maven.hammurapi.sigmaThreshold}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.failOnFirstException') != null}"> <setProperty name="failOnFirstException" value="${maven.hammurapi.failOnFirstException}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.failOnWarnings') != null}"> <setProperty name="failOnWarnings" value="${maven.hammurapi.failOnWarnings}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.severityThreshold') != null}"> <setProperty name="severityThreshold" value="${maven.hammurapi.severityThreshold}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.title') != null}"> <setProperty name="title" value="${maven.hammurapi.title}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.waiverStubs') != null}"> <setProperty name="waiverStubs" value="${maven.hammurapi.waiverStubs}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.evictBadInspectors') != null}"> <setProperty name="evictBadInspectors" value="${maven.hammurapi.evictBadInspectors}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.force') != null}"> <setProperty name="force" value="${maven.hammurapi.force}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.baselining') != null}"> <setProperty name="baselining" value="${maven.hammurapi.baselining}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.forceOnWarnings') != null}"> <setProperty name="forceOnWarnings" value="${maven.hammurapi.forceOnWarnings}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.reviewDescription') != null}"> <setProperty name="reviewDescription" value="${maven.hammurapi.reviewDescription}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.database') != null}"> <setProperty name="database" value="${maven.hammurapi.database}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.tabSize') != null}"> <setProperty name="tabSize" value="${maven.hammurapi.tabSize}" /> </j:if> <src dir="${maven.src.dir}" /> <j:if test="${context.getVariable('maven.hammurapi.config.URL') != null || context.getVariable('maven.hammurapi.config.file') != null}"> <config> <j:if test="${context.getVariable('maven.hammurapi.config.failOnError') != null}"> <setProperty name="failOnError" value="${maven.hammurapi.config.failOnError}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.config.URL') != null}"> <setProperty name="URL" value="${maven.hammurapi.config.URL}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.config.file') != null}"> <setProperty name="file" value="${maven.hammurapi.config.file}" /> </j:if> </config> </j:if> <j:if test="${context.getVariable('maven.hammurapi.connection.driverClass') != null}"> <connection> <setProperty name="driverClass" value="${maven.hammurapi.connection.driverClass}" /> <j:if test="${context.getVariable('maven.hammurapi.connection.url') != null}"> <setProperty name="url" value="${maven.hammurapi.connection.url}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.connection.user') != null}"> <setProperty name="user" value="${maven.hammurapi.connection.user}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.connection.password') != null}"> <setProperty name="password" value="${maven.hammurapi.connection.password}" /> </j:if> </connection> </j:if> <j:if test="${context.getVariable('maven.hammurapi.waivers.URL') != null || context.getVariable('maven.hammurapi.waivers.file') != null}"> <config> <j:if test="${context.getVariable('maven.hammurapi.waivers.failOnError') != null}"> <setProperty name="failOnError" value="${maven.hammurapi.waivers.failOnError}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.waivers.URL') != null}"> <setProperty name="URL" value="${maven.hammurapi.waivers.URL}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.waivers.file') != null}"> <setProperty name="file" value="${maven.hammurapi.waivers.file}" /> </j:if> </config> </j:if> <!-- <j:if test="${context.getVariable('maven.hammurapi.include.file') != null}"> <j:include uri="hammurapi-include.xml"/> </j:if> --> <output> <j:if test="${context.getVariable('maven.hammurapi.reportsDirectory') != null}"> <setProperty name="dir" value="${maven.hammurapi.reportsDirectory}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.output.embeddedStyle') != null}"> <setProperty name="embeddedStyle" value="${maven.hammurapi.output.embeddedStyle}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.output.extension') != null}"> <setProperty name="extension" value="${maven.hammurapi.output.extension}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.output.javaDocDir') != null}"> <setProperty name="javaDocDir" value="${maven.hammurapi.output.javaDocDir}" /> </j:if> </output> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.table') != null}"> <historyoutput> <setProperty name="table" value="${maven.hammurapi.historyoutput.table}" /> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.reportUrl') != null}"> <setProperty name="reportUrl" value="${maven.hammurapi.historyoutput.reportUrl}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.host') != null}"> <setProperty name="host" value="${maven.hammurapi.historyoutput.host}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.description') != null}"> <setProperty name="description" value="${maven.hammurapi.historyoutput.description}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.driverClass') != null}"> <setProperty name="driverClass" value="${maven.hammurapi.historyoutput.driverClass}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.password') != null}"> <setProperty name="password" value="${maven.hammurapi.historyoutput.password}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.url') != null}"> <setProperty name="url" value="${maven.hammurapi.historyoutput.url}" /> </j:if> <j:if test="${context.getVariable('maven.hammurapi.historyoutput.user') != null}"> <setProperty name="user" value="${maven.hammurapi.historyoutput.user}" /> </j:if> </historyoutput> </j:if> </hammurapi> </j:if> </goal> </project> 1.1 maven-plugins/hammurapi/plugin.properties Index: plugin.properties =================================================================== # ------------------------------------------------------------------- # 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. # ------------------------------------------------------------------- # ------------------------------------------------------------------- # P L U G I N P R O P E R I E S # ------------------------------------------------------------------- # Hammurapi plugin. # ------------------------------------------------------------------- maven.hammurapi.reportsDirectory = ${maven.docs.dest}/hammurapi maven.hammurapi.output.javaDocDir = ${maven.javadoc.destdir} #maven.hammurapi.include.file = ${basedir}/hammurapi-include.xml 1.1 maven-plugins/hammurapi/project.properties Index: project.properties =================================================================== # ------------------------------------------------------------------- # 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. # ------------------------------------------------------------------- # ------------------------------------------------------------------- # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- maven.changelog.type=tag maven.changelog.tag=MAVEN_HAMMURAPI_1_1 #maven.hammurapi.include.file = ${basedir}/hammurapi-include.xml 1.1 maven-plugins/hammurapi/project.xml Index: project.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- /* * 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. */ --> <project xsi:noNamespaceSchemaLocation="http://maven.apache.org/xsd/maven-project-3.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <extend>${basedir}/../plugin-project.xml</extend> <!--pomVersion is in parent --> <id>maven-hammurapi-plugin</id> <name>Maven Hammurapi Plugin</name> <!-- <artifactId>maven-hammurapi-plugin</artifactId> --> <!-- groupId is in parent --> <currentVersion>1.1</currentVersion> <!-- organization is in parent --> <inceptionYear>2005</inceptionYear> <!-- package, logo are in parent. no gumpRepositoryId --> <description> Reports from Hammurapi, Java code review tool. </description> <shortDescription> Reports from Hammurapi, Java code review tool </shortDescription> <url>http://maven-plugins.sourceforge.net/${pom.artifactId}</url> <!-- issue tracking url, siteAddress are in parent --> <siteDirectory>/home/groups/m/ma/maven-plugins/htdocs/hammurapi/</siteDirectory> <distributionDirectory>/home/groups/m/ma/maven-plugins/htdocs/hammurapi/distributions/</distributionDirectory> <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/maven-plugins:maven-plugins/hammurapi</connection> <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/maven-plugins/maven-plugins/hammurapi/</url> </repository> <versions> <version> <id>1.1</id> <name>1.1</name> <tag>MAVEN_HAMMURAPI_1_1</tag> </version> <version> <id>1.0</id> <name>1.0</name> <tag>MAVEN_HAMMURAPI_1_0</tag> </version> </versions> <!-- mailingLists are in parent --> <developers> <developer> <name>Arun Nachimuthu</name> <id>anachimuthu0</id> <email>anachimuthu0_at_users_dot_sourceforge_dot_net</email> <organization>JavaGeekz JUG</organization> <roles> <role>Developer</role> </roles> <url>http://www.JavaGeekz.com</url> <timezone>+5</timezone> </developer> </developers> <contributors> </contributors> <dependencies> <dependency> <groupId>antlr</groupId> <artifactId>antlr</artifactId> <version>2.7.2</version> <type>jar</type> </dependency> <dependency> <groupId>bcel</groupId> <artifactId>bcel</artifactId> <version>5.1</version> <type>jar</type> </dependency> <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> <version>1.0</version> <type>jar</type> </dependency> <dependency> <groupId>commons-jxpath</groupId> <artifactId>commons-jxpath</artifactId> <version>1.2</version> <type>jar</type> </dependency> <!-- <dependency> <groupId>derby</groupId> <artifactId>derby</artifactId> <version>1.2</version> <url></url> </dependency> --> <dependency> <groupId>org.hammurapi</groupId> <artifactId>hammurapi</artifactId> <version>3.17.0</version> <type>jar</type> </dependency> <dependency> <groupId>org.hammurapi</groupId> <artifactId>hammurapi-db</artifactId> <version>3.17.0</version> <type>jar</type> </dependency> <dependency> <groupId>org.hammurapi</groupId> <artifactId>historyinspector-db</artifactId> <version>3.17.0</version> <type>jar</type> </dependency> <dependency> <groupId>org.hammurapi</groupId> <artifactId>historyoutput-db</artifactId> <version>3.17.0</version> <type>jar</type> </dependency> <dependency> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>1.7.3.3</version> <type>jar</type> </dependency> <dependency> <groupId>oro</groupId> <artifactId>oro</artifactId> <version>2.0.6</version> <type>jar</type> </dependency> <dependency> <groupId>jfree</groupId> <artifactId>jcommon</artifactId> <version>0.9.6</version> <type>jar</type> </dependency> <dependency> <groupId>jfree</groupId> <artifactId>jfreechart</artifactId> <version>0.9.21</version> <type>jar</type> </dependency> <dependency> <groupId>com.pavelvlasov</groupId> <artifactId>jsel</artifactId> <version>1.10</version> <type>jar</type> </dependency> <dependency> <groupId>com.pavelvlasov</groupId> <artifactId>jsel-db</artifactId> <version>1.10</version> <type>jar</type> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <type>jar</type> </dependency> <dependency> <groupId>ognl</groupId> <artifactId>ognl</artifactId> <version>2.6.5</version> <type>jar</type> </dependency> <dependency> <groupId>com.pavelvlasov</groupId> <artifactId>pvcommons</artifactId> <version>4.3.0</version> <type>jar</type> </dependency> <dependency> <groupId>com.pavelvlasov</groupId> <artifactId>pvcommons-db</artifactId> <version>4.3.0</version> <type>jar</type> </dependency> <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.6.0</version> <type>jar</type> <properties> <classloader>root</classloader> </properties> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.6.0</version> <type>jar</type> </dependency> <dependency> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> <version>2.0.2</version> <type>jar</type> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.8</version> <type>jar</type> </dependency> <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly-tags-jsl</artifactId> <version>1.0</version> <type>jar</type> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> </unitTest> <resources> <resource> <directory>${basedir}/src/plugin-resources</directory> <targetPath>plugin-resources</targetPath> <filtering>false</filtering> </resource> <resource> <directory>${basedir}</directory> <includes> <include>plugin.jelly</include> <include>plugin.properties</include> <include>project.properties</include> <include>build.properties</include> <include>project.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build> <reports> <report>maven-changes-plugin</report> <report>maven-changelog-plugin</report> <report>maven-file-activity-plugin</report> <report>maven-developer-activity-plugin</report> <report>maven-faq-plugin</report> <report>maven-hammurapi-plugin</report> <!-- <report>maven-statcvs-plugin</report> --> </reports> </project> 1.1 maven-plugins/hammurapi/src/net/sourceforge/mavenplugins/hammurapi/test/HelloHammurapi.java Index: HelloHammurapi.java =================================================================== package net.sourceforge.mavenplugins.hammurapi.test; public class HelloHammurapi { public static void main(String[] args) { System.out.println("Hello World!"); } } 1.1 maven-plugins/hammurapi/src/plugin-resources/junit-failed.jsl Index: junit-failed.jsl =================================================================== <?xml version="1.0"?> <!-- /* * 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. */ --> <jsl:stylesheet select="$doc" xmlns:j="jelly:core" xmlns:jsl="jelly:jsl" xmlns:x="jelly:xml" xmlns:define="jelly:define" xmlns:util="jelly:util" xmlns:junit="junit" xmlns:doc="doc" trim="false"> <!-- This needs to be instantiated here to be available in the template matches --> <j:useBean var="mavenTool" class="org.apache.maven.MavenTool"/> <j:useBean var="numbers" class="java.text.DecimalFormat"/> <j:useBean var="htmlescape" class="org.apache.velocity.anakia.Escape"/> <j:useBean var="formatter" class="org.apache.maven.DVSLFormatter"/> <j:useBean var="fileutil" class="org.apache.velocity.texen.util.FileUtil"/> <j:useBean var="pathtool" class="org.apache.maven.util.DVSLPathTool"/> <define:taglib uri="junit"> <define:tag name="nav"> <p> [ <a href="#Summary">summary</a>] [ <a href="#Package List">package list</a>] [ <a href="#Test Cases">test cases</a>] </p> </define:tag> <define:tag name="testSuiteHeader"> <tr> <th>Name</th> <th>Tests</th> <th>Errors</th> <th>Failures</th> <th>Time(s)</th> </tr> </define:tag> <define:tag name="testCaseHeader"> <tr> <th>Name</th> <th>Status</th> <th>Type</th> <th>Time(s)</th> </tr> </define:tag> <define:tag name="displayFailure"> <j:choose> <j:when test="${current.attribute('message') != null}"> <code> ${htmlescape.getText(current.attribute('message').value)} </code> </j:when> <j:otherwise> N/A </j:otherwise> </j:choose> </define:tag> </define:taglib> <jsl:template match="testsuites"> <document> <properties> <title>JUnit Test Results</title> </properties> <body> <section name="Summary"> <junit:nav/> <j:set var="testCount"><x:expr select="sum(testsuite/@tests)"/></j:set> <j:set var="errorCount"><x:expr select="sum(testsuite/@errors)"/></j:set> <j:set var="failureCount"><x:expr select="sum(testsuite/@failures)"/></j:set> <j:set var="timeCount"><x:expr select="sum(testsuite/@time)"/></j:set> <j:set var="successRate"><x:expr select="($testCount - ($failureCount + $errorCount)) div $testCount"/></j:set> <table> <tr> <th>Tests</th> <th>Errors</th> <th>Failures</th> <th>Success rate</th> <th>Time(s)</th> </tr> <tr> <td> <doc:formatAsNumber string="${testCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${errorCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${failureCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${successRate}" pattern="0.00%"/> </td> <td> <doc:formatAsNumber string="${timeCount}" pattern="0.00"/> </td> </tr> </table> <p> Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated. </p> </section> <section name="Package List"> <junit:nav/> <table> <!-- <junit:testSuiteHeader/> --> <x:set var="testsuites" select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"/> <j:forEach var="testsuite" items="${testsuites}"> <x:set var="errorCount" select="sum($testsuite/@errors)"/> <x:set var="failureCount" select="sum($testsuite/@failures)"/> <j:if test="${errorCount.intValue() gt 0 or failureCount.intValue() gt 0}"> <j:set var="package" value="${testsuite.attribute('package').value}"/> <x:set var="quotedPackage" select='"${package}"'/> <j:set var="testCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@tests)"/></j:set> <j:set var="errorCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@errors)"/></j:set> <j:set var="failureCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@failures)"/></j:set> <j:set var="timeCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@time)"/></j:set> <tr> <td> <a href="#${package}">${package}</a> </td> <td> <doc:formatAsNumber string="${testCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${failureCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${errorCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${timeCount}" pattern="0.00"/> </td> </tr> </j:if> </j:forEach> </table> <p> Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. </p> <j:forEach var="testsuite" items="${testsuites}"> <j:set var="package" value="${testsuite.attribute('package').value}"/> <x:set var="quotedPackage" select='"${package}"'/> <x:set var="errorCount" select="sum($testsuite/@errors)"/> <x:set var="failureCount" select="sum($testsuite/@failures)"/> <j:if test="${errorCount.intValue() gt 0 or failureCount.intValue() gt 0}"> <a name="${package}"></a> <subsection name="${package}"> <table> <x:forEach var="test" select="/testsuites/testsuite[./@package = $quotedPackage]"> <x:set var="errorCount" select="count($test/testcase/error)"/> <x:set var="failureCount" select="count($test/testcase/failure)"/> <j:if test="${errorCount.intValue() gt 0 or failureCount.intValue() gt 0}"> <tr> <td> <a href="#${test.attribute('name').value}">${test.attribute('name').value}</a> </td> <td> <doc:formatAsNumber string="${test.attribute('tests').value}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${test.attribute('errors').value}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${test.attribute('failures').value}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${test.attribute('time').value}" pattern="0.000"/> </td> </tr> </j:if> </x:forEach> </table> </subsection> </j:if> </j:forEach> </section> <section name="Test Cases"> <junit:nav/> <x:set var="testsuites" select="./testsuite"/> <j:forEach var="testsuite" items="${testsuites}"> <!--j:set var="errorCount"><x:expr select="count($testsuite/testcase/error)"/></j:set--> <x:set var="errorCount" select="count($testsuite/testcase/error)"/> <x:set var="failureCount" select="count($testsuite/testcase/failure)"/> <j:if test="${errorCount.intValue() gt 0 or failureCount.intValue() gt 0}"> <a name="${testsuite.attribute('name').value}"></a> <subsection name="${testsuite.attribute('name').value}"> <table> ## test can even not be started at all (failure to load the class) ## so report the error directly ## <x:set var="errors" select="$testsuite/error"/> <j:forEach var="error" items="${errors}"> <tr> <td colspan="4"> <junit:displayFailure current="${error}"/> </td> </tr> </j:forEach> <x:set var="testcases" select="$testsuite/testcase"/> <j:forEach var="testcase" items="${testcases}"> <j:set var="failure" value="${testcase.selectSingleNode('failure')}"/> <j:set var="error" value="${testcase.selectSingleNode('error')}"/> <j:if test="${!empty(failure) or !empty(error)}"> <tr> <td>${testcase.attribute("name").value}</td> <j:choose> <j:when test="${failure != null}"> <td style="width: 60px; color: red; font-weight: bold">Failure</td> </j:when> <j:when test="${error != null}"> <td style="width: 60px; color: red; font-weight: bold">Error</td> </j:when> <j:otherwise> <td style="width: 60px;">Success</td> </j:otherwise> </j:choose> <j:choose> <j:when test="${testcase.attribute('time') != null}"> <td width="60px"> <doc:formatAsNumber string="${testcase.attribute('time').value}" pattern="0.00"/> </td> </j:when> <j:otherwise> <td width="60px"></td> </j:otherwise> </j:choose> </tr> <j:choose> <j:when test="${failure != null}"> <tr> <td colspan="3" style="padding-left: 50px"> <junit:displayFailure current="${failure}"/> </td> </tr> </j:when> <j:when test="${error != null}"> <tr> <td colspan="3" style="padding-left: 50px"> <junit:displayFailure current="${error}"/> </td> </tr> </j:when> </j:choose> </j:if> </j:forEach> </table> </subsection> </j:if> </j:forEach> </section> </body> </document> </jsl:template> </jsl:stylesheet> 1.1 maven-plugins/hammurapi/src/plugin-resources/junit.jsl Index: junit.jsl =================================================================== <?xml version="1.0"?> <!-- /* * 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. */ --> <jsl:stylesheet select="$doc" xmlns:j="jelly:core" xmlns:jsl="jelly:jsl" xmlns:x="jelly:xml" xmlns:define="jelly:define" xmlns:util="jelly:util" xmlns:junit="junit" xmlns:doc="doc" trim="false"> <j:useBean var="stringTool" class="org.apache.maven.util.StringTool"/> <define:taglib uri="junit"> <define:tag name="nav"> <p> [<a href="#Summary">summary</a>] [<a href="#Package List">package list</a>] [<a href="#Test Cases">test cases</a>] </p> </define:tag> <define:tag name="testSuiteHeader"> <tr> <th>Name</th> <th>Tests</th> <th>Errors</th> <th>Failures</th> <th>Time(s)</th> </tr> </define:tag> <define:tag name="testCaseHeader"> <tr> <th>Name</th> <th>Status</th> <th>Type</th> <th>Time(s)</th> </tr> </define:tag> <define:tag name="displayFailure"> <j:choose> <j:when test="${current.attribute('message') != null}"> <code> ${current.attributeValue('message')} </code> </j:when> <j:otherwise> N/A </j:otherwise> </j:choose> </define:tag> <!-- defined here to easily change images globally or set up relative paths --> <define:tag name="displayImage"> <j:choose> <j:when test="${kind == 'failure'}"> <img src="images/icon_warning_sml.gif" width="15" height="15" alt="Failure" /> </j:when> <j:when test="${kind == 'error'}"> <img src="images/icon_error_sml.gif" width="15" height="15" alt="Error" /> </j:when> <j:when test="${kind == 'success'}"> <img src="images/icon_success_sml.gif" width="15" height="15" alt="Success" /> </j:when> </j:choose> </define:tag> </define:taglib> <jsl:template match="testsuites"> <document> <properties> <title>JUnit Test Results</title> </properties> <body> <section name="Summary"> <junit:nav/> <j:set var="testCount"><x:expr select="sum(testsuite/@tests)"/></j:set> <j:set var="errorCount"><x:expr select="sum(testsuite/@errors)"/></j:set> <j:set var="failureCount"><x:expr select="sum(testsuite/@failures)"/></j:set> <j:set var="timeCount"><x:expr select="sum(testsuite/@time)"/></j:set> <j:set var="successRate"><x:expr select="($testCount - ($failureCount + $errorCount)) div $testCount"/></j:set> <table summary="JUnit result summary"> <thead> <tr> <th>Tests</th> <th>Errors</th> <th>Failures</th> <th>Success rate</th> <th>Time(s)</th> </tr> </thead> <tr> <td> <doc:formatAsNumber string="${testCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${errorCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${failureCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${successRate}" pattern="0.00%"/> </td> <td> <doc:formatAsNumber string="${timeCount}" pattern="0.00"/> </td> </tr> </table> <p> Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated. </p> </section> <section name="Package List"> <junit:nav/> <table summary="Package List"> <thead> <tr> <th>Package</th><th>Tests</th><th>Errors</th><th>Failures</th><th>Success Rate</th><th>Time</th> </tr> </thead> <x:set var="testsuites" select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"/> <j:forEach var="testsuite" items="${testsuites}"> <j:set var="package" value="${testsuite.attribute('package').value}"/> <x:set var="quotedPackage" select='"${package}"'/> <j:set var="testCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@tests)"/></j:set> <j:set var="errorCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@errors)"/></j:set> <j:set var="failureCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@failures)"/></j:set> <j:set var="timeCount"><x:expr select="sum(./testsuite[./@package = $quotedPackage]/@time)"/></j:set> <j:set var="successRate"><x:expr select="($testCount - ($failureCount + $errorCount)) div $testCount"/></j:set> <tr> <td> <a href="#${package}">${package}</a> </td> <td> <doc:formatAsNumber string="${testCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${errorCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${failureCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${successRate}" pattern="0.00%"/> </td> <td> <doc:formatAsNumber string="${timeCount}" pattern="0.00"/> </td> </tr> </j:forEach> </table> <p> Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. </p> <j:forEach var="testsuite" items="${testsuites}"> <j:set var="package" value="${testsuite.attribute('package').value}"/> <x:set var="quotedPackage" select='"${package}"'/> <a name="${package}"></a> <subsection name="${package}"> <table summary="Tests for ${package}"> <thead> <tr> <th colspan="2">Class</th><th>Tests</th><th>Errors</th><th>Failures</th><th>Success Rate</th><th>Time</th> </tr> </thead> <x:forEach var="test" select="/testsuites/testsuite[./@package = $quotedPackage]"> <j:set var="testCount"><x:expr select="${test.attribute('tests').value}" /></j:set> <j:set var="errorCount"><x:expr select="${test.attribute('errors').value}" /></j:set> <j:set var="failureCount"><x:expr select="${test.attribute('failures').value}" /></j:set> <j:set var="successRate"><x:expr select="($testCount - ($failureCount + $errorCount)) div $testCount"/></j:set> <tr> <td> <j:choose> <j:when test="${errorCount != 0}"> <junit:displayImage kind="error" /> </j:when> <j:when test="${failureCount != 0}"> <junit:displayImage kind="failure" /> </j:when> <j:otherwise> <junit:displayImage kind="success" /> </j:otherwise> </j:choose> </td> <td> <a href="#${test.attribute('name').value}">${test.attribute('name').value}</a> </td> <td> <doc:formatAsNumber string="${testCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${errorCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${failureCount}" pattern="0"/> </td> <td> <doc:formatAsNumber string="${successRate}" pattern="0.00%"/> </td> <td> <doc:formatAsNumber string="${test.attribute('time').value}" pattern="0.000"/> </td> </tr> </x:forEach> </table> </subsection> </j:forEach> </section> <section name="Test Cases"> <junit:nav/> <x:set var="testsuites" select="./testsuite"/> <j:forEach var="testsuite" items="${testsuites}"> <a name="${testsuite.attribute('name').value}"></a> <subsection name="${testsuite.attribute('name').value}"> <table summary="Testsuite: ${testsuite.attribute('name').value}"> <x:set var="errors" select="$testsuite/error"/> <j:forEach var="error" items="${errors}"> <tr> <td colspan="4"> <junit:displayFailure current="${error}"/> </td> </tr> </j:forEach> <x:set var="testcases" select="$testsuite/testcase"/> <j:forEach var="testcase" items="${testcases}"> <j:set var="failure" value="${testcase.selectSingleNode('failure')}"/> <j:set var="error" value="${testcase.selectSingleNode('error')}"/> <j:set var="testname" value="${testcase.attribute('name').value}"/> <tr> <td style="width:20px"> <j:choose> <j:when test="${failure != null}"> <a href="#${testname}"><junit:displayImage kind="failure" /></a> </j:when> <j:when test="${error != null}"> <a href="#${testname}"><junit:displayImage kind="error" /></a> </j:when> <j:otherwise> <junit:displayImage kind="success" /> </j:otherwise> </j:choose> </td> <td style="width:98%">${testcase.attribute("name").value}</td> <td style="width:60px"> <j:if test="${testcase.attribute('time') != null}"> <doc:formatAsNumber string="${testcase.attribute('time').value}" pattern="0.00"/> </j:if> </td> </tr> <j:choose> <j:when test="${failure != null}"> <tr> <td colspan="3" style="padding-left: 20px"> <junit:displayFailure current="${failure}"/> </td> </tr> </j:when> <j:when test="${error != null}"> <tr> <td colspan="3" style="padding-left: 20px"> <junit:displayFailure current="${error}"/> </td> </tr> </j:when> </j:choose> </j:forEach> </table> </subsection> </j:forEach> </section> <x:set var="errorCheck" select="/testsuites/testsuite/testcase/*" /> <j:if test="${!empty(errorCheck)}"> <section name="Failure details"> <x:forEach var="testcase" select="/testsuites/testsuite/testcase" trim="false"> <j:set var="failure" value="${testcase.selectSingleNode('failure')}"/> <j:set var="error" value="${testcase.selectSingleNode('error')}"/> <j:if test="${empty(failure)}"> <j:set var="failure" value="${error}"/> </j:if> <j:if test="${!empty(failure)}"> <j:set var="testname" value="${testcase.attribute('name').value}"/> <table summary="Failure details for ${testname}"> <thead> <tr> <td style="width:20px"> <j:choose> <j:when test="${!empty(error)}"> <junit:displayImage kind="error" /> </j:when> <j:otherwise> <junit:displayImage kind="failure"/> </j:otherwise> </j:choose> </td> <td style="width:96%"><strong><a name="${testname}">${testname}</a></strong></td> </tr> </thead> <tbody> <tr> <td colspan="2"><junit:displayFailure current="${failure}"/></td> </tr> <tr> <td colspan="2"> <!-- removing stacktrace generated by maven --> <!-- no way to preserve newlines, jelly strips out everything --> <code> ${stringTool.splitStringAtLastDelim(stringTool.splitStringAtLastDelim(failure.text, 'at org.apache.commons.jelly.tags.ant.AntTag.doTag').get(0), 'at sun.reflect.NativeMethodAccessorImpl.invoke0(').get(0)} </code> </td> </tr> </tbody> </table> </j:if> </x:forEach> </section> </j:if> </body> </document> </jsl:template> </jsl:stylesheet> 1.1 maven-plugins/hammurapi/xdocs/changes.xml Index: changes.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- /* * 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>Changes</title> <author email="">Arun Nachimuthu</author> </properties> <body> <release version="1.1" date="April-15-2006"> <action dev="anachimuthu0" type="add"> Moved plugin to SF.Net. </action> </release> <release version="1.0" date="Sep-05-2005"> <action dev="anachimuthu0" type="add"> Initial release of the plugin. </action> </release> </body> </document> 1.1 maven-plugins/hammurapi/xdocs/download.xml Index: download.xml =================================================================== <?xml version="1.0"?> <!-- /* * 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 Hammurapi Report Plug-in</title> <author email="">Arun Nachimuthu</author> </properties> <body> <section name="Download"> Please visit the <a href="http://maven-plugins.sourceforge.net/repository/maven-plugins/plugins">Plugin Repository</a> page to download the latest jar. </section> </body> </document> 1.1 maven-plugins/hammurapi/xdocs/faq.fml Index: faq.fml =================================================================== <?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. */ --> <faqs title="Frequently Asked Questions"> <part id="General"> <title>General</title> <!-- <faq id="release-date"> <question>When will be this plugin available?</question> <answer> The version 1.0 is being tested and will be released shortly. </answer> </faq> --> </part> </faqs> 1.1 maven-plugins/hammurapi/xdocs/goals.xml Index: goals.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- /* * 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 Hammurapi Plug-in Goals</title> <author email="">Arun Nachimuthu</author> </properties> <body> <goals> <goal> <name>hammurapi</name> <description> Generates a code review report </description> </goal> <goal> <name>hammurapi:report</name> <description> Generates a code review report </description> </goal> </goals> </body> </document> 1.1 maven-plugins/hammurapi/xdocs/index.xml Index: index.xml =================================================================== <?xml version="1.0"?> <!-- /* * 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 Lic... [truncated message content] |