Hello Sisinda
Thanks for the report.
Le 20/06/2017 à 19:37, Sisinda Dinusha a écrit :
> sis-metadata module is almost finished. It should be good to go on
> Android but I haven't tested it yet by actually implementing it in
> real Android environment.
>
Is there a way to run the JUnit tests in an Android environment?
> In fact there are not much changes in the module since we are using
> the original JAXB implementation on Android. The main change happened
> was the replacement of java.nio.file classes using java.io classes in
> Android2 branch.
>
This is good a new. Would it be possible to maintain a document
somewhere (README or other document at your choice) explaining:
* The branches and a short paragraph summarizing the difference
between the two branches (no need to list the differences).
* The dependencies added.
* How to build (with Maven if possible, or other tools otherwise).
* How to run the JUnit tests.
* How to specify a connection to the database (see next paragraph).
> javax.naming package used in sis-metadata module is missing in
> Android. I am still getting familiar with the code base so still don't
> have a clear idea about how to handle this issue.
>
I suggest that you remove completely javax.naming usage on the Android
branch. It is currently used for only one purpose: getting a
javax.sql.DataSource for a connection to the EPSG database. I presume
that on Android, the way to connect to a database is different. What is
the usual way on Android?
> There is an dependency for JAXB implementation which require java.awt
> classes (not sure about which dependency). I found a jar file, inside
> a docx4j project, which is an extraction of java.awt package from jdk
> and it works perfectly fine for the purpose. So I think we can leave
> the java.awt implementation in the sis-referencing module.
>
An alternative would be to replace java.awt usage by something
equivalent on Android platform if available, or something rewritten on
Android branch otherwise. I suggest that you post the java.awt
dependency that you found (or maybe better, create a task on JIRA or
GitHub) so we can suggest replacements. Usage of AWT in SIS should be
much easier to replace than usage of JAXB.
> I will try to implement the OSGi features but I don't have much
> knowlegde about it and not sure if it can be done on Android.
>
I suggest that we completely remove OSGi support on Android. I'm not
sure it make sense of that platform. Even on JavaSE, with Jigsaw soon
available, the need for OSGi may be reduced.
Have a nice day
Martin