BUG-1170: removed hardcoding of test build directory. 82/8782/1
authorMartin Vitez <mvitez@cisco.com>
Tue, 8 Jul 2014 06:56:03 +0000 (08:56 +0200)
committerMartin Vitez <mvitez@cisco.com>
Tue, 8 Jul 2014 09:00:22 +0000 (11:00 +0200)
Change-Id: I1410b84d7a7a1f9720e0414cf799f42f90b1ed16
Signed-off-by: Martin Vitez <mvitez@cisco.com>
24 files changed:
yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java
yang/yang-maven-plugin-it/src/test/resources/test-parent/AdditionalConfig/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/AdditionalConfig/pom.xml with 77% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/Correct/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/Correct/pom.xml with 78% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/pom.xml with 70% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile1.yang [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile1.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile2.yang [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile2.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest1/src/main/resources/testfile3.yang [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest1/src/main/resources/testfile3.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/pom.xml with 76% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/GenerateTest2/yang/private.yang [moved from yang/yang-maven-plugin-it/src/test/resources/GenerateTest2/yang/private.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/Generator/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/Generator/pom.xml with 83% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/InvalidVersion/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/InvalidVersion/pom.xml with 93% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/pom.xml with 83% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/MissingYangInDep/yang/private.yang [moved from yang/yang-maven-plugin-it/src/test/resources/MissingYangInDep/yang/private.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/NamingConflict/pom.xml with 89% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/NamingConflict/src/main/yang/test.yang [moved from yang/yang-maven-plugin-it/src/test/resources/NamingConflict/src/main/yang/test.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/NoGenerators/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/NoGenerators/pom.xml with 81% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/NoOutputDir/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/NoOutputDir/pom.xml with 75% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/NoYangFiles/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/NoYangFiles/pom.xml with 80% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/UnknownGenerator/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/UnknownGenerator/pom.xml with 82% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/YangRootNotExist/pom.xml [moved from yang/yang-maven-plugin-it/src/test/resources/YangRootNotExist/pom.xml with 76% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile1.yang [moved from yang/yang-maven-plugin-it/src/test/resources/files/testfile1.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile2.yang [moved from yang/yang-maven-plugin-it/src/test/resources/files/testfile2.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/files/testfile3.yang [moved from yang/yang-maven-plugin-it/src/test/resources/files/testfile3.yang with 100% similarity]
yang/yang-maven-plugin-it/src/test/resources/test-parent/pom.xml [new file with mode: 0644]

index daf737089d1bff86c2297fd263255d31cf716d58..663bf571e58b524e965266a5912f23b16c50ac27 100644 (file)
@@ -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");
     }
+
 }
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 812bcb980631dc6f74c0f3bb978e52c0700f7c13..28bb2d9b70fae8919781070080404200e6a9e308 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>additional-config</artifactId>
 
     <dependencies>
         <dependency>
@@ -47,8 +48,8 @@
                                         <nm2>abcd2=a.b.c.d.2</nm2>
                                     </additionalConfiguration>
                                     <resourceBaseDir>/target/resourcesGenerated</resourceBaseDir>
-                                    <outputBaseDir>       
-                                            target/AdditionalConfig                                
+                                    <outputBaseDir>
+                                        target/AdditionalConfig
                                     </outputBaseDir>
                                 </generator>
                                 <generator>
                                     <additionalConfiguration>
                                         <c1>config</c1>
                                     </additionalConfiguration>
-                                    <outputBaseDir>       
-                                            target/AdditionalConfig                                
+                                    <outputBaseDir>
+                                        target/AdditionalConfig
                                     </outputBaseDir>
                                 </generator>
                             </codeGenerators>
                         </configuration>
                     </execution>
                 </executions>
-
                 <dependencies>
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
+
 </project>
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 91b36ab33bf8e4ceea2e26143cbce49f5d1b66eb..82640e8ee674c05da066fd37e43e607cef2ab3c2 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>correct</artifactId>
 
     <dependencies>
         <dependency>
@@ -42,8 +43,8 @@
                                     <codeGeneratorClass>
                                         org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl
                                     </codeGeneratorClass>
-                                    <outputBaseDir>       
-                                            target/correct                                
+                                    <outputBaseDir>
+                                        target/correct
                                     </outputBaseDir>
                                 </generator>
                             </codeGenerators>
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 fa91fc0f6b51cc9bb4f2b9fdac12ede6eff545ca..cd7be965d193bb026422989970260e4dc81d5068 100644 (file)
@@ -1,19 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
     <artifactId>generator-test1</artifactId>
-    <version>0.5-SNAPSHOT</version>
+
+    <properties>
+        <target.dir>${project.build.directory}</target.dir>
+    </properties>
 
     <build>
         <plugins>
                                     <codeGeneratorClass>
                                         org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl
                                     </codeGeneratorClass>
-                                    <outputBaseDir>       
-                                            target/GenerateTest1                                
+                                    <outputBaseDir>
+                                        target/GenerateTest1
                                     </outputBaseDir>
                                 </generator>
                             </codeGenerators>
                         </configuration>
                     </execution>
                 </executions>
-
                 <dependencies>
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 </project>
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 3a5685740fb0c3ccf40c7730e658aede46c68f6a..948c025898f9c0aa7b3040fe1a43fa2aac5e1e59 100644 (file)
@@ -1,20 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
     <artifactId>generator-test2</artifactId>
 
+    <properties>
+        <target.dir>${project.build.directory}</target.dir>
+    </properties>
 
     <dependencies>
         <dependency>
@@ -22,7 +26,7 @@
             <artifactId>generator-test1</artifactId>
             <version>${it-project.version}</version>
             <scope>system</scope>
-            <systemPath>${project.basedir}/../GenerateTest1/target/generator-test1-0.5-SNAPSHOT.jar</systemPath>
+            <systemPath>${project.basedir}/../GenerateTest1/target/generator-test1-1.0.jar</systemPath>
         </dependency>
     </dependencies>
 
@@ -53,7 +57,6 @@
                         </configuration>
                     </execution>
                 </executions>
-
                 <dependencies>
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 </project>
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 d81b6aba8d64624b568f412aebff42259ec7d4ee..be217f8d6255961d34c8fa3ffcadb382a22d2461 100644 (file)
@@ -1,21 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
-        <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.yangtools</groupId>
-        <version>${it-project.version}</version>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
     </parent>
-    <artifactId>test</artifactId>
+
+    <artifactId>generator</artifactId>
 
     <build>
         <plugins>
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 d33ca7d77f0528e3572b00e9ba5912da7abc7569..8c45963a8d63ded42e593aa1b9a3c5431ca4b6a8 100644 (file)
@@ -8,13 +8,17 @@
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>invalid-version</artifactId>
 
     <!-- Testing dependency -->
-    <!-- yang-common dependency added here only for purpose of 'artifact version
-        check' test: version of yang-common artifact has to be different than one defined
+    <!-- yang-common dependency added here only for purpose of 'artifact version 
+        check' test: version of yang-common artifact has to be different than one defined 
         in yang-maven-plugin to make test pass -->
     <repositories>
         <repository>
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 183da0a18a232dcde9e0783df932e54dff519eb4..8ade2b1a9cff9883cc9df15831b40ee6f0bc0991 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>generator-test2</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>missing-yang-in-dep</artifactId>
 
     <build>
         <plugins>
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 0bae0b6853b742719efda76e0de2c149b37fe784..6fc2c8070530474f06cb82cd7cebec991ff63588 100644 (file)
@@ -1,16 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This 
-    program and the accompanying materials are made available under the terms of the 
-    Eclipse Public License v1.0 which accompanies this distribution, and is available 
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
     at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>naming-conflict</artifactId>
 
     <build>
         <plugins>
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 e1a3933a2dbd04131cb61804a8f46f69dec45578..d236de3e0afa46f4a10baec305422b5935ed5620 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+    <parent>
         <groupId>org.opendaylight.yangtools</groupId>
-        <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>no-generators</artifactId>
 
     <build>
         <plugins>
@@ -44,7 +45,7 @@
                         </configuration>
                     </execution>
                 </executions>
-                               <dependencies>
+                <dependencies>
                     <dependency>
                         <groupId>org.opendaylight.yangtools</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
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 cd796d49730ae18ba2848b10ca4b3e02d247c8ad..20ba31ae929fe4a01dface59bbbca1836292c75c 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <artifactId>test</artifactId>
-    <version>0.5-SNAPSHOT</version>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>no-output-dir</artifactId>
 
     <build>
         <plugins>
@@ -34,8 +35,8 @@
                                     <codeGeneratorClass>
                                         org.opendaylight.yangtools.yang2sources.spi.CodeGeneratorTestImpl
                                     </codeGeneratorClass>
-                                    <outputBaseDir>       
-                                            target/NoOutputDir                                
+                                    <outputBaseDir>
+                                        target/NoOutputDir
                                     </outputBaseDir>
                                 </generator>
                             </codeGenerators>
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 0161c3c788ce16bd33933d76be7948c62344dcc0..3cac79593b097d8e8a4c3435e788fa7a0e9f7494 100644 (file)
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
-    <artifactId>test</artifactId>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>no-yang-files</artifactId>
 
     <build>
         <plugins>
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 8d144030fa2d52ab7e3f51906df53bd7cee870d7..853e8e0c0e814af4ef001b87a3a83b0f2d72e711 100644 (file)
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
 
-    <artifactId>test</artifactId>
+    <artifactId>unknown-generator</artifactId>
 
     <build>
         <plugins>
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 4188e0304e325fe1cb8ad7b2e6f4518c6a4a2560..8bb27a854b4154caed8c9d270c8ea8afa5e92e3e 100644 (file)
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.opendaylight.yangtools</groupId>
-    <version>0.5-SNAPSHOT</version>
+    <parent>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>test-parent</artifactId>
+        <version>1.0</version>
+    </parent>
 
-    <artifactId>test</artifactId>
+    <artifactId>yang-root-not-exist</artifactId>
 
     <build>
         <plugins>
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 (file)
index 0000000..58085fc
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!-- Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This
+    program and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.opendaylight.yangtools</groupId>
+    <artifactId>test-parent</artifactId>
+    <version>1.0</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <it-project.version>0.6.2-SNAPSHOT</it-project.version>
+    </properties>
+
+    <modules>
+        <module>additional-config</module>
+        <module>correct</module>
+        <module>generate-test1</module>
+        <module>generate-test2</module>
+        <module>generator</module>
+        <module>invalid-version</module>
+        <module>missing-yang-in-dep</module>
+        <module>naming-conflict</module>
+        <module>no-generators</module>
+        <module>no-output-dir</module>
+        <module>no-yang-files</module>
+        <module>unknown-generator</module>
+        <module>yang-root-not-exist</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>properties-maven-plugin</artifactId>
+                    <version>1.0-alpha-2</version>
+                    <executions>
+                        <execution>
+                            <phase>generate-resources</phase>
+                            <goals>
+                                <goal>write-project-properties</goal>
+                            </goals>
+                            <configuration>
+                                <outputFile>it-project.properties</outputFile>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+</project>