Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Generics problem

I think it was a relative parent path problem. All is fine now. Sorry for the spam.

Regards,

Wim

On Thu, Oct 11, 2012 at 3:41 PM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
Hi,

When I compile a plugin that uses OSGi tycho strangely gives me a generics error that I don't have in my workspace:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.15.0:compile (default-compile)
[ERROR] C:\Users\jongw\Workspaces\grav..
[ERROR] private ServiceRegistration<?> serviceTrackerEventListenerstener;
[ERROR] ^^^^^^^^^^^^^^^^^^^
[ERROR] The type ServiceRegistration is not generic; it cannot be parameterized with arguments <?>

..

There are no references to old java versions in build.properties or manifest.mf. It is only this bundle that complains about generics. Other bundles use generics as well but compile fine.

I have been searching the web but no others have this problem. I did, however, find a reference to defining source and target versions for the tycho compiler.

When I add the following to the pom of the plugin, Tycho compiles fine. Please see the source version 1.1 Why does tycho compile with this addition to the pom and failes otherwise?

Thanks for looking at this

Regards,

Wim


-- PLUGIN POM ADDITIONS

<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>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.1</source>
</configuration>
</plugin>
</plugins>
</build>

--- PLUGIN POM

<?xml version="1.0" encoding="UTF-8"?>
<project
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.remainsoftware.gravity</groupId>
<artifactId>gravity-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.remainsoftware.gravity.parent</relativePath>
</parent>
<groupId>com.remainsoftware.gravity</groupId>
<artifactId>com.remainsoftware.gravity.rap.event.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<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>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.1</source>
</configuration>
</plugin>
</plugins>
</build>

</project>



-- PARENT POM

<modelVersion>4.0.0</modelVersion>
<groupId>com.remainsoftware.gravity</groupId>
<artifactId>gravity-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>


<properties>
<tycho-version>0.15.0</tycho-version>
</properties>

<pluginRepositories>
<pluginRepository>
<id>tycho-snapshots</id>
</pluginRepository>
</pluginRepositories>

<repositories>

<repository>
<id>juno</id>
<layout>p2</layout>
</repository>


<repository>
<id>nebula-release</id>
<layout>p2</layout>
</repository>

<repository>
<id>nebula-incubator</id>
<layout>p2</layout>
</repository>

<repository>
<id>rap-runtime</id>
<layout>p2</layout>
</repository>

<repository>
<id>rap-incubator</id>
<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>
<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>
</plugins>
</build>
</project>



Back to the top