I just swapped in a JDM EJ25D into my '98 Impreza OBS (was a 2.2L), it works quite well. A few things I had to do...
-Used the harness from my EJ22, but there was a couple of plugs I will had to take off the EJ22 engine and put on the EJ25D. Including adding some length to the wires going to the IAC, as it's on the opposite side of the engine from the 2.2, as well as the coil pack, as it's on the side, not the center.
- Blocked all vacuum lines not needed for my car
- Took the two electrically operated vacuum valves from the EGR system off the EJ22, and hooked them up (electrically, not to any actual vacuum lines) to the new engine. This stopped two of the check engine lights from coming on for the EGR system, since the JDM ej25d doesn't have EGR. Alternatively, I've read you can ground out a pin on the ECU, to trick it into thinking there isn't supposed to be an EGR system. I still get P0400 EGR code once in awhile though, because the engine isn't seeing the rpm increase it's supposed to (when the EGR is supposed to be actuated)
- Exhaust needed to be modified, on my EJ22, the single ports came down, and back to the Y pipe, on the JDM ej25d, they go forward to the Y, then up and around the side. To do this, I just cut the heads off both systems, and got the new 2 port heads put on the old exhaust pipes.
- Flex plate is bigger on the 2.5, swapped the 2.2 one over. (auto transmission)
- Had to swap the A/C brakets and P/S pump brackets, to the 2.5. (I kept the A/c and P/S on the car, with hoses attached, and they wouldn't fit on the new engine with the new brackets)
Other than that, it was a straight swap. No ECU change, and just those few things I mentioned on the wiring harness, works good, hopefully lasts long! Been driving it for a month now with no issues (other than the p0400 egr engine code, which comes on about once a week)