在Ubuntu上安装findbugs

时间:2015-06-08 07:41:11

标签: maven ubuntu hadoop findbugs

为了构建hadoop,我需要安装findbugs。我尝试按照link安装它。我看到findbugs已正确安装。但是当我为hadoop运行maven build命令时,我仍然在hadoop-common看到同样的错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (site) on project hadoop-common: An Ant BuildException has occured: input file /home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/findbugsXml.xml does not exist
[ERROR] around Ant part ...<xslt in="/home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/findbugsXml.xml" style="${env.FINDBUGS_HOME}/src/xsl/default.xsl" out="/home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/site/findbugs.html"/>... @ 44:277 in /home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml

我在这一点上陷入困​​境。我该怎么办?

1 个答案:

答案 0 :(得分:0)

public void onSuccess(String response) { // Hide Progress Dialog // prgDialog.hide(); try { // JSON Object JSONObject obj = new JSONObject(response); // When the JSON response has status boolean value assigned with true if (obj.getBoolean("status")) { //String j = obj.get("data").toString(); // dont't need to do this Toast.makeText(getApplicationContext(), j, Toast.LENGTH_LONG).show(); //JSONArray data = new JSONArray(j); JSONArray data = obj.getJSONArray("data"); //add this line Toast.makeText(getApplicationContext(), data.toString(), Toast.LENGTH_LONG).show(); for (int i = 0; i < data.length(); i++) { JSONObject busName = data.getJSONObject(i); String busPhone = busName.getString("activityname"); String busPhon = busName.getString("activityclass"); Toast.makeText(getApplicationContext(), busPhon, Toast.LENGTH_LONG).show(); } } } catch (JSONException e) { // TODO Auto-generated catch block Toast.makeText(getApplicationContext(), "Error Occured [Server's JSON response might be invalid]!", Toast.LENGTH_LONG).show(); e.printStackTrace(); }

资源文件通常应位于"input file /home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/findbugsXml.xml does not exist",以便在构建期间复制到<your project>/src/main/resources/

请参阅Maven, Introduction to the Standard Directory LayoutApache Maven Resources Plugin

  

Resources Plugin处理将项目资源复制到输出目录。