为什么我不能用maven清理我的tycho项目?

时间:2016-08-10 04:27:08

标签: java eclipse maven eclipse-plugin tycho

我面对下面的问题,是否有任何提示可以帮助我? 感谢。

我的项目设置如下:

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>

0 个答案:

没有答案