Maven for other languages?

2019-01-11 22:46发布

问题:

I am relatively new to the world of Java and Maven, but I couldn't imagine starting a new Java project without using Maven.

The idea of providing a human-readable project model is something that I would imagine is universally desirable across many languages. This is especially true when your application relies upon numerous external libraries.

Are there any other project management or build tools for languages other than Java that are similar in nature to Maven; that is, that provide a mechanism for the project maintainer to specify dependencies and build order?

回答1:

Here's some I know of. As to whether they are the most appropriate tool for a given language, form your own opinion.

  • .Net: NMaven and dotnet-maven-plugin
  • AspectJ: aspectj-maven-plugin (still Java I know but worth mentioning)
  • c/c++: native-maven-plugin compile with compilers such as gcc, msvc, etc ...
  • Google Web Toolkit gwt-maven-plugin
  • PHP: Maven for PHP
  • Ruby: Ruby on Maven
  • Scala: maven-scala-plugin
  • Flex and Air: Flexmojos

Arbitrary "integrations" can be handled by using the exec-maven-plugin to invoke the relevant compiler and binding the execution to the compile phase.

There are also Maven-like products such as Byldan for .Net


Updated with Flex Mojos and dotnet-maven-plugin at Pascal's suggestion.



回答2:

Python setuptools works in a similar way to Maven in so far as specifying project dependencies. If the dependencies specified are available as eggs, tars or zip files then they can be automatically pulled in at installation or runtime.



回答3:

I know that there are a couple of Maven plug ins for compiling GWT, gwt-maven and gwt-maven-plugin.

There's also this the maven-scala-plugin.

I'm sure if you do a search, you'll find it for most popular JVM languages.

And of course, there's NMaven for .NET. I've never used it though.



回答4:

You don't really need fancy plugins to manage just about anything that can be executed from command line. As an example I have put Maven builds around poorly managed .NET projects using technics described in this tutorial. Basically - plugins such as exec, antrun, assembly and dependency can be used together as I mentioned - to do practically everything you need. Of course there are specialized, targeted plugins but I found out that these are hard to use with existing legacy stuff



回答5:

Phing is the PHP equivalent to Ant. It's (obviously) not quite Maven, but PHP doesn't have the same library (jar) management issues that Java does.