private boolean isWar ( String path ) { String currentDir = Paths . get ( "." ) . toAbsolutePath ( ) . normalize ( ) . toString ( ) ; String classesDirPath = Paths . get ( path ) . toAbsolutePath ( ) . normalize ( ) . toString ( ) ; return classesDirPath . startsWith ( currentDir ) ; }
the assumption is that the Runner is invoked in the WAR module s directory