Skip to main content

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

Assuming the nested jar is on bundle-classpath, this is expected
behaviour. Bundle-Classpath always takes precedence over bundle
dependencies.

--
Regards,
Igor

On 12-10-12 5:52 AM, Wim Jongman wrote:
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?




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top