The classical deformation theory of Lie algebras involves different kinds of Massey
products of cohomology classes. Even the condition of extendibility of an infinitesimal
deformation to a formal one-parameter deformation of a Lie algebra involves Massey powers
of two dimensional cohomology classes which are not powers in the usual definition of
Massey products in the cohomology of a differential graded Lie algebra. In the case of
deformations with other local bases, one deals with other, more specific Massey products.
In the present work a construction of generalized Massey products is given, depending on an
arbitrary graded commutative, associative algebra. In terms of these products, the above
condition of extendibility is generalized to deformations with arbitrary local bases.
Dually, a construction of generalized Massey products on the cohomology of a differential
graded commutative associative algebra depends on a nilpotent graded Lie algebra. For
example, the classical Massey products correspond to the Lie algebra of strictly upper
triangular matrices, while the matric Massey products correspond to the Lie algebra of
block strictly upper triangular matrices.