Add the LightAir Maven plugin configuration to the POM file:
<build> <pluginManagement> <plugins> <plugin> <!-- Run to generate XSDs: mvn light-air:generate-xsd --> <groupId>net.sf.lightairmp</groupId> <artifactId>light-air-maven-plugin</artifactId> <version>3.1.0</version> <dependencies> <!-- Add dependency to the database that you use in LightAir tests --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.200</version> </dependency> </dependencies> </plugin> </plugins> </pluginManagement> </build>
Replace the dependency with the database type that you actually use.
Run the LightAir Maven plugin to generate the XSD files:
mvn light-air:generate-xsd
After this the XSD files will get generated in the src/test/java source folder.
In your dataset XML file add the XML schema reference to the generated dataset.xsd file (assuming the dataset resides in directory one level below src/test/java):
<?xml version='1.0' encoding='UTF-8'?> <dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dataset.xsd"> <USER ID="1" EMAIL="name@server.com" FIRST_NAME="John" LAST_NAME="Doe" /> <USER_SYSTEM_ROLES /> <PROJECT /> </dataset>