2011/11/20

Book Review: Apache Maven 3 Cookbook

I have decided to review new book about Maven from Packt Publishing: Apache Maven 3 Cookbook by Srirangan promising on its cover "Quick anwers to common problems".

The book is divided to nine chapters:
  1. basics
    Maven installation and environment settings. Generating, compiling and testing simple project. POM structure, build lifecycle and profiles.
  2. software engineering techniques
    Modularization, dependency management, static code analysis, JUnit, Selenium.
  3. agile team collaboration
    Nexus, Hudson, version control, offline mode.
  4. reporting and documentation
    Mvn site, javadocs, test and code quality reports, dahsboard.
  5. Java development
    Building and running web application (jetty), JEE, Spring, Hibernate, Seam.
  6. Google development
    Android, GWT, App Engine.
  7. Scala, Groovy and Flex
  8. IDE integration
    Eclipse, NetBeans, Intellij IDEA
  9. extending Maven
    plugin development basics
The book is certainly not material for beginners. Some terms are used without former definition or even explaining. Experienced Maven users will already know or will be able to find the missing pieces but beginners must be terribly confused. I think providing at least a description of Maven's standard directory layout for project or repository would be beneficial.

It is not so much about Maven as I expected, and says nothing about what is new in Maven 3. It should be exhaustive at least in the purely Maven parts, but even there is not enough information to make me happy. I would expect a description of template languages in the part dedicated to site plugin.

If you like puzzles and do not mind to use internet to search for missing pieces or you just cannot recall some setting covered in the book, you will like the book. It can also be used as a good starting point to show what tools, frameworks or languages can be used from/with Maven - do you like Maven and wanted to try GWT or Scala ? The book helps to lower entrance barrier by providing examples how to get working "playground" project in no time.

Would I buy it ? No. My bookcase has limited capacity and since the necessity to use internet to fill the gaps or correct bugs (although not many) in the book, I will be better with the online sources only.

2011/11/06

Shortcuts in Eclipse / Intellij Idea

I decided to publish this long ago started list of keyboard shortcuts for Eclipse and Intellij Idea to make the transition from one IDE to the other one easier for my colleague. I hope it will be useful for other developers in similar situation too. Where you see only one shortcut in the list, it means it is identical in both IDEs.

List Shortcuts: Ctrl+Shift+L / ? (Help - Default Keymap Reference)
Search Actions: ? / Ctrl+Shift+A

Editor


Select All: Ctrl+A
Reformat: Ctrl+Shift+F / Ctrl+Alt+L
Open File By Name: Ctrl+Shift+R / Ctrl+Shift+N
Open Class By Name: Ctrl+Shift+T / Ctrl+N
Go to Matching Bracket:  Ctrl+Shift+P / Ctrl+{, Ctrl+}
Paste from Clipboard Stack: ? / Ctrl+Shift+V
Vertical Blocks: ? / Alt+Shift+Insert

Code Navigation and Manipulation

Navigate Forward in History: Alt+right arrow / Ctrl+Alt+right arrow
Navigate Backward in History: Alt+left arrow / Ctrl+Alt+left arrow

Go to Line: Ctrl+L / Ctrl+G

Delete Line: Ctrl+D / Ctrl+Y

Open Documentation: "mouse over" / Ctrl+Q
Open Declaration: F3 / Ctrl+B
Open Hierarchy: F4 / Ctrl+H
Find Implementation: ? / Ctrl+Alt+ B

Find Usages: Ctrl+Alt+G / Alt+F7
Usages Pop-Up: ? / Ctrl-Alt-F7

Code Completion: Ctrl+Space
Optimize Imports: Ctrl+Shift+O / Ctrl+Alt+O
List of Methods to Override/Implement: ? / Ctrl+O
Generate...: Ctrl+Shift+G / Alt+Insert

Comment LineCtrl + /
Comment BlockCtrl + Shift + /

Code FoldCtrl+"numpad +"  / or Ctrl+"+" 
Code UnfoldCtrl+"numpad -"  /  Ctrl+"-" 

Move Code Up: Alt+Up / Ctrl+Shift+Up
Move Code Down: Alt+Down / Ctrl+Shift+Down 

Create Test: ? / Ctrl+Shift+T

Refactoring

Rename: Alt+Shift+R / Shift+F6
Extract Method: Alt+Shift+M / Ctrl+Alt+M
Introduce Variable: Ctrl+Shift+M / Ctrl+Alt+V

Search

In Current File: Ctrl+F
In All Files: Ctrl+H / Ctrl+Shift+F

Version Control

Commit Changes: Alt+C / Ctrl+K
Update: Alt+U / Ctrl+T
VCS Popup: ? / Alt+` (back qoute)

Windows

Maximize: Ctrl+M / Ctrl+Shift+F12

Debugging

Debug: F11 / Shif+F9
Step Into: F5 / F7
Selective/smart Step Into:  Ctrl+F5 / Shift+F7
Step Over: F6 / F8
Step Out: F7 / Shift+F8
Resume: F8 / F9

Evaluate Expression: Ctrl+Shift+I / Alt+F8

Jump To Caller: ? / Ctrl+Alt+F7
Show the Caller Hierarchy:  ? / Ctrl+Alt+H

I want to continually update this list depending on what IDE I use - if you have anything that should be added to the list or you know replacement for some question mark in it, let me know. Thanks to all who already contributed.