We tackle the problem of classical planning with qualitative state-trajectory constraints as those that can be expressed in PDDL3. These kinds of constraints allow a user to formally specify which temporal properties a plan has to conform with through a class of LTL formulae. We study a compilation-based approach that does not resort to automata for representing and dealing with such properties, as other approaches do, and generates a classical planning problem with conditional effects that is solvable iff the original PDDL3 problem is. Our compilation exploits a regression operator to revise the actions' preconditions and conditional effects in a way to (i) prohibit executions that irreversibly violate temporal constraints (ii) be sensitive to executions that traverse those necessary subgoals implied by the temporal specification. An experimental analysis shows that our approach performs better than other state-of-the-art approaches over the majority of the considered benchmark domains.