[英]Why can't I clean my tycho project with maven clean?
I'm facing below issue, is there any hint to help me out? 我面临以下问题,是否有任何提示可以帮助我? Thanks. 谢谢。
I have a project set up as below: 我有一个项目设置如下:
C:\workspace
|-------com.myorg.myplugin.tycho
|-------com.myorg.myplugin1
|-------com.myorg.myplugin2
|-------com.myorg.myplugin.feature
|-------com.myorg.mylpugin.repository
com.myorg.myplugin2
is a plug-in project, and it is a dependency of the com.myorg.myplugin1
plug-in project. com.myorg.myplugin2
是一个插件项目,并且是com.myorg.myplugin1
插件项目的依赖项。 Both of the project are included as module
in the tycho
parent project. 这两个项目都作为tycho
父项目的module
包含在内。
I'm able to run maven clean package
successfully in tycho
project. 我能够在tycho
项目中成功运行maven clean package
。 But when I try to run only maven clean
, following error occurs: 但是,当我尝试仅运行maven clean
,会发生以下错误:
org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project mygroup:com.myorg.myplugin1:eclipse-plugin:1.0.0-SNAPSHOT: Could not find artifact mygroup:com.myorg.myplugin2:jar:1.0.0-SNAPSHOT org.apache.maven.project.DependencyResolutionException:无法解析项目mygroup:com.myorg.myplugin1:eclipse-plugin:1.0.0-SNAPSHOT的依赖项:找不到工件mygroup:com.myorg.myplugin2:jar:1.0。 0快照
--> why is it looking for a jar
artifact??? ->为什么要寻找jar
神器???
The pom.xml
files of two plug-in projects are very simple: 两个插件项目的pom.xml
文件非常简单:
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>mygroup</groupId>
<artifactId>com.myorg.myplugin.tycho</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.myorg.myplugin.tycho/</relativePath>
</parent>
<groupId>mygroup</groupId>
<artifactId>com.myorg.myplugin1</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
and 和
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>mygroup</groupId>
<artifactId>com.myorg.myplugin.tycho</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.myorg.myplugin.tycho/</relativePath>
</parent>
<groupId>mygroup</groupId>
<artifactId>com.myorg.myplugin2</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
I'm finally able to solve this with the help of some colleagues. 我终于可以在一些同事的帮助下解决这个问题。 This happened because I've never run install
goal before. 发生这种情况是因为我之前从未运行过install
目标。 Once I did it, clean
works as normal. 一旦完成, clean
工作将正常进行。 I'm not sure why, but it works :) 我不确定为什么,但是它可以工作:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.