We have a large Java 8 Spring Hibernate Maven project that is getting bigger.
Problems:
- Build time is 10-12 minutes at best; 3 minutes without tests
- We already have a command line switch to skip rarely modified modules, which is a symptom of the build process, reaching practical limits.
- Eclipse is trying to manage the project (although IntelliJ is fine)
- It worsens more and more as the project grows, and as more and more scripts from the test team become integration tests in the code base.
How we work now
- The project is configured in approximately 20 Maven modules, for example:
Parent
| --- Tier1
| --- Tier2
| --- WebTier
| ---- ModuleA
| ---- ModuleB
| ---- ModuleC
| ---- ...
| ---- Entities
| ---- Shared
| ---- Batch
| ---- IntegrationTests
- Application built as one WAR
- Developers deploy one layer (usually
WebTier ) as an artifact from Eclipse or IntelliJ to their local Tomcat - Although the project seems well-separated in modules, there are many undesirable connection points between them. Especially in
Shared , where modules requiring cross-module access host their services - All integration tests are in a dedicated module (I donβt know why)
Ideas to make it better
- Add a
MessageBroker module to provide a free connection, if necessary. Perhaps JMS or just a dumb component of memory for synchronous communication. - Get rid of the
Shared module - Make sure the modules have coarse entry points.
- Remove unwanted communication between siblings and, if possible, prefer a message broker.
- You can save
Entities . At least the main companies (Customer, CustomerFile, ...). But some objects obviously belong to the same module (information about the package will be in the Batch module)
Thus, anyone who makes changes to ModuleA will build and run tests in this module most of the time without fear of breaking the application.
Questions
- Does this sound like a good plan? Fortunately, I mean future evidence that has good chances to improve the situation and does not require excessive workload, given the situation.
- If we have 1 Eclipse / IJ project per level, let the IDE build an artifact and deploy it to Tomcat, or do we have 1 project per module and Nexus dependencies? Or maybe the last option is redundant?
- Any other suggestions?
Some indicators
- Windows 7, Java 8, Maven 3.0.3, TestNG.
- SSD or 7200 rpm HDD (limited exposure)
- RAM 6 GB
- A bunch of 1Gb (maven)
- CI with Jenkins
Thanks a bunch!
youri source share