Classpath in run configuration with maven multi-module project

Hello there,

I think this is a very simple question but I don't find the solution for my problem. I have a Multi Module Maven project with the following structure:

\ module1
\ module2
\ module2

One parent pom with several modules defined and each module has the one parent pom as their parent. IDEA parses this structure correctly and generates correct IDEA projects. Now I want to add a run configuration and can choose my Main class (simple java se project). And then I have to choose the module which serves my classpath definition and the problem starts. The parent pom has no direct dependencies, so the classpath is really small. I have an own module system which automatically loads loose modules from the jar files in the classpath so my core project doesn't have the dependencies to its modules and the modules don't nessecarily have dependencies to other modules.

What I need is something like "concatinate the classpaths of all modules", how can I reach this result? (Every JAR from every module which its dependencies has to be in my global classpath) In my shellscript I can add them automatically by searching the directories but I don't want to miss the IDEA debugging. Perhaps my maven structure is not good for such things?


1 comment
Comment actions Permalink

My current work-around is to create an IDEA project which depends on all submodules - not really cool but works for now.


Please sign in to leave a comment.