+ private static String getMavenBuildDirectory(Verifier verifier) throws IOException {
+ Properties sp = new Properties();
+ try (InputStream is = new FileInputStream(verifier.getBasedir() + "/it-project.properties")) {
+ sp.load(is);
+ }
+ return sp.getProperty("target.dir");
+ }
+
+ private static Optional<String> getEffectiveSettingsXML() throws URISyntaxException, VerificationException, IOException {
+ final URL path = YangToSourcesPluginTestIT.class.getResource("/test-parent/pom.xml");
+ File buildDir = new File(path.toURI()).getParentFile().getParentFile().getParentFile();
+ File effectiveSettingsXML = new File(buildDir, "effective-settings.xml");
+ if (effectiveSettingsXML.exists()) {
+ return Optional.of(effectiveSettingsXML.getAbsolutePath());
+ } else {
+ fail(effectiveSettingsXML.getAbsolutePath());
+ return Optional.empty();
+ }
+ }
+