Issue compiling with Tycho 2.4.0 when patch fragments are used #300
Unanswered
ravikirankatneni
asked this question in
Q&A
Replies: 1 comment
-
execute goal org.eclipse.tycho:tycho-compiler-plugin:2.0.0:compile says 2.0.0 not 2.4.0. Eitherway, do you still face the issue with upcoming 2.7.0? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Tycho Dev team,
I am facing compilation issues when fragment plugins are used as patch plugins to overwrite classes present in host plugins.
In the project I have tried, there are two eclipse plugins (test-plugin, client) and one eclipse fragment(test-plugin-fragment). Fragment(test-plugin-fragment) is adding a class with the same name and same package as the Host(test-plugin-fragment), and it has a public method(method2) that in not present in the class of Host. Client plugin has a dependency on Host plugin, and it is making use of the extra method(method2) available in the class present in fragment. Client plugin build properties has an entry “jars.extra.classpath = platform:/plugin/test-plugin-fragment/library.jar”.
The above mentioned project is compiling with Eclipse PDE without any errors. Tycho version 1.0.0 is also able to compile this project without any errors.
Tycho version 2.4.0 failing to compile the project and show the following error
“[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.0.0:compile (default-compile) on project client: Compilation failure: Compilation failure:
[ERROR] C:\EclipseWorkSpaces\tyco_issue\client\src\org\eclipse\birt\client\SampleUser.java:[8]
[ERROR] s.mtwo();
[ERROR] ^^^^
[ERROR] The method mtwo() is undefined for the type SampleClass”
From my observations looking at the maven debug logs, the classpath constructed for compilation has Host plugin jar appearing before the Fragment jar.
[DEBUG] Classpath:
[DEBUG] C:\work\devspaces\connectors\repository\org\test\test-plugin\1.0.0\test-plugin-1.0.0.jar[+org/eclipse/birt/sample/;?**/]
[DEBUG] C:\work\devspaces\connectors\repository.cache\tycho\test-plugin-fragment-1.0.0.jar\library.jar[+org/eclipse/birt/sample/;?**/]
[DEBUG] C:\work\devspaces\connectors\repository\org\test\test-plugin-fragment\1.0.0\test-plugin-fragment-1.0.0.jar[+org/eclipse/birt/sample/;?**/]
[DEBUG] C:\work\devspaces\connectors\repository.cache\tycho\test-plugin-fragment-1.0.0.jar\library.jar
[DEBUG] C:\EclipseWorkSpaces\tyco_issue\client\target\classes
Compilation in PDE is working as per the following https://bugs.eclipse.org/bugs/show_bug.cgi?id=126687
Please help me in resolving this issue.
Beta Was this translation helpful? Give feedback.
All reactions