Skip to content

Commit 558cf7d

Browse files
committed
Add CLI readme
1 parent 67faf11 commit 558cf7d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,55 @@ import com.github.lolgab.mill.mima._
8989

9090
Please check [this page](https://github.com/lolgab/mill-mima) for further information.
9191

92+
### CLI
93+
94+
You can use MiMa using its command-line interface - it's the most straightforward way to compare two jars and see some human-readable descriptions of the issues.
95+
96+
You can launch it with Coursier:
97+
98+
```bash
99+
cs launch com.typesafe:mima-cli_3:latest.release -- old.jar new.jar
100+
```
101+
102+
Or create a reusable script:
103+
104+
```bash
105+
cs bootstrap com.typesafe:mima-cli_3:latest.release --output mima
106+
./mima old.jar new.jar
107+
```
108+
109+
Here are the usage instructions:
110+
111+
```
112+
Usage:
113+
114+
mima [OPTIONS] oldfile newfile
115+
116+
oldfile: Old (or, previous) files - a JAR or a directory containing classfiles
117+
newfile: New (or, current) files - a JAR or a directory containing classfiles
118+
119+
Options:
120+
-cp CLASSPATH:
121+
Specify Java classpath, separated by ':'
122+
123+
-v, --verbose:
124+
Show a human-readable description of each problem
125+
126+
-f, --forward-only:
127+
Show only forward-binary-compatibility problems
128+
129+
-b, --backward-only:
130+
Show only backward-binary-compatibility problems
131+
132+
-g, --include-generics:
133+
Include generic signature problems, which may not directly cause bincompat
134+
problems and are hidden by default. Has no effect if using --forward-only.
135+
136+
-j, --bytecode-names:
137+
Show bytecode names of fields and methods, rather than human-readable names
138+
```
139+
140+
92141
## Filtering binary incompatibilities
93142

94143
When MiMa reports a binary incompatibility that you consider acceptable, such as a change in an internal package,

0 commit comments

Comments
 (0)