Differences between revisions 1 and 2
Revision 1 as of 2015-08-17 17:36:05
Size: 3163
Editor: sebbapache
Comment: How to use Shade with Clirr
Revision 2 as of 2015-08-17 18:36:47
Size: 3164
Editor: sebbapache
Comment: We don't need the extra POM
Deletions are marked like this. Additions are marked like this.
Line 78: Line 78:
              <createDependencyReducedPom>true</createDependencyReducedPom>               <createDependencyReducedPom>false</createDependencyReducedPom>

This page describes how one can use Clirr with Shade to compare components that have changed packages.

Clirr compares different versions of classes with the same package name Shade can be used to change package names throughout a jar file By combining the two, it is possible to use Clirr to check classes that are now in a new package.

The process is:

  • use Shade to convert the old package names to the new package names
  • install the shaded jar in the local repository
  • run Clirr against the shaded jar

Here is a sample POM (shade.xml) for comparing org.apache.bcel:bcel:5.2 against org.apache.commons:commons-bcel6:6.0

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <!-- New Maven co-ordinates -->
  <name>Commons BCEL shader</name>
  This POM can be used to install a shaded version of BCEL 5.2
  in the local repo. Usage:

  mvn -f shade.xml install

  You can then run Clirr using the default POM:

  mvn clirr:clirr

    <!-- Ensure local files are not compiled -->
    <!-- Source jar -->
      <!-- Exclude all dependencies, we don't want them in the shaded jar -->
              <!-- specify old and new base package names -->

UseClirrWithShade (last edited 2015-08-17 18:36:47 by sebbapache)