Added generate To File for specified directory. 82/282/1
authorlsedlak <lsedlak@cisco.com>
Thu, 2 May 2013 13:06:12 +0000 (15:06 +0200)
committerlsedlak <lsedlak@cisco.com>
Thu, 2 May 2013 13:08:47 +0000 (15:08 +0200)
Added overloading method generateToFile with File as input parameter and
List of Files as result;
Removed unused import in BaseTypeProvider test and BaseYangTypes;

Changed binding-generator, yang and sal maven pom files to use java 1.7;

Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/main/java/org/opendaylight/controller/sal/binding/generator/impl/BindingGeneratorImpl.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/main/java/org/opendaylight/controller/sal/binding/yang/types/BaseYangTypes.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/generator/impl/BaseTypeProvider.java
opendaylight/sal/yang-prototype/code-generator/binding-java-api-generator/src/main/java/org/opendaylight/controller/sal/java/api/generator/GeneratorJavaFile.java
opendaylight/sal/yang-prototype/code-generator/binding-java-api-generator/src/test/java/org/opendaylight/controller/sal/java/api/generator/test/GeneratorJavaFileTest.java
opendaylight/sal/yang-prototype/code-generator/pom.xml
opendaylight/sal/yang-prototype/sal/pom.xml
opendaylight/sal/yang-prototype/yang/pom.xml

index dcee5fe..3c0d9ed 100644 (file)
@@ -290,28 +290,15 @@ public class BindingGeneratorImpl implements BindingGenerator {
         }
         return null;
     }
