It is possible to generate a classpath file during a build, for instance using the maven-dependency-plugin to create a file named classpath:
mvn dependency:build-classpath -Dmdep.outputFile=classpath
How can I then use the file when invoking java from the command line?