Maven cannot compile application [message #1784871] |
Thu, 05 April 2018 03:05 |
Marcelo Ruiz Messages: 80 Registered: April 2017 |
Member |
|
|
Hi,
I was really annoyed with random errors in the editor so I decided to start completely from scratch. I made a backup of my project and erased everything else (eclipse, the eclipse configuration, and the workspace).
I downloaded and installed Eclipse Oxygen.3 (4.7.3) and then installed e(fx)clipse 3.2.0 on top of it. I also created the Run Target based on the e(fx)clipse 3.2.0 runtime.
I then used the wizard to create a new JavaFX OSGI e4 Application Project. Filled in the required information, and edited Application.e4xmi to add a trimmed window with a size of 1024x768.
I run the application as com.test.app.product.product and the window is shown as expected.
The problem comes when I open a console in the workspace folder and type:
mvn clean compile -f com.test.app.releng/pom.xml
Then I get:
Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on project com.test.app: Compilation failure: Compilation failure:
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[1]
[ERROR] package com.test.app.themes;
[ERROR] ^
[ERROR] The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[1]
[ERROR] package com.test.app.themes;
[ERROR] ^
[ERROR] The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[1]
[ERROR] package com.test.app.themes;
[ERROR] ^
[ERROR] The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[5]
[ERROR] public class DefaultTheme extends AbstractTheme {
[ERROR] ^^^^^^^^^^^^
[ERROR] The hierarchy of the type DefaultTheme is inconsistent
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[5]
[ERROR] public class DefaultTheme extends AbstractTheme {
[ERROR] ^^^^^^^^^^^^^
[ERROR] The type javafx.collections.ListChangeListener$Change cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/marcelo/eclipse-workspace/com.test.app/src/com/test/app/themes/DefaultTheme.java:[7]
[ERROR] super("theme.default", "Default theme", DefaultTheme.class.getClassLoader().getResource("css/default.css"));
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] Class<DefaultTheme> cannot be resolved to a type
[ERROR] 6 problems (6 errors)
[ERROR] -> [Help 1]
How do I solve this? Shouldn't this work right away?
I read many forums wasting a complete day and trying many suggestions. The most common one is to go to the project's properties, java build path, libraries, delete the JRE System Library and add it again in every possible way: defined as Execution Environment, as Alternate JRE and as Workspace default JRE). Nothing works.
Any ideas on how to solve this?
Thanks!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04229 seconds