-
-    // private String resolveGeneratedTypePackageName(final SchemaPath
-    // schemaPath) {
-    // final StringBuilder builder = new StringBuilder();
-    // builder.append(basePackageName);
-    // if ((schemaPath != null) && (schemaPath.getPath() != null)) {
-    // final List<QName> pathToNode = schemaPath.getPath();
-    // final int traversalSteps = (pathToNode.size() - 1);
-    // for (int i = 0; i < traversalSteps; ++i) {
-    // builder.append(".");
-    // String nodeLocalName = pathToNode.get(i).getLocalName();
-    //
-    // // TODO: refactor with use of BindingGeneratorUtil class
-    // nodeLocalName = nodeLocalName.replace(":", ".");
-    // nodeLocalName = nodeLocalName.replace("-", ".");
-    // builder.append(nodeLocalName);
-    // }
-    // return validatePackage(builder.toString());
-    // }
-    // return null;
-    // }
-
+    
+    private List<GeneratedType> augmentationToGenTypes(final Module module) {
+        final List<GeneratedType> augmentGenTypes = new ArrayList<GeneratedType>();
+        
+        //TODO: add implementation
+        
+        return augmentGenTypes;
+    }
+    
     private GeneratedType containerToGenType(ContainerSchemaNode container) {
         if (container == null) {
             return null;
index b050ce6..a6425df 100644 (file)
@@ -1,67 +1,66 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.sal.binding.yang.types;\r
-\r
-import java.math.BigDecimal;\r
-import java.math.BigInteger;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.opendaylight.controller.binding.generator.util.Types;\r
-import org.opendaylight.controller.sal.binding.generator.spi.TypeProvider;\r
-import org.opendaylight.controller.sal.binding.model.api.Type;\r
-import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
-\r
-public class BaseYangTypes {\r
-\r
-    private static Map<String, Type> typeMap = new HashMap<String, Type>();\r
-\r
-    public static final Type BOOLEAN_TYPE = Types.typeForClass(Boolean.class);\r
-    public static final Type INT8_TYPE = Types.typeForClass(Byte.class);\r
-    public static final Type INT16_TYPE = Types.typeForClass(Short.class);\r
-    public static final Type INT32_TYPE = Types.typeForClass(Integer.class);\r
-    public static final Type INT64_TYPE = Types.typeForClass(Long.class);\r
-    public static final Type STRING_TYPE = Types.typeForClass(String.class);\r
-    public static final Type DECIMAL64_TYPE = Types.typeForClass(Double.class);\r
-    public static final Type UINT8_TYPE = Types.typeForClass(Short.class);\r
-    public static final Type UINT16_TYPE = Types.typeForClass(Integer.class);\r
-    public static final Type UINT32_TYPE = Types.typeForClass(Long.class);\r
-    public static final Type UINT64_TYPE = Types.typeForClass(BigInteger.class);\r
-\r
-    static {\r
-        typeMap.put("boolean", BOOLEAN_TYPE);\r
-        typeMap.put("int8", INT8_TYPE);\r
-        typeMap.put("int16", INT16_TYPE);\r
-        typeMap.put("int32", INT32_TYPE);\r
-        typeMap.put("int64", INT64_TYPE);\r
-        typeMap.put("string", STRING_TYPE);\r
-        typeMap.put("decimal64", DECIMAL64_TYPE);\r
-        typeMap.put("uint8", UINT8_TYPE);\r
-        typeMap.put("uint16", UINT16_TYPE);\r
-        typeMap.put("uint32", UINT32_TYPE);\r
-        typeMap.put("uint64", UINT64_TYPE);\r
-    }\r
-\r
-    public static final TypeProvider BASE_YANG_TYPES_PROVIDER = new TypeProvider() {\r
-\r
-        @Override\r
-        public Type javaTypeForYangType(String type) {\r
-            return typeMap.get(type);\r
-        }\r
-\r
-        @Override\r
-        public Type javaTypeForSchemaDefinitionType(TypeDefinition<?> type) {\r
-            if (type != null) {\r
-                return typeMap.get(type.getQName().getLocalName());\r
-            }\r
-\r
-            return null;\r
-        }\r
-    };\r
-\r
-}\r
+/*
+ * 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
+ */
+package org.opendaylight.controller.sal.binding.yang.types;
+
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.opendaylight.controller.binding.generator.util.Types;
+import org.opendaylight.controller.sal.binding.generator.spi.TypeProvider;
+import org.opendaylight.controller.sal.binding.model.api.Type;
+import org.opendaylight.controller.yang.model.api.TypeDefinition;
+
+public class BaseYangTypes {
+
+    private static Map<String, Type> typeMap = new HashMap<String, Type>();
+
+    public static final Type BOOLEAN_TYPE = Types.typeForClass(Boolean.class);
+    public static final Type INT8_TYPE = Types.typeForClass(Byte.class);
+    public static final Type INT16_TYPE = Types.typeForClass(Short.class);
+    public static final Type INT32_TYPE = Types.typeForClass(Integer.class);
+    public static final Type INT64_TYPE = Types.typeForClass(Long.class);
+    public static final Type STRING_TYPE = Types.typeForClass(String.class);
+    public static final Type DECIMAL64_TYPE = Types.typeForClass(Double.class);
+    public static final Type UINT8_TYPE = Types.typeForClass(Short.class);
+    public static final Type UINT16_TYPE = Types.typeForClass(Integer.class);
+    public static final Type UINT32_TYPE = Types.typeForClass(Long.class);
+    public static final Type UINT64_TYPE = Types.typeForClass(BigInteger.class);
+
+    static {
+        typeMap.put("boolean", BOOLEAN_TYPE);
+        typeMap.put("int8", INT8_TYPE);
+        typeMap.put("int16", INT16_TYPE);
+        typeMap.put("int32", INT32_TYPE);
+        typeMap.put("int64", INT64_TYPE);
+        typeMap.put("string", STRING_TYPE);
+        typeMap.put("decimal64", DECIMAL64_TYPE);
+        typeMap.put("uint8", UINT8_TYPE);
+        typeMap.put("uint16", UINT16_TYPE);
+        typeMap.put("uint32", UINT32_TYPE);
+        typeMap.put("uint64", UINT64_TYPE);
+    }
+
+    public static final TypeProvider BASE_YANG_TYPES_PROVIDER = new TypeProvider() {
+
+        @Override
+        public Type javaTypeForYangType(String type) {
+            return typeMap.get(type);
+        }
+
+        @Override
+        public Type javaTypeForSchemaDefinitionType(TypeDefinition<?> type) {
+            if (type != null) {
+                return typeMap.get(type.getQName().getLocalName());
+            }
+
+            return null;
+        }
+    };
+
+}
index be115c9..474e4ad 100644 (file)
@@ -20,18 +20,23 @@ import java.util.Set;
 import org.opendaylight.controller.sal.binding.model.api.CodeGenerator;
 import org.opendaylight.controller.sal.binding.model.api.GeneratedTransferObject;
 import org.opendaylight.controller.sal.binding.model.api.GeneratedType;
+import org.opendaylight.controller.sal.binding.model.api.Type;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class GeneratorJavaFile {
 
+    private static final Logger log = LoggerFactory
+            .getLogger(GeneratorJavaFile.class);
     private final CodeGenerator interfaceGenerator;
     private final ClassCodeGenerator classGenerator;
-    private final Set<GeneratedType> types;
+    private final Set<GeneratedType> genTypes;
     private final Set<GeneratedTransferObject> genTransferObjects;
 
     public GeneratorJavaFile(final CodeGenerator codeGenerator,
             final Set<GeneratedType> types) {
         this.interfaceGenerator = codeGenerator;
-        this.types = types;
+        this.genTypes = types;
         this.genTransferObjects = new HashSet<GeneratedTransferObject>();
         classGenerator = new ClassCodeGenerator();
     }
@@ -40,72 +45,87 @@ public class GeneratorJavaFile {
             final Set<GeneratedTransferObject> genTransferObjects) {
         this.interfaceGenerator = new InterfaceGenerator();
         this.classGenerator = new ClassCodeGenerator();
-        this.types = types;
+        this.genTypes = types;
         this.genTransferObjects = genTransferObjects;
     }
 
-    public List<File> generateToFile() throws IOException {
-        return generateToFile(null);
-    }
-
+    @Deprecated
     public List<File> generateToFile(String path) throws IOException {
         final List<File> result = new ArrayList<File>();
 
-        for (GeneratedType type : types) {
-            String parentPath = generateParentPath(path,
-                    type.getPackageName());
+        for (GeneratedType genType : genTypes) {
+            final String parentPath = generateParentPath(path,
+                    genType.getPackageName());
 
-            File file = new File(parentPath, type.getName() + ".java");
-            File parent = file.getParentFile();
-            if (!parent.exists()) {
-                parent.mkdirs();
+            final File directory = new File(parentPath);
+            final File genFile = generateTypeToJavaFile(directory, genType,
+                    interfaceGenerator);
+            
+            if (genFile != null) {
+                result.add(genFile);
             }
+        }
 
-            if (!file.exists()) {
-                FileWriter fw = null;
-                BufferedWriter bw = null;
+        for (GeneratedTransferObject transferObject : genTransferObjects) {
+            final String parentPath = generateParentPath(path,
+                    transferObject.getPackageName());
 
-                file.createNewFile();
-                fw = new FileWriter(file);
-                bw = new BufferedWriter(fw);
-                Writer writer = interfaceGenerator.generate(type);
-                bw.write(writer.toString());
+            final File directory = new File(parentPath);
+            final File genFile = generateTypeToJavaFile(directory,
+                    transferObject, classGenerator);
 
-                if (bw != null) {
-                    bw.close();
-                }
-                result.add(file);
+            if (genFile != null) {
+                result.add(genFile);
             }
         }
+        return result;
+    }
 
+    public List<File> generateToFile(final File directory) throws IOException {
+        final List<File> result = new ArrayList<File>();
+        for (GeneratedType type : genTypes) {
+            final File genFile = generateTypeToJavaFile(directory, type,
+                    interfaceGenerator);
+
+            if (genFile != null) {
+                result.add(genFile);
+            }
+        }
         for (GeneratedTransferObject transferObject : genTransferObjects) {
-            String parentPath = generateParentPath(path,
-                    transferObject.getPackageName());
+            final File genFile = generateTypeToJavaFile(directory,
+                    transferObject, classGenerator);
 
-            File file = new File(parentPath, transferObject.getName() + ".java");
-            File parent = file.getParentFile();
-            if (!parent.exists()) {
-                parent.mkdirs();
+            if (genFile != null) {
+                result.add(genFile);
             }
+        }
+        return result;
+    }
 
-            if (!file.exists()) {
-                FileWriter fw = null;
-                BufferedWriter bw = null;
+    private File generateTypeToJavaFile(final File directory, final Type type,
+            final CodeGenerator generator) throws IOException {
+        if ((directory != null) && (type != null) && (generator != null)) {
 
+            if (!directory.exists()) {
+                directory.mkdirs();
+            }
+
+            final File file = new File(directory, type.getName() + ".java");
+            try (final FileWriter fw = new FileWriter(file)) {
                 file.createNewFile();
-                fw = new FileWriter(file);
-                bw = new BufferedWriter(fw);
-                Writer writer = classGenerator.generate(transferObject);
-                bw.write(writer.toString());
 
-                if (bw != null) {
-                    bw.close();
+                try (final BufferedWriter bw = new BufferedWriter(fw)) {
+                    Writer writer = generator.generate(type);
+                    bw.write(writer.toString());
                 }
-                result.add(file);
+            } catch (IOException e) {
+                log.error(e.getMessage());
+                throw new IOException(e.getMessage());
             }
-        }
 
-        return result;
+            return file;
+        }
+        return null;
     }
 
     private String generateParentPath(String path, String pkg) {
@@ -142,5 +162,4 @@ public class GeneratorJavaFile {
         }
         return fullPath;
     }
-
 }
index 4ae8cc1..90fbb6f 100644 (file)
@@ -14,7 +14,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -80,7 +79,8 @@ public class GeneratorJavaFileTest {
                 new InterfaceGenerator(), types);
         generator.generateToFile(PATH);
 
-        String[] files = new File(PATH + FS + "org" + FS + "opendaylight" + FS + "controller" + FS + "gen").list();
+        String[] files = new File(PATH + FS + "org" + FS + "opendaylight" + FS
+                + "controller" + FS + "gen").list();
         List<String> filesList = Arrays.asList(files);
 
         assertEquals(3, files.length);
@@ -88,7 +88,7 @@ public class GeneratorJavaFileTest {
         assertTrue(filesList.contains("Type2.java"));
         assertTrue(filesList.contains("Type3.java"));
     }
-    
+
     @Test
     public void compilationTest() throws Exception {
         final YangModelParserImpl parser = new YangModelParserImpl();
@@ -97,17 +97,12 @@ public class GeneratorJavaFileTest {
         final File sourcesDir = new File("src/test/resources/yang");
         final List<File> sourceFiles = new ArrayList<File>();
         final File[] fileArray = sourcesDir.listFiles();
-        
+
         for (int i = 0; i < fileArray.length; ++i) {
             sourceFiles.add(fileArray[i]);
         }
         
-//        String[] sourcesDirPaths = new String[sourceFiles.length];
-//        for (int i = 0; i < sourceFiles.length; i++) {
-//            sourcesDirPaths[i] = sourceFiles[i].getAbsolutePath();
-//        }
-        final Set<Module> modulesToBuild = parser
-                .parseYangModels(sourceFiles);
+        final Set<Module> modulesToBuild = parser.parseYangModels(sourceFiles);
 
         final SchemaContext context = parser
                 .resolveSchemaContext(modulesToBuild);
@@ -115,7 +110,8 @@ public class GeneratorJavaFileTest {
         final Set<GeneratedType> typesToGenerate = new HashSet<GeneratedType>();
         final Set<GeneratedTransferObject> tosToGenerate = new HashSet<GeneratedTransferObject>();
         for (Type type : types) {
-            if (type instanceof GeneratedType && !(type instanceof GeneratedTransferObject)) {
+            if (type instanceof GeneratedType
+                    && !(type instanceof GeneratedTransferObject)) {
                 typesToGenerate.add((GeneratedType) type);
             }
 
@@ -162,7 +158,7 @@ public class GeneratorJavaFileTest {
 
     /**
      * Search recursively given directory for *.java files.
-     *
+     * 
      * @param directory
      *            directory to search
      * @return List of java files found
index dafba87..89e2794 100644 (file)
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>binding-generator</artifactId>\r
-    <version>1.0</version>\r
-    <packaging>pom</packaging>\r
-    <name>binding-generator</name>\r
-    \r
-    <properties>\r
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-       </properties>\r
-  \r
-    <modules>\r
-       <module>../yang</module>\r
-       <module>../sal/sal-schema-repository-api</module>\r
-        <module>code-generator-demo</module>\r
-        <module>yang-model-parser-api</module>\r
-        <module>yang-model-parser-impl</module>\r
-        <module>binding-model-api</module>\r
-        <module>binding-generator-api</module>\r
-        <module>binding-generator-spi</module>\r
-        <module>binding-generator-util</module>\r
-        <module>binding-generator-impl</module>\r
-        <module>binding-java-api-generator</module>\r
-        <module>maven-yang</module>\r
-        <module>maven-yang-plugin</module>\r
-        <module>maven-yang-plugin-it</module>\r
-        <module>maven-sal-api-gen-plugin</module>\r
-    </modules>\r
-    <dependencies>\r
-\r
-        <dependency>\r
-            <groupId>junit</groupId>\r
-            <artifactId>junit</artifactId>\r
-            <version>4.10</version>\r
-            <scope>test</scope>\r
-            <optional>true</optional>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-            <version>1.7.2</version>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-simple</artifactId>\r
-            <version>1.7.2</version>\r
-        </dependency>\r
-    </dependencies>\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-compiler-plugin</artifactId>\r
-                <version>2.0</version>\r
-                <inherited>true</inherited>\r
-                <configuration>\r
-                    <source>1.6</source>\r
-                    <target>1.6</target>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-javadoc-plugin</artifactId>\r
-                <version>2.8.1</version>\r
-                <configuration>\r
-                    <stylesheet>maven</stylesheet>\r
-                </configuration>\r
-                <executions>\r
-                    <execution>\r
-                        <goals>\r
-                            <goal>aggregate</goal>\r
-                        </goals>\r
-                        <phase>site</phase>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-    <reporting>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>findbugs-maven-plugin</artifactId>\r
-                <version>2.4.0</version>\r
-                <configuration>\r
-                    <effort>Max</effort>\r
-                    <threshold>Low</threshold>\r
-                    <goal>site</goal>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>jdepend-maven-plugin</artifactId>\r
-                <version>2.0-beta-2</version>\r
-            </plugin>\r
-        </plugins>\r
-    </reporting>\r
-</project>\r
+<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.controller</groupId>
+    <artifactId>binding-generator</artifactId>
+    <version>1.0</version>
+    <packaging>pom</packaging>
+    <name>binding-generator</name>
+    
+    <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+       </properties>
+  
+    <modules>
+       <module>../yang</module>
+       <module>../sal/sal-schema-repository-api</module>
+        <module>code-generator-demo</module>
+        <module>yang-model-parser-api</module>
+        <module>yang-model-parser-impl</module>
+        <module>binding-model-api</module>
+        <module>binding-generator-api</module>
+        <module>binding-generator-spi</module>
+        <module>binding-generator-util</module>
+        <module>binding-generator-impl</module>
+        <module>binding-java-api-generator</module>
+        <module>maven-yang</module>
+        <module>maven-yang-plugin</module>
+        <module>maven-yang-plugin-it</module>
+        <module>maven-sal-api-gen-plugin</module>
+    </modules>
+    <dependencies>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.10</version>
+            <scope>test</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.7.2</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <inherited>true</inherited>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <stylesheet>maven</stylesheet>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>aggregate</goal>
+                        </goals>
+                        <phase>site</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                    <goal>site</goal>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+                <version>2.0-beta-2</version>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>
index 9f77613..2604a45 100644 (file)
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <groupId>org.opendaylight.controller</groupId>\r
-       <artifactId>sal</artifactId>\r
-       <version>1.0-SNAPSHOT</version>\r
-       <packaging>pom</packaging>\r
-\r
-       <modules>\r
-               <module>sal-common</module>\r
-               <module>sal-common-util</module>\r
-               <module>sal-core-api</module>\r
-               <module>sal-data-api</module>\r
-               <module>sal-binding-api</module>\r
-               <module>sal-binding-spi</module>\r
-               <module>sal-binding-broker-impl</module>\r
-               <module>sal-schema-repository-api</module>\r
-               <module>sal-core-spi</module>\r
-               <module>sal-broker-impl</module>\r
-               <module>sal-core-demo</module>\r
-       </modules>\r
-\r
-       <dependencyManagement>\r
-               <dependencies>\r
-                       <dependency>\r
-                               <groupId>com.google.guava</groupId>\r
-                               <artifactId>guava</artifactId>\r
-                               <version>14.0.1</version>\r
-                               <type>jar</type>\r
-                       </dependency>\r
-                       <dependency>\r
-                               <groupId>org.slf4j</groupId>\r
-                               <artifactId>slf4j-api</artifactId>\r
-                               <version>1.7.2</version>\r
-                       </dependency>\r
-                       <dependency>\r
-                               <groupId>junit</groupId>\r
-                               <artifactId>junit</artifactId>\r
-                               <version>4.10</version>\r
-                       </dependency>\r
-               </dependencies>\r
-       </dependencyManagement>\r
-\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>junit</groupId>\r
-                       <artifactId>junit</artifactId>\r
-                       <scope>test</scope>\r
-                       <optional>true</optional>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.mockito</groupId>\r
-                       <artifactId>mockito-all</artifactId>\r
-                       <version>1.9.5</version>\r
-                       <scope>test</scope>\r
-               </dependency>\r
-       </dependencies>\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-compiler-plugin</artifactId>\r
-                               <version>2.0</version>\r
-                               <inherited>true</inherited>\r
-                               <configuration>\r
-                                       <source>1.6</source>\r
-                                       <target>1.6</target>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-javadoc-plugin</artifactId>\r
-                               <version>2.8.1</version>\r
-                               <configuration>\r
-                                       <stylesheet>maven</stylesheet>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <goals>\r
-                                                       <goal>aggregate</goal>\r
-                                               </goals>\r
-                                               <phase>site</phase>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-               </plugins>\r
-       </build>\r
-       <reporting>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>findbugs-maven-plugin</artifactId>\r
-                               <version>2.4.0</version>\r
-                               <configuration>\r
-                                       <effort>Max</effort>\r
-                                       <threshold>Low</threshold>\r
-                                       <goal>site</goal>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>jdepend-maven-plugin</artifactId>\r
-                               <version>2.0-beta-2</version>\r
-                       </plugin>\r
-               </plugins>\r
+<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.controller</groupId>
+       <artifactId>sal</artifactId>
+       <version>1.0-SNAPSHOT</version>
+       <packaging>pom</packaging>
+
+       <modules>
+               <module>sal-common</module>
+               <module>sal-common-util</module>
+               <module>sal-core-api</module>
+               <module>sal-data-api</module>
+               <module>sal-binding-api</module>
+               <module>sal-binding-spi</module>
+               <module>sal-binding-broker-impl</module>
+               <module>sal-schema-repository-api</module>
+               <module>sal-core-spi</module>
+               <module>sal-broker-impl</module>
+               <module>sal-core-demo</module>
+       </modules>
+
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>com.google.guava</groupId>
+                               <artifactId>guava</artifactId>
+                               <version>14.0.1</version>
+                               <type>jar</type>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.slf4j</groupId>
+                               <artifactId>slf4j-api</artifactId>
+                               <version>1.7.2</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>junit</groupId>
+                               <artifactId>junit</artifactId>
+                               <version>4.10</version>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+
+       <dependencies>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.9.5</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>2.0</version>
+                               <inherited>true</inherited>
+                               <configuration>
+                                       <source>1.7</source>
+                                       <target>1.7</target>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>2.8.1</version>
+                               <configuration>
+                                       <stylesheet>maven</stylesheet>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>aggregate</goal>
+                                               </goals>
+                                               <phase>site</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+       <reporting>
+               <plugins>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>findbugs-maven-plugin</artifactId>
+                               <version>2.4.0</version>
+                               <configuration>
+                                       <effort>Max</effort>
+                                       <threshold>Low</threshold>
+                                       <goal>site</goal>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>jdepend-maven-plugin</artifactId>
+                               <version>2.0-beta-2</version>
+                       </plugin>
+               </plugins>
        </reporting>
 </project>
\ No newline at end of file
index d10366c..68134d4 100644 (file)
@@ -1,84 +1,84 @@
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>yang</artifactId>\r
-    <version>1.0</version>\r
-    <packaging>pom</packaging>\r
-    <modules>\r
-       <module>yang-common</module>\r
-        <module>yang-data-api</module>\r
-        <module>yang-data-util</module>\r
-        <module>yang-model-api</module>\r
-        <module>yang-model-util</module>\r
-        <module>yang-binding</module>\r
-    </modules>\r
-    <dependencies>\r
-\r
-        <dependency>\r
-            <groupId>junit</groupId>\r
-            <artifactId>junit</artifactId>\r
-            <version>4.10</version>\r
-            <scope>test</scope>\r
-            <optional>true</optional>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-api</artifactId>\r
-            <version>1.7.2</version>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.slf4j</groupId>\r
-            <artifactId>slf4j-simple</artifactId>\r
-            <version>1.7.2</version>\r
-        </dependency>\r
-    </dependencies>\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-compiler-plugin</artifactId>\r
-                <version>2.0</version>\r
-                <inherited>true</inherited>\r
-                <configuration>\r
-                    <source>1.6</source>\r
-                    <target>1.6</target>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-javadoc-plugin</artifactId>\r
-                <version>2.8.1</version>\r
-                <configuration>\r
-                    <stylesheet>maven</stylesheet>\r
-                </configuration>\r
-                <executions>\r
-                    <execution>\r
-                        <goals>\r
-                            <goal>aggregate</goal>\r
-                        </goals>\r
-                        <phase>site</phase>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-    <reporting>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>findbugs-maven-plugin</artifactId>\r
-                <version>2.4.0</version>\r
-                <configuration>\r
-                    <effort>Max</effort>\r
-                    <threshold>Low</threshold>\r
-                    <goal>site</goal>\r
-                </configuration>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>jdepend-maven-plugin</artifactId>\r
-                <version>2.0-beta-2</version>\r
-            </plugin>\r
-        </plugins>\r
-    </reporting>\r
-</project>\r
+<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.controller</groupId>
+    <artifactId>yang</artifactId>
+    <version>1.0</version>
+    <packaging>pom</packaging>
+    <modules>
+       <module>yang-common</module>
+        <module>yang-data-api</module>
+        <module>yang-data-util</module>
+        <module>yang-model-api</module>
+        <module>yang-model-util</module>
+        <module>yang-binding</module>
+    </modules>
+    <dependencies>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.10</version>
+            <scope>test</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.7.2</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <inherited>true</inherited>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <stylesheet>maven</stylesheet>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>aggregate</goal>
+                        </goals>
+                        <phase>site</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                    <goal>site</goal>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+                <version>2.0-beta-2</version>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.