Parcourir la source

AMBARI-14277. Upgrade findbugs-maven-plugin version to 3.0.3 (Ajit kumar via smohanty)

Sumit Mohanty il y a 9 ans
Parent
commit
7923e59cd9

+ 21 - 46
ambari-server/pom.xml

@@ -136,6 +136,24 @@
               <goal>run</goal>
             </goals>
           </execution>
+          <!-- Copies compiled views into known location for RPM builds -->
+          <execution>
+            <id>copy-view-jars</id>
+            <phase>package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <copy todir="${ambari-admin-dir}/target" flatten="true">
+                  <fileset dir="${contrib-views-dir}">
+                    <include name="*/target/*jar" />
+                    <exclude name="**/ambari-views-utils*jar" />
+                  </fileset>
+                </copy>
+              </target>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -700,7 +718,7 @@
         </executions>
         <configuration>
           <controlDir>${basedir}/src/main/package/deb/control</controlDir>
-          <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
+          <deb>${basedir}/target/${project.artifactId}_${package-version}-${package-release}.deb</deb>
           <dataSet>
             <data>
               <type>template</type>
@@ -1210,7 +1228,7 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
-        <version>2.5.2</version>
+        <version>3.0.3</version>
         <configuration>
           <failOnError>false</failOnError>
         </configuration>
@@ -1279,49 +1297,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <version>1.7</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <configuration>
-              <tasks>
-                <jar destfile="target/DBConnectionVerification.jar">
-                  <fileset dir="${basedir}/target/classes/"
-                    includes="**/DBConnectionVerification.class" />
-                  <manifest>
-                    <attribute name="Main-Class"
-                      value="org.apache.ambari.server.DBConnectionVerification" />
-                  </manifest>
-                </jar>
-              </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <!-- Copies compiled views into known location for RPM builds -->
-          <execution>
-            <id>copy-view-jars</id>
-            <phase>package</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <target>
-                <copy todir="${ambari-admin-dir}/target" flatten="true">
-                  <fileset dir="${contrib-views-dir}">
-                    <include name="*/target/*jar" />
-                    <exclude name="**/ambari-views-utils*jar" />
-                  </fileset>
-                </copy>
-              </target>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
     <resources>
       <resource>
@@ -1589,7 +1564,7 @@
   </profiles>
   <dependencies>
     <dependency>
-      <groupId>${pom.groupId}</groupId>
+      <groupId>${project.groupId}</groupId>
       <artifactId>ambari-views</artifactId>
       <version>${project.version}</version>
     </dependency>

+ 7 - 7
ambari-shell/ambari-groovy-shell/src/test/java/org/apache/ambari/shell/support/TableRendererTest.java

@@ -23,7 +23,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.Collections;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -34,20 +34,20 @@ public class TableRendererTest {
 
   @Test
   public void testRenderMultiValueMap() throws IOException {
-    Map<String, List<String>> map = new HashMap<String, List<String>>();
-    map.put("HDFS", Collections.singletonList("DATANODE"));
-    map.put("MAPREDUCE2", Collections.singletonList("HISTORYSERVER"));
+    Map<String, List<String>> map = new LinkedHashMap<>();
     map.put("ZOOKEEPER", Collections.singletonList("ZOOKEEPER_SERVER"));
+    map.put("MAPREDUCE2", Collections.singletonList("HISTORYSERVER"));
+    map.put("HDFS", Collections.singletonList("DATANODE"));
     assertEquals(IOUtils.toString(new FileInputStream(new File("src/test/resources/2columns"))),
       TableRenderer.renderMultiValueMap(map, "SERVICE", "COMPONENT"));
   }
 
   @Test
   public void testRenderMapValueMap() throws IOException {
-    Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();
-    map.put("HDFS", Collections.singletonMap("DATANODE", "STARTED"));
-    map.put("MAPREDUCE2", Collections.singletonMap("HISTORYSERVER", "STARTED"));
+    Map<String, Map<String, String>> map = new LinkedHashMap<>();
     map.put("ZOOKEEPER", Collections.singletonMap("ZOOKEEPER_SERVER", "INSTALLED"));
+    map.put("MAPREDUCE2", Collections.singletonMap("HISTORYSERVER", "STARTED"));
+    map.put("HDFS", Collections.singletonMap("DATANODE", "STARTED"));
     assertEquals(IOUtils.toString(new FileInputStream(new File("src/test/resources/3columns"))),
       TableRenderer.renderMapValueMap(map, "SERVICE", "COMPONENT", "STATE"));
   }