Had the following structure:
project/ tests/ pom.xml integration-tests/ pom.xml src test java Potato.java ...
and I wanted to run the Potato class using maven exec. The following command did the trick:
mvn -Dexec.mainClass="my.pkg.Potato" -Dexec.classpathScope=test exec:java -pl tests/integration-tests