I find a website has some information about this problem and how it is done.
Here is the part of that page.
http://www.umass.edu/bmatwt/publications/articles/insulating_on_the_outside.html
"******************
Installation
Adding a layer of rigid foam to the walls of any building is somewhat labor intensive. When properly constructed, it provides a tight, dry, warm, and durable structure. Re-siding an existing home presents an opportunity to upgrade the home’s energy performance. But adding foam requires fussy detailing for trim and flashing. Windows, doors and trim must be built out and the flashing sealed to the foam sheathing.
Polyisocyanurate, molded expanded polystyrene (MEPS), and extruded expanded polystyrene (XEPS) are common sheathing choices. Foam sheathing is fastened to the structural sheathing or framing with broad-head nails, wide plastic washers, and/or adhesive caulk that is compatible with the foam. Check with the manufacturer before using any adhesive because solvents found in some adhesives eat foam. The layer of foam sheathing should be continuous and tight. Tape all the joints with a high quality construction tape, not duct tape. Good choices include 3M contractor’s tape, TU-TUF 4 Tape, and Insultape III. Installing a layer of foam will improve the R-value and improve air tightness when sealed.
Fastening of siding can be tricky. You can install vinyl siding directly over foam as long as your nails extend through it and attach firmly to a solid nail base. The Vinyl Siding Institute recommends 3/4-inch nail penetration, but the International Residential Code requires 1 1/2 inch nail penetration for vinyl siding. This means you must target the underlying studs even when foam overlays structural sheathing. Check your local code on this issue. When it comes to installing wood siding over foam be careful. I don’t think builders should install wood siding directly over plastic foam insulation.
Wood siding applied directly to foam has a history of failures. Nailing wood siding directly to foam doesn’t work because nails have to be extra long to reach through the siding and foam to a solid nail base. Long nails have a larger diameter that can split the siding unless every nail hole is predrilled. Plastic foam traps heat and moisture beneath the siding. Hot sun can overheat wood siding causing it to dry excessively and crack. Foam is less permeable to water vapor and the back of the siding stays wet as the face of the siding dries. As a result, the siding cups, cracks and sheds paint. Wood siding needs an air space between its backside and the face of foam sheathing.
""*********************