static String generatePomXml(TestProfile testProfile, List<Path> artifacts, Path testArtifact) {
        String properties = artifacts.stream()
                .map(path -> PROPERTY_TEMPLATE
                        .replace("%ARTIFACT_ID%", path.getFileName().toString())
                        .replace("%JAR_PATH%", path.toString()))
                .collect(Collectors.joining());
        String dependencies = artifacts.stream()
                .map(path -> DEPENDENCY_TEMPLATE
                        .replace("%ARTIFACT_ID%", path.getFileName().toString()))
                .collect(Collectors.joining());
        String dependenciesToScan =
                DEPENDENCY_TO_SCAN_TEMPLATE
                        .replace("%ARTIFACT_ID%", testArtifact.getFileName().toString());

        return POM_XML_TEMPLATE
                .replace("%PROPERTIES%", properties)
                .replace("%DEPENDENCIES_TO_SCAN%", dependenciesToScan)
                .replace("%DEPENDENCIES%", dependencies)
                .replace("%GROUPS%", testProfile.group());
    }
Generates a pom.xml file that sets up build profile to test against the provided
jar artifacts.

@author valerijf
vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/PomXmlGenerator.java