The Jakarta Data project, a part of the Jakarta EE ecosystem, aims to simplify the development of data-centric applications by providing a standard API for accessing and manipulating data from various sources. As with any standard, the Jakarta Data project requires a Technology Compatibility Kit (TCK) to ensure compliance and interoperability among different implementations. This document presents a proposal for the Jakarta Data TCK, focusing on delegating Dependency Injection (DI) and annotations to the vendors.
<dependency>
<groupId>br.org.soujava.jakarta</groupId>
<artifactId>tck</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
This moment, be free to use either the entity’s implementation annotation and the repository supplier.
//vendor annotations
public class BookAnyVendor implements Book {
}
@Repository
public interface Library extends CrudRepository<BookAnyVendor, String> {
}
On this step implement the classes to create the entity and the DI engine.
public class BookVendorSupplier implements BookSupplier {
//implementation
}
public class DISupplier implements ContainerSupplier {
//implementation
}
Include these suppliers at the maven test:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<dependenciesToScan>
<dependency>br.org.soujava.jakarta:tck</dependency>
</dependenciesToScan>
</configuration>
</plugin>