-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Central release requires a osgi.platform
in a maven/gradle
#164
Comments
For this I can refer you over to the Lingua Franca project, they currently also use the Maven artifacts of KLighD to build a standalone application using the offscreen renderer with SWT. See this PR: lf-lang/lingua-franca#1713 |
@NiklasRentzCAU , thanks a lot! It has indeed solved the problem locally. On a side note, is it intentional that the "standalone" version of the tools requires SWT? I would have first thought that the standalone parts of the toolchain would be independent of a widget framework like SWT, but I I od not know if there are fundamental coupling between parts of Klighd and SWT :). In any case, here are the additional lines (based on the PR changes) aside from the dependency that lead to a correct build, for future reference:
We could close this issue if you wish, but I would highly recommend this to be documented somewhere easily reachable as more people ought to have this problem besides me and the LF people! |
The standalone version does not directly require SWT; the core 'klighd' artifact from its transient dependencies requires SWT and therefore the standalone package does so too. You are right, in a standalone application and especially in the core component there should not be platform-dependent dependencies to SWT. However, KLighD was designed with SWT so deeply ingrained that is is practically impossible to completely remove SWT without rewriting the entire core of the project. Therefore we implemented SWT mock code that has the same API but no functionality, which will be pulled instead of the real SWT artifacts when implementing a language server with KLighD. As other non-language-server standalone applications mostly use the SWT-dependent offscreen-renderers (as you do as well), we left the dependency in there. I will leave this issue open as a reminder to further document this in the Wiki and maybe provide a solution directly in the dependency management of the standalone package, such that SWT can be pulled again without your workaround (if even possible with Maven directly). |
First, thanks a lot for the effort in releasing the artefacts to Maven Central since 2.3.0! I am sure it will help Klighd gain more critical mass in the long run!
Now, when I tried to fetch the latest
standalone
variant of the artifacts (as instructed, so I hope), I got an error:This makes me think that the variable
osgi.platform
would be trivially substituted in the original OSGi framework of Klighd, but here fails to succeed. I could try setting this ingradle
somehow so that the variable gets substituted, but then I do not know the correct substitution.Hope this is an easy fix either in the publishing flow or locally on my side!
PS:
The project that I handle and tries now to use the artifacts is ForSyDe IO.
The text was updated successfully, but these errors were encountered: