gpt4 book ai didi

java - org.glassfish.javaeetutorial 的不可解析父 POM :dukes-tutoring

转载 作者:行者123 更新时间:2023-11-30 03:03:24 25 4
gpt4 key购买 nike

我想在 netbeans.for 中设置 duke 辅导项目,我有以下内容

配置-jdk8、netbeans 8.0.2、glassfish 4.1、apache-maven-3.3.3

我的 glassfish 目录 tut-install/examples/case-studies 中没有 duke 辅导项目,所以我下载了 java_ee_sdk-7u2.zip ,解压后我复制了 duke 辅导项目,并使用 file- 在 netbeans 中导入该项目 ->打开项目->

但是当我去构建并运行该项目时,我遇到了以下错误

[ERROR] Some problems were encountered while processing the POMs:
Non-resolvable parent POM for org.glassfish.javaeetutorial:dukes-tutoring:[unknown-version]: Failure to find org.glassfish.javaeetutorial:case-studies:pom:7.0.5 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 4, column 13
@
The build could not read 1 project -> [Help 1]

The project org.glassfish.javaeetutorial:dukes-tutoring:[unknown-version] (/home/yogesh/Downloads/dukes-tutoring/pom.xml) has 1 error
Non-resolvable parent POM for org.glassfish.javaeetutorial:dukes-tutoring:[unknown-version]: Failure to find org.glassfish.javaeetutorial:case-studies:pom:7.0.5 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

我的pom结构

<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>case-studies</artifactId>
<groupId>org.glassfish.javaeetutorial</groupId>
<version>7.0.5</version>
</parent>
<groupId>org.glassfish.javaeetutorial</groupId>
<artifactId>dukes-tutoring</artifactId>
<packaging>pom</packaging>
<name>dukes-tutoring</name>
<modules>
<module>dukes-tutoring-common</module>
</modules>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<skip>true</skip>
<executable>${glassfish.home}/bin/asadmin${glassfish.executables.suffix}</executable>
</configuration>
</plugin>
</plugins>
</build>
</project>

最佳答案

我也遇到了同样的问题,我可以给你一些提示,也许会有帮助。

首先,您需要将项目放置在默认情况下所在的文件夹中,否则您需要对 POM 文件进行许多更改,因为父 POM 文件引用了许多配置,例如 glassfish 主文件夹和版本等其他事情。就像这一行:

<executable>${glassfish.home}/bin/asadmin${glassfish.executables.suffix}</executable>

其次,按照提到的方式打开项目(因为该项目在 2 个模块中具有依赖项)“打开项目对话框,导航至:tut-install/examples/case-studies 选择 dukes-tutoring 文件夹。 选中“打开所需项目”复选框,然后单击“打开项目”。"...

第三,构建项目 (dukes-tutoring) 及其依赖项。如果您使用的是 netbeans,您可以右键单击该项目,然后单击“使用依赖项构建”

四、构建成功后运行glassfish服务器并使用mvn install部署项目(dukes-tutoring)。

关于java - org.glassfish.javaeetutorial 的不可解析父 POM :dukes-tutoring,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35397248/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com