I am using maven-exec-plugin to generate java sources of Thrift. It invokes the external Thrift compiler and using -o to specify the output directory, \"target/generated-sou
Instead of the exec plugin, use the antrun plugin to first create the directory and then invoke the thrift compiler.
maven-antrun-plugin generate-sources generate-sources run
You may also want to take a look at the maven-thrift-plugin.