@Override
    public void execute() throws MojoExecutionException {
        TestAnnotationAnalyzer analyzer = new TestAnnotationAnalyzer();
        analyzeTestClasses(analyzer);
        TestDescriptor descriptor = TestDescriptor.from(
                TestDescriptor.CURRENT_VERSION,
                analyzer.systemTests(),
                analyzer.stagingTests(),
                analyzer.stagingSetupTests(),
                analyzer.productionTests());
        writeDescriptorFile(descriptor);
    }
Generates a test descriptor file based on content of the compiled test classes

@author bjorncs
vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/GenerateTestDescriptorMojo.java