bugfix - accidental removal of rules
[holmes/rule-management.git] / rulemgt / pom.xml
index f1e6bda..29bf27c 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2017 ZTE Corporation.
+  ~ Copyright 2017-2022 ZTE Corporation.
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
   ~ limitations under the License.
   -->
 <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">
+         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.openo.holmes.rule-management</groupId>
-               <artifactId>holmes-rulemgt-parent</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-       </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.holmes.rule-management</groupId>
+        <artifactId>holmes-rulemgt-parent</artifactId>
+        <version>1.3.6-SNAPSHOT</version>
+    </parent>
 
-       <artifactId>holmes-rulemgt</artifactId>
-       <name>holmes-rulemgt-service</name>
-       <packaging>jar</packaging>
+    <artifactId>holmes-rulemgt</artifactId>
+    <name>holmes-rulemgt-service</name>
+    <packaging>jar</packaging>
 
-       <dependencies>
-               <dependency>
-                       <groupId>junit</groupId>
-                       <artifactId>junit</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.openo.common-services.common-utilities</groupId>
-                       <artifactId>dropwizard-ioc-container</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>io.dropwizard</groupId>
-                       <artifactId>dropwizard-core</artifactId>
-               </dependency>
-               <dependency>
-               <groupId>org.projectlombok</groupId>
-               <artifactId>lombok</artifactId>
-               </dependency>
-    <dependency>
-      <groupId>io.dropwizard</groupId>
-      <artifactId>dropwizard-db</artifactId>
-    </dependency>
+    <properties>
+        <main-class>org.onap.holmes.rulemgt.RuleActiveApp</main-class>
+        <sonar.coverage.jacoco.xmlReportPaths>
+            ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
+        <jacoco.version>0.8.5</jacoco.version>
+    </properties>
 
-  </dependencies>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-jar-plugin</artifactId>
-                               <configuration>
-                                       <archive>
-                                               <manifest>
-                                                       <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                               </manifest>
-                                       </archive>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-shade-plugin</artifactId>
-                               <configuration>
-                                       <createDependencyReducedPom>true</createDependencyReducedPom>
-                                       <filters>
-                                               <filter>
-                                                       <artifact>*:*</artifact>
-                                                       <excludes>
-                                                               <exclude>META-INF/*.SF</exclude>
-                                                               <exclude>META-INF/*.DSA</exclude>
-                                                               <exclude>META-INF/*.RSA</exclude>
-                                                       </excludes>
-                                               </filter>
-                                       </filters>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>shade</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <transformers>
-                                                               <transformer
-                                                                       implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-                                                               <transformer
-                                                                       implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                                                       <mainClass>org.openo.holmes.rulemgt.RuleActiveApp</mainClass>
-                                                               </transformer>
-                                                       </transformers>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.0</version>
+                <configuration>
+                    <source>8</source>
+                    <target>8</target>
+                    <release>11</release>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>${jacoco.version}</version>
+                <executions>
+                    <execution>
+                        <id>prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>report</id>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${springboot.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <mainClass>${main-class}</mainClass>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+    </build>
 
-               </plugins>
-               <resources>
-                       <resource>
-                               <directory>src/main/java</directory>
-                               <includes>
-                                       <include>**/*.properties</include>
-                               </includes>
-                       </resource>
-                       <resource>
-                               <directory>src/main/resources</directory>
-                       </resource>
-               </resources>
-       </build>
+    <profiles>
+        <profile>
+            <id>swagger</id>
+            <dependencies>
+                <dependency>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-jersey2-jaxrs</artifactId>
+                    <version>1.5.3</version>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>com.fasterxml.jackson.core</groupId>
+                            <artifactId>jackson-databind</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>com.fasterxml.jackson.core</groupId>
+                            <artifactId>jackson-core</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.kongchen</groupId>
+                        <artifactId>swagger-maven-plugin</artifactId>
+                        <version>3.1.1</version>
+                        <configuration>
+                            <apiSources>
+                                <apiSource>
+                                    <springmvc>false</springmvc>
+                                    <locations>org.onap.holmes.rulemgt.resources</locations>
+                                    <basePath>/api/holmes-rule-mgmt/v1/</basePath>
+                                    <info>
+                                        <title>API Descriptions for Holmes Rule Management</title>
+                                        <version>v1</version>
+                                        <description>
+                                            This page shows all the APIs available in the Holmes rule management module.
+                                        </description>
+                                        <termsOfService>
+                                            http://www.github.com/kongchen/swagger-maven-plugin
+                                        </termsOfService>
+                                        <contact>
+                                            <email>fu.guangrong@zte.com.cn</email>
+                                            <name>Guangrong Fu</name>
+                                        </contact>
+                                        <license>
+                                            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+                                            <name>Apache 2.0</name>
+                                        </license>
+                                    </info>
+                                    <securityDefinitions>
+                                    </securityDefinitions>
+                                    <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
+                                </apiSource>
+                            </apiSources>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>compile</phase>
+                                <goals>
+                                    <goal>generate</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>io.swagger</groupId>
+                                <artifactId>swagger-hibernate-validations</artifactId>
+                                <version>1.5.6</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>