Hi Kavith,
I tried creating the pom.xml by referring to the Developer Studio plugin
projects in git hub. Following the same structure as in the github plugin
projects. I came up with this, pom1.xml.
However since my project is still not under those parent projects as in
github, I created another pom2.xml as follows, by removing the parent tag,
by adding p2 repositaries and tycho plugin. After fixing couple of errors,
I could successfully build the project using pom2.xml.
Can you please have a look at the two pom.xml files and tell me if they
seem to be OK or if there are any issues in them? If that is OK, I can move
to the next milestone of the project.
Furthermore I changed the Bundle-Version in the project manifest to
4.2.0.qualifier, because the plugin projects in git hub under Developer
studio seem to have that version. I hope that is OK.
Thanks for the article on osgi services. I will go through it.
Thanks and regards
Nathiesha
On Mon, Aug 1, 2016 at 8:22 AM, Kavith Lokuhewage <[email protected]> wrote:
> Hi Nathiesha,
>
> How is the progress on converting project to a maven project? Please let
> us know if you face any issues.
>
> BTW, [1] is a good article on osgi services with eclipse plugins. We can
> use them for further decoupling publishers and report generators.
>
> Thanks,
>
> [1] http://www.vogella.com/tutorials/OSGiServices/article.html
>
> On 29 Jul 2016 5:19 p.m., "Nathiesha Maddage" <[email protected]>
> wrote:
>
>> Hi Jasintha and Kavith,
>>
>> Here is the project plan for the upcoming 3/4 weeks.
>>
>> *July 30th-1st Aug*
>>
>>
>> - Add and configure pom.xml
>> - Use Maven tycho plugin
>> - Build project using Maven
>>
>>
>>
>> *2nd Aug-6th Aug*
>>
>>
>> - Write a REST web service to publish errors, deploy in tomcat and
>> testing.
>> - Add options for the current plugin project to use above web service
>> - Add current project classes and methods to be comply with above
>> changes
>>
>>
>> *7th Aug-11th Aug*
>>
>>
>> - Define an extension point of the plugin
>> - Add methods to get the registered plugins and their Project keys,
>> to maintain a map
>> - Add methods to group errors under their required plugins
>> - Change the publisher methods to create multiple issues in Jira
>>
>>
>> *12th Aug -15th Aug*
>>
>>
>> - Improve ErrorPublisher interfaces
>> - Write OSGI services for ErrorPublisher interfaces
>>
>>
>>
>> *16th Aug – 17th Aug*
>>
>>
>> - Create Feature Project using the plugin
>>
>>
>> * 18th Aug – 20th Aug*
>>
>>
>> - Refine the code
>> - Fix bugs
>> - Testing
>>
>>
>> *21st Aug – 22nd Aug*
>>
>>
>> - Documentation
>>
>>
>> Thanks and regards
>>
>> Nathiesha
>>
>>
>> On Fri, Jul 29, 2016 at 9:48 AM, Nathiesha Maddage <
>> [email protected]> wrote:
>>
>>> Hi all,
>>>
>>> Here are the minutes of the meeting I had yesterday (28/07/16) with
>>> Jasintha and Kavith.
>>>
>>> During the meeting the current project progress was discussed and
>>> suggestions were made to improve and finalize the development of the
>>> project. Listed below are the key points discussed during the meeting.
>>>
>>> 1. Instructions were given on how to add pom.xml, to change its
>>> fields to match with the project , to use Maven tycho plugin and to build
>>> the project using maven.
>>>
>>> 2. Suggestions were made on creating and improving interfaces
>>> like ErrorPublisher and ReportGenerator, and how to call the publish method
>>> of all the registered publishers using an iterator in the main controller
>>> class.
>>>
>>> 3. We planned to add another option for the user, where he does
>>> not have any gmail and jira credentials, but a remote server would take
>>> care of publishing the error using a common general account. For that I was
>>> asked to write a REST web service that would handle this procedure, and to
>>> deploy it in tomcat for testing. Possibility of using micro services for
>>> this was also discussed.
>>>
>>> 4. We planned to add multiple project keys for the jira create
>>> issue option where required, and to assign the project key based on the
>>> plugin that is responsible for the error. For that purpose, it was
>>> suggested to create an extension point of the project, so other plugins can
>>> extend it and define their own project key. Using this all the plugins that
>>> have extended the error reporter plugin and their respective project keys
>>> can be fetched, and a map can be maintained, to be used during the error
>>> reporting process.
>>>
>>> 5. To expose the Publisher classes, OSGI services will be
>>> introduced to the project.
>>>
>>> 6. It was suggested to create a feature by adding this plugin.
>>>
>>>
>>> Furthermore instructions were given on the documentation required for
>>> the project, and time frame for documentation was suggested. And I was
>>> asked to send a project plan for the upcoming 3 weeks.
>>>
>>>
>>> Thanks and regards
>>>
>>> Nathiesha
>>>
>>>
>>> On Tue, Jul 26, 2016 at 7:39 AM, Nathiesha Maddage <
>>> [email protected]> wrote:
>>>
>>>> Hi Kavith,
>>>>
>>>> I accepted the invitation.
>>>>
>>>> Thanks and regards
>>>> Nathiesha
>>>>
>>>> On Mon, Jul 25, 2016 at 8:42 PM, Kavith Lokuhewage <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Nathiesha,
>>>>>
>>>>> I have sent the invitation for the meeting at 2pm-3pm on 28/07/2016
>>>>> [1].
>>>>>
>>>>> Thanks,
>>>>>
>>>>> [1] https://goo.gl/PLEWQd
>>>>>
>>>>>
>>>>> *Kavith Lokuhewage*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc. - http://wso2.com
>>>>> lean . enterprise . middleware
>>>>> Mobile - +94779145123
>>>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>>>> Twitter <https://twitter.com/KavithThiranga>
>>>>>
>>>>> On Mon, Jul 25, 2016 at 8:13 PM, Nathiesha Maddage <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Kavith,
>>>>>>
>>>>>> How about Thursday evening, for the meeting? I am free after 1 pm.
>>>>>>
>>>>>> Thank you for the examples. I was going to refactor the code by
>>>>>> introducing the interfaces as you suggested during the mid evaluation.
>>>>>> But
>>>>>> I was not sure how to do that. I will try to change the code as given in
>>>>>> the examples before the next meeting.
>>>>>>
>>>>>> I think it is good to start converting the project to a maven project
>>>>>> as only a few weeks remaining to finalize the project. We can discuss
>>>>>> about
>>>>>> that during the meeting.
>>>>>>
>>>>>> Thanks and regards
>>>>>>
>>>>>> Nathiesha
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 3:10 PM, Kavith Lokuhewage <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Nathiesha,
>>>>>>>
>>>>>>> I noticed that there are some more pending tasks to restructure the
>>>>>>> code base as per the discussion we had during last code review. Just
>>>>>>> putting them down here again, so that you are able to go through again
>>>>>>> and
>>>>>>> complete any missing parts.
>>>>>>>
>>>>>>> *Introduce interfaces for the each sub component to decouple main
>>>>>>> controller logic from implementation specific things*
>>>>>>>
>>>>>>> For example, right now, the controller class (ErrorReporter) is
>>>>>>> hardly coupled with EmailSender and RemoteJiraConnector. We can think
>>>>>>> latter two as error report publishers and introduce an interface called
>>>>>>> ErrorPublisher as below.
>>>>>>>
>>>>>>> public interface ErrorPublisher{
>>>>>>> void publish(ReportGenerator reportGen) throws IOException;
>>>>>>> }
>>>>>>>
>>>>>>> And then EmailSender and RemoreJiraConnector classes can be
>>>>>>> refactored like below.
>>>>>>>
>>>>>>> public class EmailPublisher implements ErrorPublisher{
>>>>>>>
>>>>>>> void init () throws IOException{
>>>>>>> //init : read preferences for SMTP connection params
>>>>>>> }
>>>>>>>
>>>>>>> // implement publish method
>>>>>>> void publish(ReportGenerator reportGen) throws IOException{
>>>>>>> init();
>>>>>>> //send mail
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> public class JiraPublisher implements ErrorPublisher{
>>>>>>>
>>>>>>> void init () throws IOException{
>>>>>>> //init : read preferences for JIRA resp API connection
>>>>>>> params
>>>>>>> }
>>>>>>>
>>>>>>> // implement publish method
>>>>>>> void publish(ReportGenerator reportGen) throws IOException{
>>>>>>> init();
>>>>>>> //post to JIRA api and create issue
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> Finally refactor ErrorReporter class to use only ErrorPublisher
>>>>>>> interface. Further more, introduce methods to bind/unbind error
>>>>>>> publishers.
>>>>>>>
>>>>>>> public class ErrorReporter {
>>>>>>> Map<String, ErrorPublisher> registeredPublishers;
>>>>>>>
>>>>>>> public void addPublisher (String id, ErrorPublisher publisher){
>>>>>>> registeredPublishers.put(id,publisher);
>>>>>>> }
>>>>>>>
>>>>>>> public void reportError(){
>>>>>>> //iterate over all publishers
>>>>>>> // and call publish() method
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> (We can further ErrorReporter class by using OSGI services to let
>>>>>>> other devstudio plugins to contribute publishers as needed - we can do
>>>>>>> that
>>>>>>> later as time permits)
>>>>>>>
>>>>>>> For another example, currently you have used a class
>>>>>>> called ReportGenerator to generate the report in plain text and directly
>>>>>>> used that generator inside main controller. Instead, you can introduce
>>>>>>> an
>>>>>>> interface called ReportGenerator and create a class called
>>>>>>> TextReportGenerator and move the code there - and decouple main
>>>>>>> controller
>>>>>>> and let other people add report generators later (say an HTML report
>>>>>>> generator) as needed. It can be done in same manner as above example I
>>>>>>> have
>>>>>>> provided .
>>>>>>>
>>>>>>> Once you do above restructuring, we can further improve the code to
>>>>>>> use OSGI services to decouple these components even further.
>>>>>>>
>>>>>>> Finally, I think it is time for us to convert the project to a maven
>>>>>>> project and use tycho maven plugins for building it. I can assist you
>>>>>>> with
>>>>>>> this task - let's discuss this furthermore during the call. The main
>>>>>>> requirement here is to make this project directly mergable to developer
>>>>>>> studio repository. Since we are now reaching to the final weeks of GSOC
>>>>>>> coding period, I think we should concentrate a little more on this task.
>>>>>>>
>>>>>>> Please a suggest a time for the meeting so we are able to discuss
>>>>>>> these in-detail.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> *Kavith Lokuhewage*
>>>>>>> Senior Software Engineer
>>>>>>> WSO2 Inc. - http://wso2.com
>>>>>>> lean . enterprise . middleware
>>>>>>> Mobile - +94779145123
>>>>>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>>>>>> Twitter <https://twitter.com/KavithThiranga>
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 2:11 PM, Kavith Lokuhewage <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Nathiesha,
>>>>>>>>
>>>>>>>> There were some changes done to preference API since Eclipse Mars.
>>>>>>>> I suspect that the root cause for the issue should be it. I will go
>>>>>>>> through
>>>>>>>> the changes we did in Developer Studio to fix issues with new pref API
>>>>>>>> and
>>>>>>>> confirm you whether it is the root cause or not.
>>>>>>>>
>>>>>>>> Meanwhile, please suggest a time for another meeting this week -
>>>>>>>> probably on Thursday or Friday. We will go through the complete
>>>>>>>> implementation to verify that everything is in order.
>>>>>>>> I went through the code and have some comments too. I will put them
>>>>>>>> in github it self.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> *Kavith Lokuhewage*
>>>>>>>> Senior Software Engineer
>>>>>>>> WSO2 Inc. - http://wso2.com
>>>>>>>> lean . enterprise . middleware
>>>>>>>> Mobile - +94779145123
>>>>>>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>>>>>>> Twitter <https://twitter.com/KavithThiranga>
>>>>>>>>
>>>>>>>> On Wed, Jul 20, 2016 at 10:20 AM, Nathiesha Maddage <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> I started unit testing with InfoCollector and Startup Classes, and
>>>>>>>>> created a few unit tests using JUnit.
>>>>>>>>>
>>>>>>>>> Regarding the progress of the project, I am currently working on
>>>>>>>>> the ReportArchive module. The ReportArchive module currently displays
>>>>>>>>> all
>>>>>>>>> the sent error reports to the user in a window, and I am working on
>>>>>>>>> adding
>>>>>>>>> a context menu option for each error report to inquire the current
>>>>>>>>> status
>>>>>>>>> of the issue.
>>>>>>>>>
>>>>>>>>> Regarding the Preference page, I tried creating a Input Dialog,
>>>>>>>>> that would open up for the very first time the plugin reports an
>>>>>>>>> error to
>>>>>>>>> the user. This dialog would ask the user to fill values to compulsory
>>>>>>>>> fields like Jira Username and Password, and it would store these
>>>>>>>>> values in
>>>>>>>>> the preference page as well, for future use.
>>>>>>>>>
>>>>>>>>> I tried to save the user entered values in Input dialog, to the
>>>>>>>>> preference page
>>>>>>>>> using Activator.getDefault().getPreferenceStore().setValue() method.
>>>>>>>>> This
>>>>>>>>> method would set the user entered values in respective fields of the
>>>>>>>>> preference page, but that is just temporary. These values disappear
>>>>>>>>> from
>>>>>>>>> the preference page the next time I run it. Only the default set
>>>>>>>>> values by
>>>>>>>>> the code and the values that I enter in the preference page there
>>>>>>>>> itself
>>>>>>>>> would retain permanently. I tried to fix this for a couple of days and
>>>>>>>>> tried almost every solution I could find in the internet regarding
>>>>>>>>> this.
>>>>>>>>>
>>>>>>>>> Have you encountered a situation like this where you have to set
>>>>>>>>> the values in preference page through code? Any idea whether this is
>>>>>>>>> possible and if so how to do it would be of big help!
>>>>>>>>>
>>>>>>>>> Best regards
>>>>>>>>>
>>>>>>>>> Nathiesha
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 7, 2016 at 6:31 AM, Nathiesha Maddage <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> Regarding the current status of the project, I am working on the
>>>>>>>>>> development of the report Archive module, where the user can view the
>>>>>>>>>> previously sent error reports and also the current status of those
>>>>>>>>>> issues.
>>>>>>>>>> Meanwhile I thought to look into the testing part of the project as
>>>>>>>>>> well.
>>>>>>>>>> Is their any special testing framework used in Developer Studio
>>>>>>>>>> testing,
>>>>>>>>>> that I need to adopt? I though to use JUnit. Is it OK?
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Nathiesha
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 28, 2016 at 9:34 AM, Nathiesha Maddage <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> I downloaded and tried running the Data Analytics Server .
>>>>>>>>>>> Currently I am going through the DAS documentation and the REST
>>>>>>>>>>> API. Is it
>>>>>>>>>>> possible to post data using the REST API? As I noticed, it only
>>>>>>>>>>> allows to
>>>>>>>>>>> retrieve data from the DAS.
>>>>>>>>>>>
>>>>>>>>>>> Thanks and regards
>>>>>>>>>>>
>>>>>>>>>>> Nathiesha
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more
contributor license agreements. See the NOTICE file ~ distributed with this
work for additional information ~ regarding copyright ownership. The ASF
licenses this file ~ to you under the Apache License, Version 2.0 (the ~
"License"); you may not use this file except in compliance ~ with the License.
You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~ Unless required by applicable law or agreed to in writing, ~ software
distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the
License for the ~ specific language governing permissions and limitations
~ under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>wso2-developerstudio-kernel-plugins</artifactId>
<groupId>org.wso2.developerstudio</groupId>
<version>4.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.developerstudio.eclipse.errorreporter</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Developer Studio Error Reporting Tool</name>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-central</id>
<name>Maven central repository</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2-nexus</id>
<name>WSO2 internal Repository</name>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>lib</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more
contributor license agreements. See the NOTICE file ~ distributed with this
work for additional information ~ regarding copyright ownership. The ASF
licenses this file ~ to you under the Apache License, Version 2.0 (the ~
"License"); you may not use this file except in compliance ~ with the License.
You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~ Unless required by applicable law or agreed to in writing, ~ software
distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the
License for the ~ specific language governing permissions and limitations
~ under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.developerstudio.eclipse.errorreporter</artifactId>
<groupId>org.wso2.developerstudio</groupId>
<version>4.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>Developer Studio Error Reporting Tool</name>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-central</id>
<name>Maven central repository</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2-nexus</id>
<name>WSO2 internal Repository</name>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
</repository>
<repository>
<id>Eclipse-p2-repo</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/mars</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>wso2-maven2-repository</id>
<url>http://dist.wso2.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.24.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev