Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] Extending Tycho

Hi,

I started writing a Maven plug-in today which makes re-use of some Tycho code. However, I seem to have issues with the whole project setup. Thus, I'm seeking for advice on how to proceed.

Right now I'm stuck with:
java.lang.ClassCastException: org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to org.eclipse.tycho.ReactorProject at org.eclipse.tycho.core.osgitools.DefaultReactorProject.adapt(DefaultReactorProject.java:45)
	at org.eclipse.ebr.maven.BundleMojo.expandVersion(BundleMojo.java:331)

There is some bug for this indicating that I have multiple versions of Tycho in my class path. I believe that is not the case. I have verified that all are of the same version. I beliebe it's related to the class being loaded multiple times which might be related to the lot of contained magic and dynamic loading under the covers that I'm not aware of. If anybode run into this before and has some details to share I'd really appreciate that.

FWIW, I was able to work around this by falling back to reflection. :( I also tried adding my own packaging type, but it doesn't seem to get recognized.

I tried a declaration similar to AbstractTychoPackagingMojo in my Mojo:
 @Component(role = TychoProject.class)
 private Map<String, TychoProject> projectTypes;

But my project type does not appear in the list even though it's defined correctly in the projects POM and recognized by Maven. Might be related to the class loading issues?

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx




Back to the top