-
-
Notifications
You must be signed in to change notification settings - Fork 2k
1.2.0 Upgrade Guide
There are only 2 breaking changes you need to watch out for.
For a while, Karate has been using the Maven Shade plugin to bundle a few dependencies within the karate-core
artifact. This was to reduce the likelihood of Karate dependencies "colliding" with other dependencies when you add Karate to an existing Maven or Gradle project that has a lot of other dependencies. For example a lot of Java projects directly or indirectly depend on Netty and Thymeleaf.
Now karate-core
will no longer "bundle" dependencies and be a normal "thin" Maven dependency. It will transitively pull in the other libraries Karate depends on. The reason for this change is partly due to security considerations, read this for more details.
If you want to get the old "fatjar" experience back, we now publish an additional artifact with the all
classifier.
This may not impact most projects, but if you face issues such as "class not found", just add <classifier>all</classifier>
in your pom.xml
(or build.gradle
).
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
<classifier>all</classifier>
</dependency>
This is also rarely used, but if you were using the "magic variable" called requestUri
like this:
Scenario: requestUri.startsWith('hello/')
That should now be:
Scenario: requestUri.startsWith('/hello/')