by 2 I mean the case when the main class and surrounding classes are not packed at all.
They are in file system as a bunch of files.
In this case we need to get from maven a list of used jars,
concatenate them into JAVA_CLASSPATH,
then add a reference on config to JAVA_CLASSPATH
and launch an application by command like
java $JAVA_OPTS –cp $ JAVA_CLASSPATH MainClass.