Such definition present in source code would resolve some datasources referenced from persistence.xml.
One issue with DataSourceDefinition is that they don't define the driver in use.
For example:
Parsing the url seems a bit tricky TBH. I kind of think we should maybe have a default, h2, and potentially fail if the url doesn't start with jdbc:h2 and require a defined database driver.
Such definition present in source code would resolve some datasources referenced from persistence.xml. One issue with DataSourceDefinition is that they don't define the driver in use. For example:
The URL needs to be parsed to understand that the h2 driver is required.