fugue.ScalaConverters and OSGI not playing nice with package structure
I have just tried to use fugue.ScalaConverters with JSD
But it seems that there is an OSGI issue, as even though I have added it as a compile scope dependency, I am getting ClassNotFoundException when it tries to access it while running JIRA.
My guess is that because com.atlassian.fugue
is in the OSGI Import-Package declaration (so can access Option / Either, etc in main moule) to ensure that we use the version being shared by JIRA, and the ScalaConverters is also com.atlassian.fugue
then it must be expecting to load it from the environment and not from the included module?
Could this be fixed by adding it to the JIRA scala-provider-plugin (as a longer term solution), or if it is only designed to be used locally by those who want it, can we change the package?
I tested by renaming the package structure to com.atlassian.fugue.conversions
and everything started up fine, so obvioulsy OSGI did not try to resolve it, as the package is not part of the Import-Package instructions.
Anyway, for the time being, it seems I need to copy the code into JSD, but hopefully can remove soon :)
Comments (4)
-
-
Account Deactivated reporter Fix on the 3.0 branch if you want, but I guess that would be JIRA 8 before we can use it on JSD. So in the meantime, I'd like to move the ScalaConverters package to a new place (2 PRs open for this), as don't like having had to copy / paste the class into JSD codebase
-
Account Deactivated reporter Anything that is toJava / toScala, I guess is on the 3.0 branch only?
-
Account Deactivated reporter - changed status to resolved
- Log in to comment
http://wiki.osgi.org/wiki/Split_Packages Is what you're seeing. We can remove this on the 3.0 branch.
How do you feel about changing conversion functions to toJava/toScala instead? https://bitbucket.org/atlassian/fugue/issues/23/fuguescalaconverters-vs