无法读取biz.aQute.bnd:bnd-maven-plugin:jar:3.3.0的工件描述符:

时间:2018-09-24 08:21:19

标签: java maven osgi

在删除.m2 /存储库中的所有插件之后,为了解决我遇到的错误,我无法运行我的应用程序。我收到此错误

<?php
$query = mysqli_query($conn,"SELECT * FROM techsupport,techdetails WHERE techsupport.id = techdetails.id");

while ($fetch=mysqli_fetch_array($query)) {

    $ids = $fetch['id'];
    $serv_code = $fetch['service_code'];
    echo "<tr>";
    echo "<td><a href='#' data-target='#editModal$ids' data-toggle='modal' ><i class='fa fa-edit'></i></a></td>";
    echo "<td>".$fetch['id']."</td>";
    echo "<td>".$fetch['service_code']."</td>";
    echo "<td>".$fetch['log_date']."</td>";
    echo "<td>".$fetch['title']."</td>";
    echo "<td>".$fetch['remarks']."</td>";
    echo "<td>".$fetch['status']."</td>";
    echo "<td>".$fetch['parts']."</td>";
    echo "<td>".$fetch['request_date']."</td>";
    echo "<td>".$fetch['received_date']."</td>";
}

?>
            </table>
        </div>
    </div>         
</div>

我的POM非常简单,看起来像:

<div class="modal fade" id="editModal<?php echo $ids;?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

您知道我该如何纠正吗?在删除存储库插件的内容之前,该应用程序运行良好。 我使用Maven 3.5.2

编辑:当我使用-X运行以获取完整输出时,我得到了:

Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building osgi-simple-portlet 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for biz.aQute.bnd:bnd-maven-plugin:jar:3.3.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.143 s
[INFO] Finished at: 2018-09-24T09:59:35+02:00
[INFO] Final Memory: 6M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin biz.aQute.bnd:bnd-maven-plugin:3.3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for biz.aQute.bnd:bnd-maven-plugin:jar:3.3.0: 4 problems were encountered while building the effective model for ::
[ERROR] [ERROR] 'modelVersion' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] [ERROR] 'groupId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] [ERROR] 'artifactId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] [ERROR] 'version' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] -> [Help 1]

3 个答案:

答案 0 :(得分:1)

我试图在日食中使用您共享的pom.xml创建一个Maven项目,当我执行mvn clean install时,它工作得很好。

也许可以检查您的biz/aQute/bnd/bnd-maven-plugin中是否创建了目录路径/.m2/repository/。否则,请尝试删除现有项目,并使用正确的groupIdartifactId创建一个新的maven项目,并确保它们与您的pom.xml中存在的项目匹配。

mvn clean install

祝你好运!

答案 1 :(得分:0)

尝试清理项目并重新构建。然后检查.m2目录-biz.aQute.bnd:bnd-maven-plugin:jar:3.3.0目录中是否有任何内容?检查其中的pom文件。看起来正确(例如在repository中)?使用-X构建以查看详细日志。 您还可以使用mvn dependency:tree搜索问题-see article

之后,您还可以尝试手动安装缺少的工件:https://stackoverflow.com/a/46276387

答案 2 :(得分:0)

我删除了.m2 / repository文件夹,因为所有插件都已损坏。然后,我重新启动计算机。现在一切正常。非常感谢。