Enterprise Java Development@TOPIC@
Working sets can be quite helpful organizing multi-modules
You can control their contents, order them, and hide them
Maven builds can be directly launched from within Eclipse
No significant difference from normal command line
Can create custom launchers for common targets and pin for easy recall
Unit tests can be directly executed within Eclipse without Maven
Maven is quite useful in setting up robust test environments but at a cost of repeated seconds of unnecessary work at times. Have your unit tests assume reasonable defaults and provide the ability to optionally override those values through surefire or launcher configurations. That way you can develop by compiling only changes classes within Eclipse and move forward in only a few seconds. Delegate the maven build at that point to batch regression testing.
Necessary evil in application development
Powerful capabilities should not be ignored
Set program breakpoints where problems have been identified
If runnable directly from Eclipse -- use debug option
If not runnable within Eclipse -- use remote debugging option
Remote debugging requires special system properties issued to JVM
surefire and failsafe can be setup to optionally pass system properties to JUnit JVM
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>${surefire.argLine}</argLine>
<testSourceDirectory>src/test/java</testSourceDirectory>
</configuration>
</plugin>
<profile> <!-- tells surefire to run JUnit tests with remote debug -->
<id>debugger</id>
<activation>
<property>
<name>debugger</name>
</property>
</activation>
<properties>
<surefire.argLine>-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE</surefire.argLine>
</properties>
</profile>