用maven编译项目时出现如下问题 30
运行mvncleaninstall-Dmaven.test.skip=true出错。[ERROR]Theprojectcom.wyz:2.0.2-SNAPSHOT(/ho...
运行mvn clean install -Dmaven.test.skip=true出错。
[ERROR] The project com.wyz:2.0.2-SNAPSHOT (/home/wuyanzan/wyz/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
按提示运行mvn -X clean install后,具体错误如下:
[INFO] Scanning for projects...
[DEBUG] Could not find metadata com.wyz:pampas:2-SNAPSHOT/maven-metadata.xml in local (/root/.m2/repository)
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
这到底是什么意思啊? 展开
[ERROR] The project com.wyz:2.0.2-SNAPSHOT (/home/wuyanzan/wyz/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
按提示运行mvn -X clean install后,具体错误如下:
[INFO] Scanning for projects...
[DEBUG] Could not find metadata com.wyz:pampas:2-SNAPSHOT/maven-metadata.xml in local (/root/.m2/repository)
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
这到底是什么意思啊? 展开
5个回答
展开全部
在/etc/profile配置java的环境变量: 你的mvn 项目是用哪个版本的jdk.,就要配置那个版本的jdk。
强制保存文件命令:w !sudo tee %
此时在进入项目执行:$ git pull origin master
继续mvn clean install
一、可执行的JAR文件
使用Maven 构建一个JAR 文件比较容易:只要定义项目包装为“jar”,然后执行包装生命周期阶段即可。但是定义一个可执行JAR 文件却比较麻烦。采取以下步骤可以更高效:
1、在您定义可执行类的 JAR 的MANIFEST.MF 文件中定义一个main类。(MANIFEST.MF 是包装您的应用程序时 Maven 生成的。)
2.、找到您项目依赖的所有库。
3、 在您的MANIFEST.MF 文件中包含那些库,便于您的应用程序找到它们。您可以手工进行这些操作,或者要想更高效,您可以使用两个 Maven 插件帮助您完成:maven-jar-plugin 和 maven-dependency-plugin
展开全部
maven项目编译的标准输出路径就是mavenProject/target/classes, 项目右键 build path--configure build path--java build path--source,把default output folder改成mavenProject/target/classes,在菜单栏project下把自动编译打勾。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
提示在你的本地仓库或远程仓库里找不到这个com.wyz:pampas:pom:2-SNAPSHOT构件
提示在你的本地仓库或远程仓库里找不到这个com.wyz:pampas:pom:2-SNAPSHOT构件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-04-24
展开全部
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
[FATAL] Non-resolvable parent POM: Could not find artifact com.wyz:pampas:pom:2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 10
追问
麻烦解释下,maven刚开始用。。
追答
parent不存在
那都写着多少行出问题的了
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
程序乱了
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询