e4 on JavaFX with maven/gradle and java8 [message #1808197] |
Wed, 19 June 2019 06:41 |
Ali Karimi Messages: 36 Registered: October 2015 |
Member |
|
|
Hey,
i am just about to start a new application based on e4 on javaFX and i wanted to know if it is possible to develop an efxclipse application as a pure maven application or pure gradle application with java 8.
I found this repository doing all of this with java 11:
https://github.com/BestSolution-at/e4-efxclipse-maven-sample
I really like that approach. However i am unsure if all of this can also work with java 8 and i hope someone can tell me if i just would waste my time trying this out. I already tried the aforementioned example with java 8 but had no luck.
Thanks in advance.
[Updated on: Wed, 19 June 2019 07:15] Report message to a moderator
|
|
|
|
|
|
Re: e4 on JavaFX with maven/gradle and java8 [message #1808358 is a reply to message #1808349] |
Fri, 21 June 2019 22:26 |
Ali Karimi Messages: 36 Registered: October 2015 |
Member |
|
|
Hey,
thanks for your help. Unfortunately adding the dependencies to the feature project results in a new error message:
[INFO] --- maven-osgi-package-plugin:0.0.2-SNAPSHOT:package-feature (default) @ sample.mvn.feature ---
[ERROR] List of artifacts which are no valid OSGI bundles:
[ERROR] [org.projectlombok:lombok:1.18.8]
[ERROR] [org.apache.spark:spark-core_2.11:2.4.3]
[ERROR] [org.apache.spark:spark-streaming-kafka_2.11:1.6.3]
[ERROR] [org.apache.spark:spark-sql_2.11:2.4.3]
[ERROR] [org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.3]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] sample.mvn.parent .................................. SUCCESS [ 0.387 s]
[INFO] sample.mvn.lib ..................................... SUCCESS [05:53 min]
[INFO] sample.mvn.app ..................................... SUCCESS [ 0.772 s]
[INFO] sample.mvn.feature ................................. FAILURE [ 0.659 s]
[INFO] sample.mvn.product ................................. SKIPPED
[INFO] launch ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:56 min
[INFO] Finished at: 2019-06-22T00:14:25+02:00
[INFO] Final Memory: 40M/1439M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal at.bestsolution:maven-osgi-package-plugin:0.0.2-SNAPSHOT:package-feature (default) on project sample.mvn.feature: Execution default of goal at.bestsolution:maven-osgi-package-plugin:0.0.2-SNAPSHOT:package-feature failed: There are dependencies which are no OSGI bundles. They can not be used in the product. Convert them to valid OSGI bundles. See the list of artifacts above. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :sample.mvn.feature
Process finished with exit code 1
I added exactly the same dependencies to the feature product like to ones of the xxx.lib subproject.
Any further ideas?
Regarding the build i needed to do the following to get the build of this project to work:
git clone https://github.com/BestSolution-at/maven-osgi-plugin.git
cd maven-osgi-plugin
mvn clean install
Otherwise the build of the *e4-efxclipse-maven-sample* project did not complete successfully due to a missing dependency to maven-osgi-plugin.
[Updated on: Fri, 21 June 2019 22:27] Report message to a moderator
|
|
|
Re: e4 on JavaFX with maven/gradle and java8 [message #1808391 is a reply to message #1808358] |
Sun, 23 June 2019 14:05 |
Ali Karimi Messages: 36 Registered: October 2015 |
Member |
|
|
Hey,
i think i have come a step closer to what i want. The problem here is, that these dependencies are not OSGI bundles.
Therefore i created a new subproject and modified the bnd.bnd file to include those dependencies as an OSGI bundle. For testing purposes i have added two dependencies,
one on org.osgeo.proj4j and one on a spark-core library. I am able to use classes from the proj4j library.
The code of that new subproject can be found here:
https://github.com/oemergenc/e4-efxclipse-maven-sample/blob/master/sample.mvn.parent/sample.mvn.spark/pom.xml
However whenever the spark-core library is included the application refuses to start with the following error message:
...
[INFO] --- maven-osgi-exec-plugin:0.0.2-SNAPSHOT:exec-osgi-java (default) @ launch ---
osgi> !SESSION 2019-06-23 15:57:01.145 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_US
Framework arguments: -product sample.mvn.app.product -clearPersistedState
Command-line arguments: -console -consoleLog -product sample.mvn.app.product -clearPersistedState -clean
!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-06-23 15:57:02.925
!MESSAGE Unable to create class 'org.eclipse.fx.ui.workbench.fx.PartRenderingEngine' from bundle '73'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Could not find satisfiable constructor in org.eclipse.fx.ui.workbench.fx.PartRenderingEngine
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:420)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:333)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:193)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:108)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:77)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:59)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.instantiateRenderer(E4Workbench.java:169)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.lambda$0(E4Application.java:241)
at org.eclipse.fx.ui.controls.internal.FXThreadSynchronizeImpl.syncExec(FXThreadSynchronizeImpl.java:109)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.run(E4Application.java:232)
at org.eclipse.fx.ui.workbench.fx.E4Application.jfxStart(E4Application.java:253)
at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.start(DefaultJFXApp.java:57)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Jun 23, 2019 3:57:02 PM org.eclipse.fx.ui.workbench.base.internal.LoggerProviderImpl$1 error
INFORMATION: Failed to create the presentation engine for URI: bundleclass://org.eclipse.fx.ui.workbench.fx/org.eclipse.fx.ui.workbench.fx.PartRenderingEngine
From here i have no clue where or what to investigate. The problem maybe that spark has a lot of transitive dependencies, some of them were included by bnd others not.
However any hint on what/where i could further investigate would be nice.
Thanks in advance.
[Updated on: Sun, 23 June 2019 14:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04301 seconds