I began to try and re-implement the build system completely in Maven, which I discovered would essentially not be possible at this time. Maven's support for webstart generation is very simplistic, and the needs of this project surpass Maven's built in support already.
So, I created a new Maven pom that combines the best of both worlds: Maven artifact support with Ant's webstart generation.
The mercurial bundle for this is available here
. It is quite large due to the number of directory moves.
Here are the available goals for the Maven script Run these with "mvn [goalname]"
- Compiles the classes and output the slick, slick-util,slick-example, and the various tool jars, as well as their dependencies, to the dist directory.javadoc:javadoc
- Generates the javadoc to dist/javadoc/
Note that this is UNFINISHED, and NOT READY for the Slick main repo. Some things that need to be fixed/added before then are:
- The Maven/Ant webstart generation shouldn't make a keystore each time. I just got lazy and coded that since it was easier.
- Maven needs to output the zips to the dist directory instead of the target directory.
- Support for direct uploading to the server
- Currently Maven packages the former testdata directory into a JAR as part of the build. This jar is not what the test code expects to find, so to run the tests you have to unzip the jar.
- Ideally a Maven pom shouldn't create multiple artifacts (slick.jar, slick-util.jar).
The major changes introduced are:No more library storage in the repo.
Library dependencies are specified in the pom and downloaded when needed by Maven. To accomadate this, since Slick uses several unavailable 3rd party libraries, Ive created our own temporary Maven repository
. This library repository is intended to only be temporary however, because the other libraries should be uploaded to Maven Central as 3rd party artifacts.Ant is no longer the build system.
Ant is now only peripherally part of the build, as it is used for webstart generation only. This may change if Mavens webstart mojo plugin becomes more mature. Now the only requirement for building Slick should be Maven, as the antrun Maven plugin will download the needed ant runtime automatically when it is used.No more separate code directories.
Previously the code was separated into examples, tools, etc directories. With Maven this is bad practice. Maven will now differentiate the packages automatically, and only package up the specified packages into each jar. Now all the source of slick is in one main directory.
Furthurmore: If the community likes this change, I can move the rest of the projects over to Maven.
EDIT: Changed bundle download. The bundle was based off the wrong repo, and included other changes not related to this patch at all.