Tuesday, June 25, 2013

How to install Maven in Ubuntu

In a terminal(alt+ctrl+t)
type
apt-cache search maven
to get all the available Maven package.







To install maven type
sudo apt-get install maven
in terminal






Type
mvn -version
in your terminal to verify your installation.



You have successfully installed maven.






Install Eclipse,Java and setting variables in Ubuntu

To install Eclipse in Ubuntu first you have to download it from the Eclipse web site.
Here I am installing  Eclipse Juno (4.2)  Eclipse IDE for Java EE Developers Eclipse Juno (4.2)

You can download it from here.


After downloading the file you can you can open it with archive manger and and extract it where you want.

                             

After that you can start using eclipse.

How To Install JDK On Ubuntu

Open terminal by pressing alt+ctrl+t .
Type
apt-cache search openjdk
To search all the available Openjdk version.




Here I am going to install open JDK 7

Type 
sudo apt-get install openjdk-7-jdk
in terminal to install open JDK 7

To verify the installation type
java -version
in terminal



How to set JAVA_HOME for OpenJDK


Type
nano ~/.bashrc
in the terminal to open the .bashrc and edit it.At the end of the file add the following line
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/


                

 

and press ctrl+o and then press enter to save the file.


To verify the java home type
echo $JAVA_HOME

in the terminal







Friday, May 17, 2013

GSoC 2013 Proposal PDE templates of OSGi remote services



Short description: The current Plug-in Development Environment (PDE) provides tools to create, develop, test, debug, build and deploy Eclipse plug-ins etc.This project focuses on creating a new template related with OSGi remote services which is compatible with the current PDE.

The PDE provides several templates for developing plugins.This projects focuses on  creating a PDE template of OSGi remote services with specific distribution providers and specifications.And the related documentation to the project.

Detailed Information

This project will develop  the new template to the existing  plugins development  wizard and will support existing wizard. 


a71


Users will be able access the newly developed template through the wizard and the short description will be shown.


According to the specifications and the design of the OSGi remote service users will be able do the necessary changes.And the design will be similar to the existing GUI.




The ability to create a plug-in with a ready-to-run extension is appealing, particularly to novice Eclipse developers. Therefore,creating a template to be added to the  for Eclipse's more popular templates  during the plug-in project creation process will be a benefit to developers. 

Background
In the time leading up to the start of the GSoC programme I am going to improve my knowledge about Eclipse Communication Framework . And my major goal is to get familiar with the OSGi Remote Services and Plug-in Development Environment.And thoroughly study the source code for existing PDE template for creating a remote service.To improve my knowledge on above aspects I expect to read the documents regarding them and to have a discussion with the project mentors.  

Deliverables
Working template in PDE which is related to OSGi Remote service.


Schedule 

April 25 - May 2:
Familiarize with ECF
Study the documentation about PDE OSGi



May 3 - June 16
Try out existing plugging development templates
Research about PDE.
Research about OSGi
Get more familiar with ECF



June 17 - July 20
Discuss and design a OSGi remote service
Start coding to integrate designed service
Start working  on GUI
Testing



July 20-August 2
Mid term Evaluation



August 2 - September 5
Add required new classes and update existing classes which requires to add OSGi Remote service.
Further develop the GUI and integrate it with the code
Integrate all implemented parts eclipse single project.



September 5- September 16
Test if added new functionality and old functionality is working properly.
Do the required changes to fix the bugs.



September 16- September 21
Documentation



September 21 - September 23
Finish project and Submit Deliverable



Expectations

I hope to  discussion with my mentors about the idea which will help to reduce the ambiguity of the requirements.

I am going to put effort and do my best to understand but if I am unable to do so I would like to get help from the mentors clarify things that  I do not understand about PDE and OSGI.



Contact Information

Email: svijayindu@gmail.com

Phone number: +94718082232

Time-zone: GMT+5:30



I’m Suneth Vijayindu Walliwala Gamage. I am a third year  undergraduate in Department of Computer Science and Engineering in University of Moratuwa, Sri Lanka.Which has consecutively won GSOC’s most number of participant’s award since 2009 to 2012.I have much experience in java and developing various applications, basically I am doing programming with Java therefor I have a advance knowledge with programming in Java also I have experience with programming in  C,C++ and XML.I have implemented many projects in java including a one which spanned for four months.Also I was a project team member of the following  projects which were conducted by our department.

Patient Management System : for Base Hospital, Homagama [1]

Sheersha Yathra : Wheelchair for a Quadriplegic [2]

I am able to work 50 hours a week  for GSoC from June to September( 6 hours on weekdays and 10 hours on weekends).So I’m confident enough to take up this project as I have the required skill set for this project and I will deliver my best to make this project a success.`And I would like continue  forward the work for ECF even after GSoC finishes and to complete the work all the way to deployment.

http://www.uomcseprojects.blogspot.com/2012/06/patient-management-system-for-base.htm

http://uomcseprojects.blogspot.com/2012/08/sheersha-yathra-wheelchair-for_8.html









Thursday, March 1, 2012

HttpUnit

Introduction 
Testing programs is a boring thing.It takes lot of time and efforts to do that
but there are easier ways to do that by automated software one such great software is HttpUnit.
HttpUnit is an open source software testing framework used to perform testing of web sites without the need for a web browser.
HttpUnit is primarily designed for "black-box" testing of web sites.
HttpUnit is free software available from HttpUnitSite that implements several useful unit testing methods together with classes for connecting to HTTP servers, processing HTML, and maintaining stateful sessions.

HttpUnit supports :

  • HTML form submission
  • JavaScript
  • automatic page redirection and cookies.
  • Written in Java, HttpUnit allows Java test code to process returned pages as text, XML DOM, or containers of forms, tables and links
It is well suited to be used in combination with JUnit.It easily write tests that verify the proper behaviour of a web site.The use of HttpUnit allows for automated testing of web applications.

The center of HttpUnit is the WebConversation class, which takes the place of a browser talking to a single site.It is responsible for maintaining session context, which it does via cookies returned by the server.To use it, one must create a request and ask the WebConversation for a response.

Some Drawbacks to HTTPUnit:
  • Tests are tied to page structures.
  • If you change your page (say, reordering links or forms), you will break your tests.
  • Test assertions typically depend on the content of the page.
  • If content changes, tests may break.
  • Checking content is not completely sufficient for testing Grid portals.

Setting HttpUnit in Oracle JDeveloper

One way to test Web application is with HttpUnit framework that is based on Junit. One nice thing about JDeveloper is that because of the built-in support for JUnit you also get a nice HttpUnit testing environment.
Here are the steps to follow.

1. Download HttpUnit and extract it to your drive.

2. In JDeveloper take your Web project and go into project properties->libraries. Click the "Add JAR" button and add the files from the lib and jars directory.




3. Create a new JUnit test case class:



4. Run your test:



5. View the results:



6. If you have errors double click the row in the JUnit log window to jump to the actual test code that failed.