I am using exec-maven-plugin
to execute my java app and run debug from my IDE (IntelliJ) with the following setup:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>exec_1</id>
<phase>deploy</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.myapp.app</mainClass>
</configuration>
</plugin>
And it works very well. Then, I change my setup to execute a realistic java
command line which would run the same app:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>exec_1</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-cp</argument>
<argument>
"dir1";"dir2;etc..."
</argument>
<argument>com.myapp.app</argument>
</arguments>
</configuration>
</plugin>
And it works to execute the application, but it does not attach the Debugger to the IDE. So, what additional argument I could add to make it catch the debug interruptions?