Getting Started¶
Requirements:
Instancio is packaged as a multi-release JAR and can be used with Java 8 or higher.
It has a single compile dependency on org.slf4j:slf4j-api.
Since version 1.5.0 Instancio supports creating:
java.lang.Recordclasses on Java 16sealedclasses on Java 17
Dependencies¶
The following dependencies are available from Maven central:
| Dependency | JPMS Module Name | Description |
|---|---|---|
instancio-core | org.instancio.core | Core library |
instancio-junit | org.instancio.junit | JUnit Jupiter integration |
instancio-guava | org.instancio.guava | Support for Google Guava |
The org.instancio:instancio artifact on Maven central is an older dependency that should no longer be used.
instancio-junit¶
If you have JUnit 5 on the classpath, then use instancio-junit.
It includes a transitive dependency on instancio-core, therefore it is not necessary to import both.
instancio-core¶
If you use JUnit 4, TestNG, or would like to use Instancio standalone, then use instancio-core:
instancio-guava¶
Using instancio-guava requires the following dependencies on the classpath:
- either
instancio-coreorinstancio-junit com.google.guava:guavaversion23.1-jreor higher
Versioning¶
Instancio version numbers adhere to the MAJOR.MINOR.PATCH format.
- Major versions are generally reserved for significant features and breaking changes.
- Minor and Patch versions include bug fixes, smaller new features, but may also include minor breaking changes.
In other words, the project does not follow Semantic Versioning, though the versioning scheme loosely resembles it.