Tuesday, August 16, 2011
Wednesday, July 27, 2011
Maven POM
- all POM inherits from Super POM
- if the configuration details are not specified in your POM, Maven will use their defaults(from Super POM)
- to display the final POM (Super POM + your own POM) generated, use command:
mvn help:effective-pom
- hot to skip tests: http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-tests.html
Source: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
Monday, July 25, 2011
Basic UNIX commands
- man - manual/help
- pwd - print working/current directory
- ls - list files
- ls -l - lists files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified
- cd - change directory
- mkdir [dir] - creates dir
- rmdir [dir] - removes dir
- more [options] file(s) - Display contents of files
- less [options] file(s) - Display contents of files
Useful commands while viewing a file with 'more' or 'less':- <spacebar> - scroll forward one page
- ^b (control-b) - scroll backward one page
- /<text> - search for string
- n - find next occurence of string
- N - find previous occurence of string (search for string in opposite direction)*
- g - go to the beginning of the file*
- G - go to the end of the file*
- v - edit the current file with 'vi'*
- :n - go to the next file*
- :p - go to the previous file*
- q - quit
*works in 'less', not 'more' - grep [options] <pattern> [files] - search inside files for the given pattern
Useful options:- -i - ignore case
- -r or -R - search files in directories/subdirectories recursively
- -v - nvert match: select non-matching lines
- tail [options] [filenames] - show tail/end of file
- tail -f temp.log - follow/monitor the file, display the last 10 lines of temp.log and append new lines to the display as new lines are added to temp.log
- vi filename - edit the file
Modes:- command mode - letters of the keyboard will be interpreted as commands
- insert mode - letters of the keyboard will type or edit text
- x - deletes the character the cursor is under
- dd - deletes the line the cursor is on
- a - append after the cursor
- i - insert before the cursor
- ESC - non edit mode
- :wq - saves the current changes and exits vi
- :w - saves the current changes but does not exit vi
- :q - exits vi without saving any change
References:
http://claymore.rfmh.org/public/computer_resources/unix_commands.html
http://mally.stanford.edu/~sr/computing/basic-unix.html
http://cmgm.stanford.edu/classes/unix/vi.html
http://en.wikipedia.org
http://www.ccsf.edu/Pub/Fac/vi.html
Friday, July 22, 2011
Installing your own jar into Local Repository
- Update your maven setting to point the localRepository to where you want to install the jar
- Go to <MAVEN_HOME>\conf directory
- Open settings.xml and change <localRepositorygt; tag to the path where you want to install the jar file
- In command prompt, type:
mvn install:install-file -Dfile=your-artifact-1.0.jar \ [-DpomFile=your-pom.xml] \ [-Dsources=src.jar] \ [-Djavadoc=apidocs.jar] \ [-DgroupId=org.some.group] \ [-DartifactId=your-artifact] \ [-Dversion=1.0] \ [-Dpackaging=jar] \ [-Dclassifier=sources] \ [-DgeneratePom=true] \ [-DcreateChecksum=true] Where: <path-to-file> the path to the file to load <group-id> the group that the file should be registered under <artifact-id> the artifact name for the file <version> the version of the file <packaging> the packaging of the file e.g. jar
Sample:
mvn install:install-file -Dfile=C:\bel\docs\lib\jxl-2.6.3.jar -DgroupId=jexcelapi -DartifactId=jxl -Dversion=2.6.3 -Dpackaging=jar -DgeneratePom -DcreateChecksum=true - In your repository, you will find the new jar installed
- To use the jar, add it in your pom.xml like:
<dependency> <groupId>jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6.3</version> </dependency>
Monday, April 25, 2011
Maven Setup
- Install Maven
- Update {MAVEN_HOME}\conf\settings.xml
Update the following:- localRepository
- proxies
- profiles
- activeProfiles
Sunday, March 6, 2011
Deployment
- Create the package for full release
- Check out the Project in Eclipse
- Open SVN Repositories. Click Window->Open Perspective->SVN Repository Browser
- Assuming that you already have Repository Location set up, find the project in the trunk or branches
- Right click project then click Show History to ensure that it has the latest change/fix needed
- Tag or make a branch out of the project. Right click project then click New->Tag or Branch
- Right click newly created tag/branch then click Show History to ensure that the it has the latest change/fix needed
- Check out the newly created tag or branch. Right click project the click Check Out
- Build the package
- In the console, go to emea-pom of the checked out project
- Type
mvn clean package –DemeaVersion=${currentversion}
- After a successful build, go to the emea-release project and copy the whole target folder in a different directory.
- Check out the Project in Eclipse
- Generate the config files/folders of the package
- Create a config folder inside the target folder or where the jar is located
- Create folders dev, sit, uat and prod inside config folder
- Open you FTP Client (e.g. FileZilla) and copy the config files to the newly created folders
- DEV
- SIT
- UAT
- PROD
- DEV
- Update the ini file with the changes from project and change the VERSION property
- Create a config folder inside the target folder or where the jar is located
- Deploy DEV using the exploded jar
- In FileZilla, upload/add target/classes/versions to /ams/domains/ACCTSVCS102/versions
- In FileZilla, copy target/config/dev to/ams/domains/ACCTSVCS102/versions/config
- On DEV WEBLOGIC, stop and delete previously deployed ear
- Open Putty and login to DEV (ehdeapp10v.uk.jpmorgan.com)
- Point latest to latest deployed version
- Go to /ams/domains/ACCTSVCS102/versions/biz-rules
- Type rm latest
- Type ln -s {newversionFolder} latest
- Do step 1-3 to config & emea folders as well
- Go to /ams/domains/ACCTSVCS102/versions/biz-rules
- On DEV WEBLOGIC, deploy new ear and start
- Delete temporary files
- Go to /ams/domains/ACCTSVCS102/scripts and type stop_all.sh
- Go to /ams/domains/ACCTSVCS102/servers/admACCTSVCS
- Delete tmp folder. Type rm -rf {folderName}
- Go to /ams/domains/ACCTSVCS102/servers/mngACCTSVCS
- Delete tmp & stage folder
- Go to /ams/domains/ACCTSVCS102/scripts and type start_all.sh
- Go to /ams/domains/ACCTSVCS102/scripts and type stop_all.sh
- Check server: DEV
- In FileZilla, upload/add target/classes/versions to /ams/domains/ACCTSVCS102/versions
- Copy package(jar) and config files to SIT (ehdeapp10v.uk.jpmorgan.com), /home/eis_dev/a_pfdv01/AMSNA
- Create JIRA
- Finish!
Labels:
Apache Maven,
Application Server,
Eclipse,
Operating System,
Technologies,
Tools,
Unix,
Weblogic
Thursday, January 20, 2011
Common DB2 SQLCODE
SQLCODE | Description |
---|---|
-301 | THE VALUE OF INPUT HOST VARIABLE OR PARAMETER NUMBER position-number CANNOT BE USED AS SPECIFIED BECAUSE OF ITS DATA TYPE |
-302 | THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE |
-440 | THE NUMBER OF PARAMETERS IN THE PARAMETER LIST DOES NOT MATCH THE NUMBER OF PARAMETERS EXPECTED FOR STORED PROCEDURE name, AUTHID authid, LUNAME luname. number PARAMETERS WERE EXPECTED. |
-551 | auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON OBJECT object-name |
Complete list: http://www.caliberdt.com/tips/sqlcode.htm
Subscribe to:
Posts (Atom)