First time Tycho user (using Eclipse Mars.2), converting a plugin
project to use Tycho to do the build.
Problem is that the Maven Build is throwing a compiler error, where
the JDT compiler shows no error.
Tried to ensure that the build would use the JDT, but still getting
the same error.
What am I missing?
Thanks ...
------------------------
The error is:
[INFO] --- tycho-compiler-plugin:0.24.0:compile
(default-compile) @ net.certiv.dsl.ui ---
[INFO] Compiling 315 source files to
D:\DevFiles\Eclipse\Dsl\net.certiv.dsl\net.certiv.dsl.ui\target\classes
....
[INFO] BUILD FAILURE
....
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-compiler-plugin:0.24.0:compile
(default-compile) on project net.certiv.dsl.ui: Compilation
failure: Compilation failure:
[ERROR] ICommandService commandSvc =
PlatformUI.getWorkbench().getAdapter(ICommandService.class);
[ERROR] Type mismatch: cannot convert from Object to
ICommandService
The interface definition of `getAdapter(..)` is generic -- <>
.....getAdapter(<>
adapter) -- but the implementation is not.
------------------------
Parent POM
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.certiv.dsl</groupId>
<artifactId>net.certiv.dsl</artifactId>
<version>0.5.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>net.certiv.dsl :: parent</name>
<description>net.certiv.dsl parent</description>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<tycho.version>0.24.0</tycho.version>
<tycho.extras.version>0.24.0</tycho.extras.version>
<tycho.test.platformArgs/>
<tycho.test.jvmArgs>-Xmx512m</tycho.test.jvmArgs>
</properties>
<repositories>
<repository>
<id>luna</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/luna</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerId>jdt</compilerId>
<compilerArgs>
<arg>-warn:-raw,unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<ignoreTychoRepositories>true</ignoreTychoRepositories>
<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>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>attach-source</id>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<format>yyyyMMdd-HHmm</format>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<useUIHarness>true</useUIHarness>
<argLine>${tycho.test.jvmArgs}</argLine>
<!-- kill test JVM if tests take more than 1 minute
(60 seconds) to finish -->
<forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>macosx</id>
<activation>
<os><family>mac</family></os>
</activation>
<properties>
<tycho.test.platformArgs>-XstartOnFirstThread</tycho.test.platformArgs>
</properties>
</profile>
<profile>
<id>source-feature</id>
<activation>
<file>
<exists>feature.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho.extras.version}</version>
<executions>
<execution>
<id>source-feature</id>
<phase>package</phase>
<goals>
<goal>source-feature</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>net.certiv.dsl.core</module>
<module>net.certiv.dsl.test</module>
<module>net.certiv.dsl.feature</module>
<module>net.certiv.dsl.site</module>
<module>net.certiv.dsl.ui</module>
</modules>
</project>
|