Hi there
The best building tool for Java I know so far seems to be maven,
but it still doesn't give so much flexibility as cmake at all!
Anyone knows a cmake-alike tool for java?
Hi there
The best building tool for Java I know so far seems to be maven,
but it still doesn't give so much flexibility as cmake at all!
Anyone knows a cmake-alike tool for java?
Ant and maven are too great build tools. With maven, if you want to do custom builds, you are likely going to have to write your own maven plugin which isn't that hard. There is loads of documentation online to create your own plugin. The cool thing about making a maven plugin is that it is easy to share in an organization or with a team of developers; do share these plugins, you generally need to be hosting your own maven repo.
Ant is really quite flexible as it has a really extensive set of tags for doing just about anything including building, running tests, moving files around, checking out code from a repo, and even executing commands on a remote server. In my opinion, ant is a little easier to work with when you have to make custom builds. The problem with ant is that it is more difficult to make into a sharable module that you can share and configure like you can with a maven plugin.
Ivy is another popular build tool however, I have no experience with it.
The best building tool for Java I know so far seems to be maven, but it still doesn't give so much flexibility as cmake at all!
That might be true, but I'd ask if you really need that "flexibility". Part of maven's biggest value is that it standardizes development. The way source/resources, dependency are managed, well defined life-cycles etc. etc.
It is because of this standardization that you can hook up build servers, IDEs, automated test tools and many more tools easily. Also importantly, new developers find it easier to get familiar with the code base because they know what structure to expect.
Those benefits would be lost if you have a "flexible" build, however, are you really going to gain anything from having such a "flexible" build? A LOT of people are using maven, and for almost all problem they already created a solution. If you strive to use those standardized solutions, you'll have much less trouble with building IMHO.
Should you have the rare situation in which you truly need to do something that can't be done in a standardized way, you can still hook scripts/ant tasks etc into maven and even write custom plugins. But I really doubt you'd ever need to do that.
Both Maven and Ant are 100% flexible, in the sense that you can develop your own extensions if existing built-in features or plugins don't do what you need.
If you are starting a new project from scratch I'd recommend Maven as being more powerful. The downside is that you need to organize your project directories in a Maven specific way for best results.
If you have an existing Java codebase then Ant would avoid the need to reorganise your project directories. You can use it by itself, or use it in conjunction with Ivy for better dependency management.
Both Maven and Ivy are cross-platform tools. If your platform can compile and run Java, then you can use either tool. Unless you do something silly with your build files, your builds should run on any platform.
CMake has no concept of dependencies (only on dependencies of sources to object files or shared libraries) but not on the artifact level (like jar's in Java) or RPM's etc. I would call this a module dependencies. CMake does not has a concept of transitive dependencies etc. CMake has no concept of defined structure of a project (Convention over configuration). CMake has no concept of a repository (like Maven has). CMake has no support of Unit/Integration tests integrated. No defined build life cycle. CMake has no concept of Release Management (which maven has) etc.
but it still doesn't give so much flexibility as cmake at all!
What exactly do you miss here in Maven?