当我试图找出我通过Tycho构建的Eclipse插件不能在CDT中工作但在JDT中工作的原因时,我感到非常沮丧。 父pom.xml如下所示:
<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>
<groupId>com.company.eclipse.plugin</groupId>
<artifactId>abc-master</artifactId>
<version>1.0.0</version>
<name>abc Master</name>
<packaging>pom</packaging>
<modules>
<module>../abc</module>
</modules>
<properties>
<tycho.version>0.20.0</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kepler-repo.url>http://download.eclipse.org/releases/kepler</kepler-repo.url>
</properties>
<repositories>
<repository>
<id>kepler</id>
<url>${kepler-repo.url}</url>
<layout>p2</layout>
</repository>
<repository>
<id>cdt</id>
<url>http://download.eclipse.org/tools/cdt/releases/kepler</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>p2-composite</outputDirectory>
<resources>
<resource>
<directory>p2-composite-template</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
abc插件的pom就像下面的
一样<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<relativePath>../abc-master/pom.xml</relativePath>
<groupId>com.company.eclipse.plugin</groupId>
<artifactId>abc-master</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>com.company.eclipse.plugin.abc</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
非常感谢任何帮助。
答案 0 :(得分:0)
非常感谢帮助我。我怀疑它是由于Eclipse for C / C ++以某种方式被破坏了。所以我下载了一个新的CDT,并将文件从新的CDT复制到旧的CDT文件夹,然后尝试启动旧的CDT以查看该插件是否有效。使用新下载的副本替换“配置”文件夹后,该插件可以正常工作。因此,旧CDT中配置文件夹中的某些内容会阻止插件启动。不幸的是我忘了备份旧的CDT,所以现在我无法重新产生问题以调查配置文件夹中的错误。
关闭,因为无法重现