api-change profile now works with master
+ Adding script to collect all clirr:clirr into single html report
This commit is contained in:
parent
a1e43f39ec
commit
4ca7673c3f
|
@ -65,6 +65,18 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.neo4j.build.plugins</groupId>
|
||||
<artifactId>clirr-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Clirr fails with "org.apache.tools.ant.Task not found" on this project -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
|
|
41
pom.xml
41
pom.xml
|
@ -458,6 +458,22 @@
|
|||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>3.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.neo4j.build.plugins</groupId>
|
||||
<artifactId>clirr-maven-plugin</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<configuration>
|
||||
<htmlOutputFile>clirr-report.html</htmlOutputFile>
|
||||
<xmlOutputFile>${project.build.directory}/clirr-report.xml</xmlOutputFile>
|
||||
<failOnError>true</failOnError>
|
||||
<failOnWarning>true</failOnWarning>
|
||||
<failOnInfo>false</failOnInfo>
|
||||
<logResults>true</logResults>
|
||||
<minSeverity>info</minSeverity>
|
||||
<comparisonVersion>9.3.8.v20160314</comparisonVersion>
|
||||
<ignoreMaintenenceVersions>false</ignoreMaintenenceVersions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
@ -833,31 +849,6 @@
|
|||
<module>aggregates/jetty-all-compact3</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>api-change</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>clirr-maven-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compare-api</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>clirr</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<minSeverity>info</minSeverity>
|
||||
<comparisonVersion>9.3.8.v20160314</comparisonVersion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>8u00</id>
|
||||
<activation>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
</body>
|
||||
</head>
|
||||
</html>
|
|
@ -0,0 +1,54 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>CLIRR Master Index</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background-color: white;
|
||||
}
|
||||
.project {
|
||||
border: 1px dotted #ccc;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
.project>.name {
|
||||
font-size: 1.2em;
|
||||
background-color: #ccc;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.project .classname {
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
.project .classname .name {
|
||||
font-family: monospace;
|
||||
background-color: #ddd;
|
||||
padding: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.difference {
|
||||
font-family: sans-serif;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.severity .type {
|
||||
margin-left: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
font-size: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
color: white;
|
||||
width: 4em;
|
||||
text-align: center;
|
||||
}
|
||||
.severity .error {
|
||||
background-color: red;
|
||||
}
|
||||
.severity .warning {
|
||||
background-color: magenta;
|
||||
}
|
||||
.severity .info {
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<h1>Master Clirr Index</h1>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html"/>
|
||||
<xsl:param name="reportpath"/>
|
||||
<xsl:key name="kClass" match="difference" use="@class"/>
|
||||
|
||||
<xsl:template match="/*">
|
||||
<div class="project">
|
||||
<div class="name">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text>../../</xsl:text>
|
||||
<xsl:value-of select="$reportpath"/>
|
||||
<xsl:text>/target/site/clirr-report.html</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$reportpath"/>
|
||||
</a>
|
||||
</div>
|
||||
<xsl:apply-templates mode="by_class" select=
|
||||
"difference[generate-id() = generate-id(key('kClass', @class)[1])]">
|
||||
<xsl:sort select="@class"/>
|
||||
</xsl:apply-templates>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="by_class" match="difference">
|
||||
<div class="classname">
|
||||
<div class="name"><xsl:value-of select="@class"/></div>
|
||||
<xsl:call-template name="by_severity">
|
||||
<xsl:with-param name="rawseverity">ERROR</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="by_severity">
|
||||
<xsl:with-param name="rawseverity">WARNING</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="by_severity">
|
||||
<xsl:with-param name="rawseverity">INFO</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="by_severity">
|
||||
<xsl:param name="rawseverity"/>
|
||||
<xsl:if test="count(key('kClass', @class)[@binseverity=$rawseverity]) > 0">
|
||||
<div class="severity">
|
||||
<div>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:text>type </xsl:text>
|
||||
<xsl:call-template name="get_severity">
|
||||
<xsl:with-param name="rawseverity" select="$rawseverity"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="get_severity">
|
||||
<xsl:with-param name="rawseverity" select="$rawseverity"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
<ol class="difference">
|
||||
<xsl:apply-templates mode="by_difference"
|
||||
select="key('kClass', @class)[@binseverity=$rawseverity]"/>
|
||||
</ol>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="by_difference" match="difference">
|
||||
<li><xsl:value-of select="text()"/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="get_severity">
|
||||
<xsl:param name="rawseverity" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$rawseverity='ERROR'">
|
||||
<xsl:text>error</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$rawseverity='WARNING'">
|
||||
<xsl:text>warning</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$rawseverity='INFO'">
|
||||
<xsl:text>info</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPTSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ ! -d "target/clirr" ] ; then
|
||||
mkdir -p "target/clirr"
|
||||
fi
|
||||
|
||||
MIDX="target/clirr/index.html"
|
||||
|
||||
cat $SCRIPTSDIR/clirr-gen-master-index.output-head.html > $MIDX
|
||||
|
||||
find . -type f -name "clirr-report.xml" -print0 | while IFS= read -r -d $'\0' line; do
|
||||
shortname=$(echo $line | sed -e "s/^[^\/]\/*//;s/\/target.*//")
|
||||
xsltproc --stringparam reportpath "$shortname" \
|
||||
$SCRIPTSDIR/clirr-gen-master-index.output-html.xslt \
|
||||
$line >> $MIDX
|
||||
echo "$shortname"
|
||||
done
|
||||
|
||||
cat $SCRIPTSDIR/clirr-gen-master-index.output-foot.html >> $MIDX
|
||||
|
||||
echo ""
|
||||
echo "Master Clirr Index generated at at $MIDX"
|
||||
|
Loading…
Reference in New Issue