Merge "Revert "Make distributionManagement reference groups""
[yangtools.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 73998a9703d72e7767913194b6a077f3d458f5db..018fef2030b348124a5b07e004fb00f1b9e7c076 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>yangtools</artifactId>
-    <groupId>org.opendaylight.yang</groupId>
-    <version>0.5.4-SNAPSHOT</version>
+    <groupId>org.opendaylight.yangtools</groupId>
+    <version>0.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
+    <prerequisites>
+        <maven>3.0.4</maven>
+    </prerequisites>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <slf4j.version>1.7.2</slf4j.version>
         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
+
+        <!-- Java Versions -->
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+
+        <!-- Build Plugin Versions -->
+        <maven.bundle.version>2.4.0</maven.bundle.version>
+        <maven.jar.version>2.4</maven.jar.version>
+        <maven.javadoc.version>2.9.1</maven.javadoc.version>
+        <maven.release.version>2.4.2</maven.release.version>
+        <maven.source.version>2.2.1</maven.source.version>
+        <maven.surefire.version>2.16</maven.surefire.version>
+
+        <!-- Supporting Libraries -->
+        <commons.lang.version>3.1</commons.lang.version>
+        <junit.version>4.10</junit.version>
+        <slf4j.version>1.7.2</slf4j.version>
+        <guava.version>14.0.1</guava.version>
+        <xtend.version>2.4.3</xtend.version>
+        <groovy.version>2.1.6</groovy.version>
+        <mockito.version>1.9.5</mockito.version>
     </properties>
 
+    <scm>
+        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+        <url>https://wiki.opendaylight.org/view/YANG_Tools:Main</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <modules>
-        <module>yang-binding</module>
-        <module>yang-common</module>
-        <module>yang-data-api</module>
-        <module>yang-data-util</module>
-        <module>yang-data-impl</module>
-        <module>yang-ext</module>
-        <module>yang-model-api</module>
-        <module>yang-maven-plugin</module>
-        <module>yang-maven-plugin-it</module>
-        <module>yang-maven-plugin-spi</module>
-        <module>yang-model-util</module>
-        <module>yang-parser-api</module>
-        <module>yang-parser-impl</module>
+        <module>concepts</module>
+        <module>yang</module>
+        <module>code-generator</module>
+        <module>model</module>
+        <module>restconf</module>
+        <module>mockito-configuration</module>
+        <!-- module>third-party</module -->
     </modules>
 
+    <pluginRepositories>
+        <pluginRepository>
+            <id>opendaylight-mirror</id>
+            <name>opendaylight-mirror</name>
+            <url>${nexusproxy}/groups/public/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>never</updatePolicy>
+            </releases>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <repositories>
+        <repository>
+            <id>opendaylight-mirror</id>
+            <name>opendaylight-mirror</name>
+            <url>${nexusproxy}/groups/public/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>never</updatePolicy>
+            </releases>
+        </repository>
+    </repositories>
+
+
     <dependencyManagement>
         <dependencies>
+            <!-- Testing Dependencies -->
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-common</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-data-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-data-util</artifactId>
-                <version>${project.version}</version>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${junit.version}</version>
+                <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-model-api</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-all</artifactId>
+                <version>${mockito.version}</version>
+                <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-model-util</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <version>${mockito.version}</version>
+                <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-binding</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>${slf4j.version}</version>
+                <scope>test</scope>
             </dependency>
+
+            <!-- Supporting Libraries -->
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-parser-api</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${slf4j.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-parser-impl
-                </artifactId>
-                <version>${project.version}</version>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>${guava.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.eclipse.xtend</groupId>
+                <artifactId>org.eclipse.xtend.lib</artifactId>
+                <version>${xtend.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.opendaylight.yang</groupId>
-                <artifactId>yang-maven-plugin-spi</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>${commons.lang.version}</version>
             </dependency>
+
+            <!-- Plugin integration -->
             <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>4.10</version>
-                <scope>test</scope>
-                <optional>true</optional>
+                <groupId>org.sonatype.plexus</groupId>
+                <artifactId>plexus-build-api</artifactId>
+                <version>0.0.7</version>
             </dependency>
             <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>1.7.2</version>
+                <groupId>org.codehaus.plexus</groupId>
+                <artifactId>plexus-slf4j-logging</artifactId>
+                <version>1.1</version>
             </dependency>
+
+           <!-- Our artifacts -->
+           <dependency>
+                   <groupId>${project.groupId}</groupId>
+                   <artifactId>concepts</artifactId>
+                   <version>${project.version}</version>
+           </dependency>
         </dependencies>
     </dependencyManagement>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+        </dependency>
+    </dependencies>
+
     <distributionManagement>
         <!-- OpenDayLight Released artifact -->
         <repository>
     </distributionManagement>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${maven.jar.version}</version>
+                    <configuration>
+                        <archive>
+                            <!-- Bundle OSGi Manifest created by maven-bundle-plugin 
+                                into jar file -->
+                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>${maven.bundle.version}</version>
+                    <extensions>true</extensions>
+                    <executions>
+                        <execution>
+                            <id>bundle-manifest</id>
+                            <phase>process-classes</phase>
+                            <goals>
+                                <goal>manifest</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <configuration>
+                        <instructions>
+                            <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+                            <Export-Package>*</Export-Package>
+                        </instructions>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.eclipse.xtend</groupId>
+                    <artifactId>xtend-maven-plugin</artifactId>
+                    <version>${xtend.version}</version>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>compile</goal>
+                            </goals>
+                            <configuration>
+                                <outputDirectory>${basedir}/src/main/xtend-gen</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <filesets>
+                            <fileset>
+                                <directory>${basedir}/src/main/xtend-gen</directory>
+                                <includes>
+                                    <include>**</include>
+                                </includes>
+                            </fileset>
+                        </filesets>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>org.apache.felix</groupId>
+                                        <artifactId>maven-bundle-plugin</artifactId>
+                                        <versionRange>[1.0,)</versionRange>
+                                        <goals>
+                                            <goal>manifest</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <execute />
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>${maven.javadoc.version}</version>
+                    <configuration>
+                        <stylesheetfile>stylesheet.css</stylesheetfile>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>attach-javadocs</id>
+                            <goals>
+                                <goal>jar</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <goals>
+                                <goal>aggregate</goal>
+                            </goals>
+                            <phase>site</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-release-plugin</artifactId>
+                    <version>${maven.release.version}</version>
+
+                    <!-- Since we have a maven plugin, we need to install it -->
+                    <configuration>
+                        <preparationGoals>clean install</preparationGoals>
+                        <completionGoals>clean install</completionGoals>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <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>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                </configuration>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>${maven.source.version}</version>
                 <executions>
                     <execution>
+                        <id>attach-sources</id>
                         <goals>
-                            <goal>aggregate</goal>
+                            <goal>jar</goal>
                         </goals>
-                        <phase>site</phase>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.4.0</version>
+                <version>2.5.3</version>
                 <configuration>
                     <effort>Max</effort>
                     <threshold>Low</threshold>
             </plugin>
         </plugins>
     </reporting>
-
 </project>