A simple script (.sh, .bat) is already a possible solution
More advanced command-line tools have been available for a long time
make created in 1977 at Bells Labs by Stuart Feldman
Still very much used nowadays
Apache Ant created by James Duncan Davidson
Was at first a platform-independent build system for Tomcat because Sun’s build system for Servlet RI (From which Tomcat was derived) was specific to Solaris.
What really made Maven different from other builds systems in the first place?
REPOSITORIES !!!
Before Maven, it was really hard to find java libraries, and harder to ensure a coherent use of these libraries (I’m saying hard, not impossible…)
Nowadays, it’s still very hard to find some jars with a decent/coherent versioning (discretely winking in the general direction of Sun participants...), let alone to find their sources or javadocs
If you don’t embrace the standardization brought by Maven 2, you’ll soon feel limited by Maven 2
Additionally, standardization can be quite expensive! Measure the implied cost by testing on 2 subsequent projects (one to absorb the POC effect, and one for measure)
By default Maven 2 has its own folder structure normalization, unknown to IDEs (though this is not completely true anymore)
Last but not least: Maven 2 error reporting is SO BAAAAD!
They will allow you to overcome Maven 2’s drawbacks
Embrace the standardization brought by Maven 2, don’t fight it
Use POM Inheritance and <dependencyManagement> (with import scope) , <pluginManagement> to tame the transitive dependencies. (don’t mistake these for <dependencies> , <plugins>… )
If you provide a standard environment, try to make Maven plugins have a match in the IDE
If Maven 2 launches Checkstyle, provide the Checkstyle Eclipse plugin to your projects.
Launch your builds regularly and possibly in a neutral zone (not on the developer’s desktop!) in order to ensure “rule number one” is respected: Build must be reproducible.
Use the “dependency” and “versions” plugins to handle dependencies and diagnose dependencies mismatches or errors
0 comments
Post a comment