Posts

Showing posts from January, 2014

Quick Maven Archetypes and Project Setup

If we need to re-use the maven based project as base for future projects, then we can create an archetype which can generate the skeleton for the future project. It applies to both single-module and multi-module maven projects Steps: Go to project root directory mvn  archetype:create-from-project   - This generates a target folder with generated-resource directory , find archetype-metadata.xml for the details about the file inclusions and module setup Got to  target/generated-sources/archetype/  mvn install    - This installs the current archetype into maven repo [INFO] project created from Archetype in dir: kitchensink\target\generated-sources\archetype\target\test-classes\projects\basic\project\basic [INFO] No post-archetype-generation goals to invoke. [INFO] [INFO] ---  maven-install-plugin:2.5.1:install  (default-install) @ kitchensink-archetype ---  ---  maven-archetype-plugin:2.2:update-local-catalog  (default-update-local-catalog) @ kitchensink-archetype ---

MySql Enable Logs for Queries , Expert Way!

show variables like 'general_log%' +------------------+------------------------------------------------------------ | Variable_name    | Value +------------------+------------------------------------------------------------ | general_log      | OFF | general_log_file | C:\ProgramData\MySQL\MySQL Server 5.5\Data\pixomachine.log +------------------+------------------------------------------------------------  set GLOBAL general_log='ON'; C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld, Version: 5.5.25a (MySQL Community Server (GPL)). started with: TCP Port: 3306, Named Pipe: MySQL Time                 Id Command    Argument 130310  1:09:40    1 Query select * from users

Git 2 Minutes

Installation:   GIT BASH -  http://git-scm.com/downloads GUI's:    http://git-scm.com/downloads/guis Eclipse: E-git   http://www.eclipse.org/egit/ Clone Repository: git clone git_url  Clones the git repository in the local GIT Configuration: git config --list    Check the git configuration git config --global --edit   Edit the git config .gitignore Ignoring files during commit  Get the attached file and put in the GIT HOME Directory. .gitignore_global Git Changes git status    List the current changes Git Pull git pull    Get the contents of remote repository changes into local Git Add: git add  Adds the specified file for commit   git add -u  Adds all the files marked 'Untracked' to commit git add .  Add all the files tracked, untracked for commit Removing file from cache:   Not yet ready to commit some file just remove them from the commit cache     git rm --cached filename Branching: git checkout