[Clirr-devel] CVS: clirr/maven project.xml,NONE,1.1 plugin.properties,NONE,1.1 plugin.jelly,NONE,1.1
Status: Alpha
Brought to you by:
lkuehne
From: Vincent M. <vm...@us...> - 2004-07-15 13:34:31
|
Update of /cvsroot/clirr/clirr/maven In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2426/maven Added Files: project.xml plugin.properties plugin.jelly .cvsignore Log Message: First cut of a Maven plugin for Clirr --- NEW FILE --- <?xml version="1.0" encoding="UTF-8"?> <project> <extend>${basedir}/../project.xml</extend> <id>clirr-maven</id> <name>Clirr Maven plugin</name> <!-- Note: Although we inherit from project.xml, we still cannot remove the <currentVersion> tag as this project.xml is parsed at runtime whenever our plugin is called. --> <currentVersion>0.4-SNAPSHOT</currentVersion> <package>net.sf.clirr.maven</package> <description>Maven plugin for Clirr</description> <shortDescription>Maven plugin for Clirr</shortDescription> <siteDirectory>/home/groups/c/cl/clirr/htdocs/maven</siteDirectory> <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/clirr/maven:clirr</connection> <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/clirr/maven</url> </repository> <dependencies> <dependency> <groupId>clirr</groupId> <artifactId>clirr-core</artifactId> <version>${pom.currentVersion}</version> </dependency> <dependency> <groupId>bcel</groupId> <artifactId>bcel</artifactId> <version>5.1</version> <url>http://jakarta.apache.org/bcel</url> </dependency> <dependency> <groupId>maven</groupId> <artifactId>maven</artifactId> <version>1.0-rc2</version> </dependency> <dependency> <groupId>commons-jelly</groupId> <artifactId>commons-jelly</artifactId> <version>20030902.160215</version> </dependency> <!-- Required only for the plugin's unit tests! --> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> </dependency> </dependencies> <build> <sourceDirectory>src/main</sourceDirectory> <resources> <resource> <directory>src/plugin-resources</directory> <targetPath>plugin-resources</targetPath> </resource> <resource> <directory>.</directory> <includes> <include>plugin.jelly</include> <include>plugin.properties</include> <include>project.properties</include> <include>project.xml</include> </includes> </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-file-activity-plugin</report> <report>maven-license-plugin</report> <report>maven-linkcheck-plugin</report> </reports> </project> --- NEW FILE --- # ------------------------------------------------------------------- # Default properties for the Clirr Plugin # ------------------------------------------------------------------- # Decide whether the plugin will try to download the baseline jar or not clirr.baseline.download = true # (optional) Baseline version to check binary compatibility with. # If the clirr.compatibility.version property is not defined, we get # the last released version from the POM using the <versions> tag. We # assume the latest version is the last one in the <version> list. # # Example: # clirr.baseline.version = 0.3 # (optional) By default the plugin tries to guess the value of # clirr.baseline.destination. However you can override this property if you # wish to point to a jar located in a specific location you wish to use # rather than the default which is in the local repository. # # Note If you specify this property, the plugin will not try to download the # baseline jar # # Ex: clirr.baseline.destination = /tmp/myjar.jar # Type of the project artifact to verify clirr.baseline.type = jar # Location where the project artifacts can be found. clirr.baseline.url = http://www.ibiblio.org/maven/${pom.groupId}/${clirr.baseline.type}s # Decide whether to fail the build on Clirr-detected warnings. clirr.fail.on.warning = false # Decide whether to fail the build on Clirr-detected errors. clirr.fail.on.error = true # Name and location of the XML Clirr-generated report file clirr.report.file = ${maven.build.dir}/clirr.xml --- NEW FILE --- <?xml version="1.0"?> <!-- ============================================================================= Maven plugin for Clirr. ============================================================================= --> <project xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant" xmlns:x="jelly:xml"> <!-- ======================================================================== Default goal. ======================================================================== --> <goal name="clirr" description="Run binary compatibility check" prereqs="clirr:check"/> <!-- ======================================================================== Initializations. ======================================================================== --> <goal name="clirr:init"> <ant:path id="clirr.classpath"> <ant:pathelement location="${plugin.getDependencyPath('clirr:clirr-core')}"/> <ant:pathelement location="${plugin.getDependencyPath('bcel:bcel')}"/> </ant:path> <ant:taskdef resource="clirrtask.properties" classpathref="clirr.classpath"/> </goal> <!-- ======================================================================== Download baseline version ======================================================================== --> <goal name="clirr:download-baseline" prereqs="clirr:init"> <!-- If the clirr.baseline.version property is not defined, we get the last released version from the POM using the <versions> tag. We assume the latest version is the last one in the <version> list. --> <j:invokeStatic var="latestVersion" method="getLatestVersion" className="net.sf.clirr.maven.ClirrUtils"> <j:arg type="java.util.List" value="${pom.versions}"/> </j:invokeStatic> <j:if test="${latestVersion == null}"> <ant:fail>No released version found in the POM. Please specify a baseline version using the clirr.baseline.version property.</ant:fail> </j:if> <!-- Compute baseline jar name/url --> <j:set var="clirr.baseline.jar" value="${pom.artifactId}-${latestVersion}.${clirr.baseline.type}"/> <j:set var="clirr.baseline.url" value="${clirr.baseline.url}/${clirr.baseline.jar}"/> <!-- Location where to put downloaded baseline jar --> <j:set var="clirr.baseline.destination" value="${maven.repo.local}/${pom.groupId}/${clirr.baseline.type}s/${clirr.baseline.jar}"/> <!-- Download baseline jar if online --> <j:choose> <j:when test="${maven.mode.online}"> <!-- TODO: Improve error reporting when working offline or when an error occurs in the call to HttpUtils.getFile() --> <j:invokeStatic method="getBaselineJar" className="net.sf.clirr.maven.ClirrUtils"> <j:arg type="org.apache.maven.jelly.MavenJellyContext" value="${context}"/> </j:invokeStatic> </j:when> <j:otherwise> <ant:available property="baselineJarPresent" file="${clirr.baseline.destination}"/> <j:if test="${baselineJarPresent == null}"> <ant:fail>Cannot find file [${clirr.baseline.destination}]</ant:fail> </j:if> </j:otherwise> </j:choose> </goal> <!-- ======================================================================== Run binary compatibility checks. ======================================================================== --> <goal name="clirr:check" prereqs="clirr:init" description="Run binary compatibility check"> <j:if test="${context.getVariable('clirr.baseline.download') == true and context.getVariable('clirr.baseline.destination') == null}"> <attainGoal name="clirr:download-baseline"/> </j:if> <attainGoal name="jar:jar"/> <ant:dirname property="clirr.baseline.destination.dir" file="${clirr.baseline.destination}"/> <ant:basename property="clirr.baseline.destination.basename" file="${clirr.baseline.destination}"/> <clirr failOnWarning="${clirr.fail.on.warning}" failOnError="${clirr.fail.on.error}"> <origFiles dir="${clirr.baseline.destination.dir}" includes="${clirr.baseline.destination.basename}"/> <newFiles dir="${maven.build.dir}" includes="${maven.final.name}.jar"/> <formatter type="xml" outfile="${clirr.report.file}"/> </clirr> </goal> </project> --- NEW FILE --- target |