From 9f795bf1804070736689e7fde9ae636ac65da5aa Mon Sep 17 00:00:00 2001 From: Martin Vitez Date: Tue, 8 Jul 2014 08:56:03 +0200 Subject: [PATCH 1/1] BUG-1170: removed hardcoding of test build directory. Change-Id: I1410b84d7a7a1f9720e0414cf799f42f90b1ed16 Signed-off-by: Martin Vitez --- .../plugin/it/YangToSourcesPluginTestIT.java | 73 +++++++++---------- .../AdditionalConfig/pom.xml | 35 +++++---- .../{ => test-parent}/Correct/pom.xml | 25 ++++--- .../{ => test-parent}/GenerateTest1/pom.xml | 32 +++++--- .../src/main/resources/testfile1.yang | 0 .../src/main/resources/testfile2.yang | 0 .../src/main/resources/testfile3.yang | 0 .../{ => test-parent}/GenerateTest2/pom.xml | 29 +++++--- .../GenerateTest2/yang/private.yang | 0 .../{ => test-parent}/Generator/pom.xml | 19 +++-- .../{ => test-parent}/InvalidVersion/pom.xml | 14 ++-- .../MissingYangInDep/pom.xml | 21 +++--- .../MissingYangInDep/yang/private.yang | 0 .../{ => test-parent}/NamingConflict/pom.xml | 16 ++-- .../NamingConflict/src/main/yang/test.yang | 0 .../{ => test-parent}/NoGenerators/pom.xml | 21 +++--- .../{ => test-parent}/NoOutputDir/pom.xml | 25 ++++--- .../{ => test-parent}/NoYangFiles/pom.xml | 21 +++--- .../UnknownGenerator/pom.xml | 20 ++--- .../YangRootNotExist/pom.xml | 20 ++--- .../{ => test-parent}/files/testfile1.yang | 0 .../{ => test-parent}/files/testfile2.yang | 0 .../{ => test-parent}/files/testfile3.yang | 0 .../src/test/resources/test-parent/pom.xml | 59 +++++++++++++++ 24 files changed, 259 insertions(+), 171 deletions(-) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/AdditionalConfig/pom.xml (77%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/Correct/pom.xml (78%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest1/pom.xml (70%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest1/src/main/resources/testfile1.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest1/src/main/resources/testfile2.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest1/src/main/resources/testfile3.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest2/pom.xml (76%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/GenerateTest2/yang/private.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/Generator/pom.xml (83%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/InvalidVersion/pom.xml (93%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/MissingYangInDep/pom.xml (83%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/MissingYangInDep/yang/private.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/NamingConflict/pom.xml (89%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/NamingConflict/src/main/yang/test.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/NoGenerators/pom.xml (81%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/NoOutputDir/pom.xml (75%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/NoYangFiles/pom.xml (80%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/UnknownGenerator/pom.xml (82%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/YangRootNotExist/pom.xml (76%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/files/testfile1.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/files/testfile2.yang (100%) rename yang/yang-maven-plugin-it/src/test/resources/{ => test-parent}/files/testfile3.yang (100%) create mode 100644 yang/yang-maven-plugin-it/src/test/resources/test-parent/pom.xml diff --git a/yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java b/yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java index daf737089d..663bf571e5 100644 --- a/yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java +++ b/yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java @@ -13,29 +13,23 @@ import static org.junit.matchers.JUnitMatchers.containsString; import java.io.File; import java.io.FileInputStream; -import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.net.URL; import java.util.List; import java.util.Properties; - import org.apache.maven.it.VerificationException; import org.apache.maven.it.Verifier; -import org.junit.BeforeClass; import org.junit.Test; public class YangToSourcesPluginTestIT { - private static final String SRC_PROPERTIES = "target/it-project.properties"; - private static final String VERSION_PROP = "it-project.version"; - private static Properties props; // TODO Test yang files in transitive dependencies @Test public void testYangRootNotExist() throws URISyntaxException { try { - setUp("YangRootNotExist/", false); + setUp("test-parent/YangRootNotExist/", false); } catch (VerificationException e) { assertVerificationException(e, "[ERROR] yang-to-sources: Unable to parse yang files from "); @@ -50,13 +44,13 @@ public class YangToSourcesPluginTestIT { @Test public void testCorrect() throws Exception { - Verifier v = setUp("Correct/", false); + Verifier v = setUp("test-parent/Correct/", false); verifyCorrectLog(v); } @Test public void testAdditionalConfiguration() throws Exception { - Verifier v = setUp("AdditionalConfig/", false); + Verifier v = setUp("test-parent/AdditionalConfig/", false); v.verifyTextInLog("[DEBUG] yang-to-sources: Additional configuration picked up for : org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl: {nm1=abcd=a.b.c.d, nm2=abcd2=a.b.c.d.2}"); v.verifyTextInLog("[DEBUG] yang-to-sources: Additional configuration picked up for : org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl: {c1=config}"); v.verifyTextInLog(File.separator @@ -69,7 +63,7 @@ public class YangToSourcesPluginTestIT { @Test public void testMissingYangInDep() throws Exception { try { - setUp("MissingYangInDep/", false); + setUp("test-parent/MissingYangInDep/", false); } catch (VerificationException e) { assertVerificationException( e, @@ -82,7 +76,7 @@ public class YangToSourcesPluginTestIT { @Test public void testNamingConflict() throws Exception { - Verifier v = setUp("NamingConflict/", false); + Verifier v = setUp("test-parent/NamingConflict/", false); v.verifyErrorFreeLog(); String baseDir = v.getBasedir(); String fileName = v.getLogFileName(); @@ -104,21 +98,21 @@ public class YangToSourcesPluginTestIT { @Test public void testNoGenerators() throws Exception { - Verifier v = setUp("NoGenerators/", false); + Verifier v = setUp("test-parent/NoGenerators/", false); v.verifyErrorFreeLog(); v.verifyTextInLog("[WARNING] yang-to-sources: No code generators provided"); } @Test public void testInvalidVersion() throws Exception { - Verifier v = setUp("InvalidVersion/", false); + Verifier v = setUp("test-parent/InvalidVersion/", false); v.verifyErrorFreeLog(); v.verifyTextInLog("[WARNING] yang-to-sources: Dependency resolution conflict:"); } @Test public void testUnknownGenerator() throws Exception { - Verifier v = setUp("UnknownGenerator/", true); + Verifier v = setUp("test-parent/UnknownGenerator/", true); v.verifyTextInLog("[ERROR] yang-to-sources: Unable to generate sources with unknown generator"); v.verifyTextInLog("java.lang.ClassNotFoundException: unknown"); v.verifyTextInLog("[INFO] yang-to-sources: Code generator instantiated from org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl"); @@ -128,7 +122,7 @@ public class YangToSourcesPluginTestIT { @Test public void testNoYangFiles() throws Exception { - Verifier v = setUp("NoYangFiles/", false); + Verifier v = setUp("test-parent/NoYangFiles/", false); v.verifyTextInLog("[INFO] yang-to-sources: No input files found"); } @@ -137,17 +131,6 @@ public class YangToSourcesPluginTestIT { assertThat(e.getMessage(), containsString(string)); } - @BeforeClass - public static void generateProps() throws IOException { - final Properties sp = new Properties(); - try (InputStream is = new FileInputStream(new File(SRC_PROPERTIES))) { - sp.load(is); - } - - props = new Properties(System.getProperties()); - props.put(VERSION_PROP, sp.getProperty(VERSION_PROP)); - } - static Verifier setUp(String project, boolean ignoreF) throws VerificationException, URISyntaxException { final URL path = YangToSourcesPluginTestIT.class.getResource("/" @@ -157,34 +140,48 @@ public class YangToSourcesPluginTestIT { if (ignoreF) verifier.addCliOption("-fn"); verifier.setMavenDebug(true); - verifier.setSystemProperties(props); verifier.executeGoal("generate-sources"); return verifier; } @Test public void testNoOutputDir() throws Exception { - Verifier v = YangToSourcesPluginTestIT.setUp("NoOutputDir/", false); + Verifier v = YangToSourcesPluginTestIT.setUp("test-parent/NoOutputDir/", false); verifyCorrectLog(v); } @Test public void testFindResourceOnCp() throws Exception { Verifier v1 = new Verifier(new File(getClass().getResource( - "/GenerateTest1/pom.xml").toURI()).getParent()); - v1.setSystemProperties(props); + "/test-parent/GenerateTest1/pom.xml").toURI()).getParent()); v1.executeGoal("clean"); v1.executeGoal("package"); - v1.assertFilePresent("target/classes/META-INF/yang/testfile1.yang"); - v1.assertFilePresent("target/classes/META-INF/yang/testfile2.yang"); - v1.assertFilePresent("target/classes/META-INF/yang/testfile3.yang"); - Verifier v2 = YangToSourcesPluginTestIT.setUp("GenerateTest2/", false); + Properties sp = new Properties(); + try (InputStream is = new FileInputStream(v1.getBasedir() + "/it-project.properties")) { + sp.load(is); + } + String buildDir = sp.getProperty("target.dir"); + + v1.assertFilePresent(buildDir + "/classes/META-INF/yang/testfile1.yang"); + v1.assertFilePresent(buildDir + "/classes/META-INF/yang/testfile2.yang"); + v1.assertFilePresent(buildDir + "/classes/META-INF/yang/testfile3.yang"); + + Verifier v2 = new Verifier(new File(getClass().getResource( + "/test-parent/GenerateTest2/pom.xml").toURI()).getParent()); v2.executeGoal("clean"); v2.executeGoal("package"); - v2.assertFilePresent("target/classes/META-INF/yang/private.yang"); - v2.assertFileNotPresent("target/classes/META-INF/yang/testfile1.yang"); - v2.assertFileNotPresent("target/classes/META-INF/yang/testfile2.yang"); - v2.assertFileNotPresent("target/classes/META-INF/yang/testfile3.yang"); + + sp = new Properties(); + try (InputStream is = new FileInputStream(v2.getBasedir() + "/it-project.properties")) { + sp.load(is); + } + buildDir = sp.getProperty("target.dir"); + + v2.assertFilePresent(buildDir + "/classes/META-INF/yang/private.yang"); + v2.assertFileNotPresent(buildDir + "/classes/META-INF/yang/testfile1.yang"); + v2.assertFileNotPresent(buildDir + "/classes/META-INF/yang/testfile2.yang"); + v2.assertFileNotPresent(buildDir + "/classes/META-INF/yang/testfile3.yang"); } + } diff --git a/yang/yang-maven-plugin-it/src/test/resources/AdditionalConfig/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/AdditionalConfig/pom.xml similarity index 77% rename from yang/yang-maven-plugin-it/src/test/resources/AdditionalConfig/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/AdditionalConfig/pom.xml index 812bcb9806..28bb2d9b70 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/AdditionalConfig/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/AdditionalConfig/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - test + + org.opendaylight.yangtools + test-parent + 1.0 + + + additional-config @@ -47,8 +48,8 @@ abcd2=a.b.c.d.2 /target/resourcesGenerated - - target/AdditionalConfig + + target/AdditionalConfig @@ -58,15 +59,14 @@ config - - target/AdditionalConfig + + target/AdditionalConfig - org.opendaylight.yangtools @@ -76,6 +76,11 @@ + + org.codehaus.mojo + properties-maven-plugin + + diff --git a/yang/yang-maven-plugin-it/src/test/resources/Correct/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/Correct/pom.xml similarity index 78% rename from yang/yang-maven-plugin-it/src/test/resources/Correct/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/Correct/pom.xml index 91b36ab33b..82640e8ee6 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/Correct/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/Correct/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - test + + org.opendaylight.yangtools + test-parent + 1.0 + + + correct @@ -42,8 +43,8 @@ org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl - - target/correct + + target/correct diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/pom.xml similarity index 70% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/pom.xml index fa91fc0f6b..cd7be965d1 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/pom.xml @@ -1,19 +1,24 @@ - + 4.0.0 - org.opendaylight.yangtools + + org.opendaylight.yangtools + test-parent + 1.0 + + generator-test1 - 0.5-SNAPSHOT + + + ${project.build.directory} + @@ -34,15 +39,14 @@ org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl - - target/GenerateTest1 + + target/GenerateTest1 - org.opendaylight.yangtools @@ -52,6 +56,10 @@ + + org.codehaus.mojo + properties-maven-plugin + diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile1.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile1.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile1.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile1.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile2.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile2.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile2.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile2.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile3.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile3.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile3.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile3.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/pom.xml similarity index 76% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/pom.xml index 3a5685740f..948c025898 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/pom.xml @@ -1,20 +1,24 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT + + org.opendaylight.yangtools + test-parent + 1.0 + + generator-test2 + + ${project.build.directory} + @@ -22,7 +26,7 @@ generator-test1 ${it-project.version} system - ${project.basedir}/../GenerateTest1/target/generator-test1-0.5-SNAPSHOT.jar + ${project.basedir}/../GenerateTest1/target/generator-test1-1.0.jar @@ -53,7 +57,6 @@ - org.opendaylight.yangtools @@ -63,6 +66,10 @@ + + org.codehaus.mojo + properties-maven-plugin + diff --git a/yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/yang/private.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/yang/private.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/yang/private.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/yang/private.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/Generator/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/Generator/pom.xml similarity index 83% rename from yang/yang-maven-plugin-it/src/test/resources/Generator/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/Generator/pom.xml index d81b6aba8d..be217f8d62 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/Generator/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/Generator/pom.xml @@ -1,21 +1,20 @@ - + 4.0.0 + - binding-generator org.opendaylight.yangtools - ${it-project.version} + test-parent + 1.0 - test + + generator diff --git a/yang/yang-maven-plugin-it/src/test/resources/InvalidVersion/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/InvalidVersion/pom.xml similarity index 93% rename from yang/yang-maven-plugin-it/src/test/resources/InvalidVersion/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/InvalidVersion/pom.xml index d33ca7d77f..8c45963a8d 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/InvalidVersion/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/InvalidVersion/pom.xml @@ -8,13 +8,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - test + + org.opendaylight.yangtools + test-parent + 1.0 + + + invalid-version - diff --git a/yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/pom.xml similarity index 83% rename from yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/pom.xml index 183da0a18a..8ade2b1a9c 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - generator-test2 + + org.opendaylight.yangtools + test-parent + 1.0 + + + missing-yang-in-dep diff --git a/yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/yang/private.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/yang/private.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/yang/private.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/yang/private.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/NamingConflict/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/pom.xml similarity index 89% rename from yang/yang-maven-plugin-it/src/test/resources/NamingConflict/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/pom.xml index 0bae0b6853..6fc2c80705 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/NamingConflict/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/pom.xml @@ -1,16 +1,20 @@ - 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - test + + org.opendaylight.yangtools + test-parent + 1.0 + + + naming-conflict diff --git a/yang/yang-maven-plugin-it/src/test/resources/NamingConflict/src/main/yang/test.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/src/main/yang/test.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/NamingConflict/src/main/yang/test.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/src/main/yang/test.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/NoGenerators/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoGenerators/pom.xml similarity index 81% rename from yang/yang-maven-plugin-it/src/test/resources/NoGenerators/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/NoGenerators/pom.xml index e1a3933a2d..d236de3e0a 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/NoGenerators/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoGenerators/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 + org.opendaylight.yangtools - 0.5-SNAPSHOT - test + test-parent + 1.0 + + + no-generators @@ -44,7 +45,7 @@ - + org.opendaylight.yangtools yang-maven-plugin-spi diff --git a/yang/yang-maven-plugin-it/src/test/resources/NoOutputDir/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoOutputDir/pom.xml similarity index 75% rename from yang/yang-maven-plugin-it/src/test/resources/NoOutputDir/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/NoOutputDir/pom.xml index cd796d4973..20ba31ae92 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/NoOutputDir/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoOutputDir/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - test - 0.5-SNAPSHOT + + org.opendaylight.yangtools + test-parent + 1.0 + + + no-output-dir @@ -34,8 +35,8 @@ org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl - - target/NoOutputDir + + target/NoOutputDir diff --git a/yang/yang-maven-plugin-it/src/test/resources/NoYangFiles/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoYangFiles/pom.xml similarity index 80% rename from yang/yang-maven-plugin-it/src/test/resources/NoYangFiles/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/NoYangFiles/pom.xml index 0161c3c788..3cac79593b 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/NoYangFiles/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/NoYangFiles/pom.xml @@ -1,19 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT - test + + org.opendaylight.yangtools + test-parent + 1.0 + + + no-yang-files diff --git a/yang/yang-maven-plugin-it/src/test/resources/UnknownGenerator/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/UnknownGenerator/pom.xml similarity index 82% rename from yang/yang-maven-plugin-it/src/test/resources/UnknownGenerator/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/UnknownGenerator/pom.xml index 8d144030fa..853e8e0c0e 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/UnknownGenerator/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/UnknownGenerator/pom.xml @@ -1,20 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT + + org.opendaylight.yangtools + test-parent + 1.0 + - test + unknown-generator diff --git a/yang/yang-maven-plugin-it/src/test/resources/YangRootNotExist/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/YangRootNotExist/pom.xml similarity index 76% rename from yang/yang-maven-plugin-it/src/test/resources/YangRootNotExist/pom.xml rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/YangRootNotExist/pom.xml index 4188e0304e..8bb27a854b 100644 --- a/yang/yang-maven-plugin-it/src/test/resources/YangRootNotExist/pom.xml +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/YangRootNotExist/pom.xml @@ -1,20 +1,20 @@ - + 4.0.0 - org.opendaylight.yangtools - 0.5-SNAPSHOT + + org.opendaylight.yangtools + test-parent + 1.0 + - test + yang-root-not-exist diff --git a/yang/yang-maven-plugin-it/src/test/resources/files/testfile1.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile1.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/files/testfile1.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile1.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/files/testfile2.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile2.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/files/testfile2.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile2.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/files/testfile3.yang b/yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile3.yang similarity index 100% rename from yang/yang-maven-plugin-it/src/test/resources/files/testfile3.yang rename to yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile3.yang diff --git a/yang/yang-maven-plugin-it/src/test/resources/test-parent/pom.xml b/yang/yang-maven-plugin-it/src/test/resources/test-parent/pom.xml new file mode 100644 index 0000000000..58085fce5f --- /dev/null +++ b/yang/yang-maven-plugin-it/src/test/resources/test-parent/pom.xml @@ -0,0 +1,59 @@ + + + + + 4.0.0 + + org.opendaylight.yangtools + test-parent + 1.0 + pom + + + 0.6.2-SNAPSHOT + + + + additional-config + correct + generate-test1 + generate-test2 + generator + invalid-version + missing-yang-in-dep + naming-conflict + no-generators + no-output-dir + no-yang-files + unknown-generator + yang-root-not-exist + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0-alpha-2 + + + generate-resources + + write-project-properties + + + it-project.properties + + + + + + + + + -- 2.36.6