我面对下面的问题,是否有任何提示可以帮助我? 感谢。
我的项目设置如下:
C:\workspace
|-------com.myorg.myplugin.tycho
|-------com.myorg.myplugin1
|-------com.myorg.myplugin2
|-------com.myorg.myplugin.feature
|-------com.myorg.mylpugin.repository
com.myorg.myplugin2
是一个插件项目,它是com.myorg.myplugin1
插件项目的依赖项。这两个项目都包含在module
父项目的tycho
中。
我能够在maven clean package
项目中成功运行tycho
。但是当我尝试仅运行maven clean
时,会发生以下错误:
org.apache.maven.project.DependencyResolutionException:无法解析项目mygroup的依赖项:com.myorg.myplugin1:eclipse-plugin:1.0.0-SNAPSHOT:找不到工件mygroup:com.myorg.myplugin2:jar :1.0.0-SNAPSHOT
- >为什么要寻找jar
神器???
两个插件项目的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>
和
<?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>