Hi Kasun,

1.) The fix I did was in a very old version of felix.scr.generator which
was released in 2011. I could not find the source on github so I downloaded
the source jar from maven repo and modified and installed to my local m2
repo by changing the version. Since this issue does not exist in newer
versions I am not sure how can i send the fix to Felix. (newer
versions of felix.scr.generator
are not compatible with old scr plugin 1.7.4 which is the working version
for scr annotations).
What I thought of was to deploy the modified version in wso2 nexus repo but
I am not aware of the procedure (or whether should it be done like that)
please let me know.

2.) So far my focus was on building C4 with java 10. In that case I will
try to compile with java 8 and get it to run on java 10 first.

Thanks

On Mon, Sep 3, 2018 at 1:54 PM, KasunG Gajasinghe <[email protected]> wrote:

>
>
> On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane <[email protected]>
> wrote:
>
>> Hi all,
>>
>> An update on the previous email.
>>
>> In order to automatically generate osgi metadata xmls during the maven
>> build either of following annotation schemas can be used.
>>
>>
>>    - Felix SCR annotations
>>    - OSGi declarative services (DS) annotations
>>
>> Older versions of maven scr plugin has used felix scr annotations but
>> later on its mentioned on the documentations that it has started to support
>> both felix scr annotations and DS annotations from osgi which is the
>> standard set of annotations for generating osgi meta data xmls. This is
>> done by adding the relevant dependency to pom with the scr plugin. However
>> newer versions of scr plugin do not seem to be supporting felix scr
>> annotations and what i found from the community is that the scr plugin is
>> in maintenance mode and it is better to use maven bundle plugin (without
>> the scr plugin) which only supports osgi ds annotations.
>>
>> Since felix scr annotations are used in C4 I had 2 options to proceed.
>> Either to fix java 10 compatibility issues in the older version (1.7.4) of
>> scr plugin or to convert existing scr annotations in C4 into osgi ds
>> annotations so that I can avoid using the scr plugin. I decided its better
>> to try and keep the existing annotation schema because changing it affects
>> those who use C4 with their own osgi bundles.
>> I could fix some compatibility issues in felix.scr.generator-1.1.4
>> library which is a dependency for scr plugin 1.7.4.
>> Now OSGI-INF folder structure is generated with the modified felix scr
>> generator and felix scr plugin.
>>
>
> This is great. Are you going to send this fix to upstream Felix folks?
> Where can we find the current fix?
>
>
>>
>> However there are other compatibility issues when building C4 with java
>> 10 which I am currently trying to fix.
>>
>>
> I think building C4 products with Java 10 is a secondary effort. I think
> the priority is to get the product runtime to work in Java 10. This is what
> we did with Java 7 -> 8 migration as well afair. So, can we run the
> products built with Java 8 on Java 10 now?
>
>
>> Thanks
>>
>>
>> On Wed, Aug 29, 2018 at 5:17 PM, Tharindu Wijewardane <[email protected]
>> > wrote:
>>
>>> Hi all,
>>>
>>> registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob)
>>> they were empty and has the comment: Dummy implementation for jdk6.
>>> I removed that module and went ahead.
>>>
>>> However I'm facing issues getting the maven-scr-plugin to generate the
>>> "scr-plugin-generated" folder which contains the serviceComponents.xml etc.
>>>
>>> Following error occurs if I use the existing scr plugin version with
>>> java 10.
>>>
>>> [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> (generate-scr-scrdescriptor) on project carbon-kernel: Execution
>>> generate-scr-scrdescriptor of goal 
>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> failed: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider
>>> is not an ImageIO SPI class
>>>
>>>
>>> When I upgrade the maven scr plugin version to 1.26.0 (latest) it
>>> complains that "No annotation processors found in classpath"
>>> So I added org.apache.felix.scr.annotations as an dependency according
>>> to instructions in Apache Felix documentation.
>>>
>>> Now i am getting the following error because scr-plugin-generated
>>> folder structure is still not generated.
>>>
>>> [ERROR] Manifest 
>>> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT
>>> : Input file does not exist: target/scr-plugin-generated/
>>> OSGI-INF/serviceComponents.xml
>>>
>>> I have tried this with multiple scr plugin versions and with and without
>>> upgrading the equinox version.
>>>
>>> No information is available on this issue in the community. Nobody seems
>>> to be using java 10 for OSGI stuff.
>>> I have asked about this issue on stackoverflow and apache felix users'
>>> mailing list.
>>> I am posting this in this thread as an update.
>>>
>>> Any help is appreciated.
>>>
>>>
>>> On Mon, Aug 27, 2018 at 1:25 PM, Praminda Jayawardana <[email protected]
>>> > wrote:
>>>
>>>> Yes, even if we get passed this error now, this will be problematic
>>>> later at the startup.
>>>>
>>>> On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe <[email protected]>
>>>> wrote:
>>>>
>>>>>
>>>>> Why a java.* package classes are added to our source tree?
>>>>>
>>>>> carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/
>>>>> java/java/sql/SQLXML.java
>>>>>
>>>>>
>>>>> On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane <
>>>>> [email protected]> wrote:
>>>>>
>>>>>>
>>>>>> Thanks Praminda.
>>>>>> I used sisu_ artifacts to build carbon p2 plugin.
>>>>>>
>>>>>> As for the equinox, since eclipse does not publish newer versions of
>>>>>> the equinox through maven repository I downloaded the latest version
>>>>>> (Photon) and manually installed all the jars in my local maven repo using
>>>>>> "wso2" as a prefix for the group ids of the artifacts. Then I updated the
>>>>>> poms in carbon kernal (C4) to use the new jars and fixed compilation 
>>>>>> issues
>>>>>> due to class movements.
>>>>>>
>>>>>> However I could not solve the following issue yet.
>>>>>>
>>>>>> [ERROR] Failed to execute goal 
>>>>>> org.apache.felix:maven-scr-plugin:1.26.0:scr
>>>>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.registry.xboot:
>>>>>> /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.
>>>>>> carbon.registry.xboot/src/main/java/java/sql/SQLXML.java : Unable to
>>>>>> scan class files: java.sql.SQLXML (Class file format probably not 
>>>>>> supported
>>>>>> by ASM ?): IllegalArgumentException
>>>>>>
>>>>>> I used the latest version of maven-scr-plugin.
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 23, 2018 at 4:37 PM, Praminda Jayawardana <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> import for P2applicationlauncher should be changed from *import
>>>>>>> org.eclipse.tycho.p2.facade.in
>>>>>>> <http://org.eclipse.tycho.p2.facade.in>ternal.P2ApplicationLauncher *to
>>>>>>> *import
>>>>>>> org.eclipse.sisu.equinox.launching.internal.P2ApplicationLauncher*
>>>>>>> aswell.
>>>>>>>
>>>>>>> On Thu, Aug 23, 2018 at 4:20 PM Praminda Jayawardana <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Tharindu,
>>>>>>>>
>>>>>>>> Tycho plugin we are using at the moment is not compatible with Java
>>>>>>>> 10 as I know.
>>>>>>>> Using following dependencies,
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>sisu-equinox-embedder</artifactId>
>>>>>>>>     <version>1.2.0</version>
>>>>>>>> </dependency>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>sisu-equinox-launching</artifactId>
>>>>>>>>     <version>1.2.0</version>
>>>>>>>> </dependency>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>tycho-p2-facade</artifactId>
>>>>>>>>     <version>1.2.0</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>> in place of below old tycho dependencies should work. These changes
>>>>>>>> are to be made in maven-tools/carbon-p2-plugin/pom.xml
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>tycho-equinox</artifactId>
>>>>>>>>     <version>${tycho.version}</version>
>>>>>>>> </dependency>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>tycho-equinox-launching</artifactId>
>>>>>>>>     <version>${tycho.version}</version>
>>>>>>>> </dependency>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.eclipse.tycho</groupId>
>>>>>>>>     <artifactId>tycho-p2-facade</artifactId>
>>>>>>>>     <version>${tycho.version}</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Praminda
>>>>>>>>
>>>>>>>> On Thu, Aug 23, 2018 at 3:26 PM Afkham Azeez <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> May be the latest plugin after the upgrade requires additional
>>>>>>>>> configuration. Please check why the NPE is thrown and we can figure 
>>>>>>>>> out
>>>>>>>>> what is missing from there.
>>>>>>>>>
>>>>>>>>> On Thu, Aug 23, 2018 at 9:03 AM Tharindu Wijewardane <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> Following is what I have done so far. I have sent an email to
>>>>>>>>>> [email protected] earlier but its still being held with the reason "Post
>>>>>>>>>> by non-member to a members-only list".
>>>>>>>>>>
>>>>>>>>>> First I tried to build the 2.5.0 release of product-apim as it is
>>>>>>>>>> with java 10 and the build of p2-profile module failed with the 
>>>>>>>>>> following
>>>>>>>>>> jar
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                         .m2/repository/org/eclipse/
>>>>>>>>>> tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.
>>>>>>>>>> equinox.launcher_1.2.0.v20110725-1610.jar
>>>>>>>>>>
>>>>>>>>>> Since it is included through carbon-p2-plugin module of the
>>>>>>>>>> maven-tools project I built the module using java 10 and use it to 
>>>>>>>>>> build
>>>>>>>>>> product-apim. Then the issue with the jar resolved but I got the 
>>>>>>>>>> following
>>>>>>>>>> issue when building p2-profile module.
>>>>>>>>>>
>>>>>>>>>> [ERROR] java.lang.NullPointerException
>>>>>>>>>> java.lang.RuntimeException: java.lang.NullPointerException
>>>>>>>>>>     at org.eclipse.tycho.p2.facade.in
>>>>>>>>>> ternal.P2ApplicationLauncher.execute (P2ApplicationLauncher.java:
>>>>>>>>>> 132)
>>>>>>>>>>     at org.wso2.maven.p2.RepositoryGenMojo.generateRepository
>>>>>>>>>> (RepositoryGenMojo.java:253)
>>>>>>>>>>     at org.wso2.maven.p2.RepositoryGenMojo.createRepo
>>>>>>>>>> (RepositoryGenMojo.java:204)
>>>>>>>>>>     at org.wso2.maven.p2.RepositoryGenMojo.execute
>>>>>>>>>> (RepositoryGenMojo.java:191)
>>>>>>>>>>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
>>>>>>>>>> (DefaultBuildPluginManager.java:137)
>>>>>>>>>>
>>>>>>>>>> Furthermore, I was able to build tycho-equinox, tycho-p2-facade
>>>>>>>>>> and tycho-equinox-launching packages individually with jdk 10 but 
>>>>>>>>>> with the
>>>>>>>>>> maven compiler plugin release config as 8.
>>>>>>>>>>
>>>>>>>>>> <plugin>
>>>>>>>>>>
>>>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>>>
>>>>>>>>>> <artifactId>maven-compiler-plugin</artifactId>
>>>>>>>>>>
>>>>>>>>>>  <version>3.7.0</version>
>>>>>>>>>>
>>>>>>>>>>  <configuration>
>>>>>>>>>>
>>>>>>>>>>   <release>8</release>
>>>>>>>>>>
>>>>>>>>>>  </configuration>
>>>>>>>>>>
>>>>>>>>>>  </plugin>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I have tried building carbon-kernel with java 10 and failed due
>>>>>>>>>> to the following error.
>>>>>>>>>>
>>>>>>>>>> [ERROR] Failed to execute goal 
>>>>>>>>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>>>>>>>>> (generate-scr-scrdescriptor) on project carbon-kernel: Execution
>>>>>>>>>> generate-scr-scrdescriptor of goal 
>>>>>>>>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>>>>>>>>> failed: 
>>>>>>>>>> org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider
>>>>>>>>>> is not an ImageIO SPI class
>>>>>>>>>>
>>>>>>>>>> At each time above projects could be built with java 8 (to make
>>>>>>>>>> sure there isn't any configuration issue since I am building those 
>>>>>>>>>> projects
>>>>>>>>>> for the 1st time)
>>>>>>>>>>
>>>>>>>>>> I will read more about carbon platform and try to understand how
>>>>>>>>>> equinox is used. But at the meantime any direction on how should I 
>>>>>>>>>> continue
>>>>>>>>>> is highly appreciated.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Aug 20, 2018 at 10:41 AM, Sriskandarajah Suhothayan <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Azeez
>>>>>>>>>>>
>>>>>>>>>>> Tharindu (New Joiner) is working on $Subject, can you please
>>>>>>>>>>> provide necessary assistance to him on this.
>>>>>>>>>>> @Tharindu Wijewardane <[email protected]> can you please send
>>>>>>>>>>> the work you have done so far to the dev list cc'ing Azeez and 
>>>>>>>>>>> Sameera
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>> Suho
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> *S. Suhothayan*
>>>>>>>>>>> Director
>>>>>>>>>>> *WSO2 Inc. *
>>>>>>>>>>> http://wso2.com  <http://wso2.com/>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
>>>>>>>>>>> <http://suhothayan.blogspot.com/>twitter: 
>>>>>>>>>>> http://twitter.com/suhothayan
>>>>>>>>>>> <http://twitter.com/suhothayan> | linked-in:
>>>>>>>>>>> http://lk.linkedin.com/in/suhothayan 
>>>>>>>>>>> <http://lk.linkedin.com/in/suhothayan>*
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Tharindu Wijewardane*
>>>>>>>>>> *Senior Software Engineer*
>>>>>>>>>> *WSO2 Inc.*
>>>>>>>>>>
>>>>>>>>>> *http://wso2.com <http://wso2.com/>*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> *Afkham Azeez*
>>>>>>>>> Senior Director, Platform Architecture; WSO2, Inc.;
>>>>>>>>> http://wso2.com
>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>> * <http://www.apache.org/>*
>>>>>>>>> *email: **[email protected]* <[email protected]>
>>>>>>>>> * cell: +94 77 3320919blog: **http://blog.afkham.org*
>>>>>>>>> <http://blog.afkham.org>
>>>>>>>>> *twitter: **http://twitter.com/afkham_azeez*
>>>>>>>>> <http://twitter.com/afkham_azeez>
>>>>>>>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>>>>>>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>>>>>>>
>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> *Praminda Jayawardana*
>>>>>>>> Senior Software Engineer
>>>>>>>> WSO2 Inc.; http://wso2.com
>>>>>>>> Mobile : +94 (0) 716 590918
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> *Praminda Jayawardana*
>>>>>>> Senior Software Engineer
>>>>>>> WSO2 Inc.; http://wso2.com
>>>>>>> Mobile : +94 (0) 716 590918
>>>>>>>
>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Tharindu Wijewardane*
>>>>>> *Senior Software Engineer*
>>>>>> *WSO2 Inc.*
>>>>>>
>>>>>> *http://wso2.com <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Tharindu Wijewardane*
>>>>>> *Senior Software Engineer*
>>>>>> *WSO2 Inc.*
>>>>>>
>>>>>> *http://wso2.com <http://wso2.com/>*
>>>>>>
>>>>>> --
>>>>>
>>>>> *Kasun Gajasinghe*Technical Lead, WSO2 Inc.
>>>>> email: kasung AT spamfree wso2.com
>>>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>>>> blog: http://kasunbg.org
>>>>> phone: +1 650-745-4499, 77 678 0813
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Praminda Jayawardana*
>>>> Senior Software Engineer
>>>> WSO2 Inc.; http://wso2.com
>>>> Mobile : +94 (0) 716 590918
>>>>
>>>
>>>
>>>
>>> --
>>> *Tharindu Wijewardane*
>>> *Senior Software Engineer*
>>> *WSO2 Inc.*
>>>
>>> *http://wso2.com <http://wso2.com/>*
>>>
>>>
>>
>>
>> --
>> *Tharindu Wijewardane*
>> *Senior Software Engineer*
>> *WSO2 Inc.*
>>
>> *http://wso2.com <http://wso2.com/>*
>>
>>
>
> --
>
> *Kasun Gajasinghe*Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
> phone: +1 650-745-4499, 77 678 0813
>
>



-- 
*Tharindu Wijewardane*
*Senior Software Engineer*
*WSO2 Inc.*

*http://wso2.com <http://wso2.com/>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to