Sunday, January 16, 2011

Getting started with Maven

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

Download and extract bin from http://maven.apache.org/download.html

Basics:
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

To install a package into your local repository:
1) Open <MAVEN_HOME>/conf/settings.xml
2) Set the local repository
<localRepository>S:/bel/repo</localRepository>
3) Set profile
4) Set what profile to activate
5) Set proxy (optional?)
6) Run mvn install (if variables are needed, add -D{varname}={varValue}). To skip test add <skipTests>true</skipTests> on pom.xml (inside properties tag). To set a default/permanent variable, set it in MAVEN_OPTS environment variable

How to set MAVEN_OPTS
-> set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=128M
-> add in mvn.bat
1) edit <MAVEN_HOME>/bin/mvn.bat
2) add SET MAVEN_OPTS=-Dmaven.test.skip=true

Note:
- dependencies -> mvn install copies all libraries first from WEB-INF/lib to the snapshot lib before downloading all dependencies declared in pom into the snapshot lib. so make sure to always clean up WEB-INF/lib first before executing mvn install to remove any conflicting jars

Source: http://maven.apache.org/

Getting started with Weblogic

Download: http://www.oracle.com/technetwork/middleware/weblogic/overview/index.html

Wednesday, January 5, 2011

Object Oriented Javascript

Object Constructor
function Cat(name) {
  this.name = name;
  this.talk = function() {
     alert( this.name + " say meeow!" )
  }
}

Creating Objects
  • using constructor of defined object
    myCat = new Cat("Kuting");
    
  • using new Object()
    person = new Object()
    person.name = "Bel"
    person.run = function() {
      this.state = "running"
      alert( this.name + " is running!" )
    }
  • using literal notation
    person = {
       name : "Bel",
       siblings : ["Ana", "Marie"],
       run : function(){this.state = "running"; alert( this.name + " is running!" )}
    };
Prototyping - attaching a method to an object
Cat.prototype.changeName = function(name) {
   this.name = name;
}

References:
http://www.javascriptkit.com/javatutors/oopjs.shtml

Sunday, January 2, 2011

Javascipt Basics

javascript

Getting started with Ext JS

Ext JS is a client-side, JavaScript framework for building web applications.
  1. Download most current Ext JS release
    - http://www.sencha.com/products/js/download.php
  2. Set the URL of s.gif
    Ext.BLANK_IMAGE_URL = '/images/ext/resources/images/default/s.gif';

Reference:
http://www.sencha.com/learn/Learn_About_the_Ext_JavaScript_Library

Monday, December 6, 2010

Installing Eclipse Plugins

  • Copy and Paste
    1. extract package
    2. copy the contents of the "features" into the "features" folder of eclipse and copy the contents of the "plugins" into the "plugins" folder of eclipse

  • Using Update Manager (existing Eclipse software site)
    1. click Help->Install New Software...
    2. select the update site of you eclipse' version from the dropdown folder
    3. find the feature you want from the list and install

  • Using Update Manager (new software site)
    1. click Help->Install New Software... and click on Available Software tab
    2. add the download site
    3. select the update/download site from the dropdown
    4. find the feature you want from the list and install
    Ex.
    Drools - http://download.jboss.org/drools/release/5.5.0.Final/org.drools.updatesite/

    Some update sites are dependent on the version of eclipse.
    Ex. http://www.jboss.org/tools/download.html

  • Using Extension - to separate your plugins from other users
    1. create an extension folder with eclipse folder, e.g. C:\extension\eclipse
    2. copy the features and plugins folder of the plugin inside the eclipse folder (for additional plugins, do the Copy and Paste method above)
    3. open Update Manager and Add Site
    4. in Add Site window, click Local and specify the location of the extension folder, e.g. C:\extension
    5. browse and check the plugin you want to install in the Available Software list and click Install

  • Using Link
    1. http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/