[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] Generics problem
|
I again ran into this situation but now know why it occurs.
I have bundle that cannot compile because of the tycho compiler says stuff like this:
C:\Users\jongw\Workspaces\gravitybuild\com.remainsoftware.gravity.event.ui\src\com\remains
protected ServiceRegistration<?> eventServiceEventListenerRegstration;
^^^^^^^^^^^^^^^^^^^
The type ServiceRegistration is not generic; it cannot be parameterized with arguments <?>
It appears I have a jar in the bundle and on my Bundle-Classpath that also contains (an older) version of this serviceregistration class.
The Manifest defines this exec environment. Bundle-RequiredExecutionEnvironment: JavaSE-1.6
If I add the following to the local pom it compiles with success
<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>
I am puzzled why the tycho compiler favorites the class in the jar over the normal osgi classpath and eclipse does not. I am also puzzled why the entry in the local pom makes the behavior go away.
Any ideas? Do you want me to file a bug with examples?