What does HackerNews think of polyglot-maven?

Support alternative markup for Apache Maven POM files

Language: Java

And you don't even need to use XML with Polyglot Maven

https://github.com/takari/polyglot-maven

> Maven is very unpleasant because of its declarative XML language

Maven was intended to be configured via a GUI. If you want to configure it directly, try Polyglot Maven at https://github.com/takari/polyglot-maven which is a very light wrapper around Maven enabling you to use many other languages instead, e.g. Scala, Clojure, and Ruby as well as Apache Groovy.

The Gradle people marketed their product by slagging the XML which was never intended to be directly manipulated by humans. If you really want to use Gradle (and get a coffee whenever it builds something), it also lets you use Kotlin for writing build files.

You can use the maven polyglot plugin [1] to write your POM in something other than XML. It's fairly new, but it's there. We use it in JRuby to write our POMs in Ruby. As an example of a loop:

https://github.com/jruby/jruby/blob/8e29ae1302e7aa989b8808f7...

[1] -- https://github.com/takari/polyglot-maven

You can use Polyglot-Maven [1] with Maven if you want to use a programming language syntax atop the XML. Polyglot-Maven enables not only Groovy, but also Ruby, Clojure, or Scala to be used with Maven.

[1] https://github.com/takari/polyglot-maven

Because Maven (the tool) offers XML as the language, we can put any other language atop it, e.g. with https://github.com/takari/polyglot-maven we can use Clojure, Groovy, Ruby, or Scala as the language. Gradle offers only Groovy, nothing else, so we don't have any choice over how to interact with the build API.
> Android Studio and the Gradle plugin are really, really coming along

Too bad Gradle only allows us to use one language (i.e. Groovy) to configure the builds. Because Maven uses generic XML, any language can sit atop it. E.g. Polyglot Maven [1] not only allows us to use Groovy, but also Clojure, Scala, and Ruby to configure its builds.

[1] https://github.com/takari/polyglot-maven

"Groovy" isn't mentioned even once on this page. Are the Gradle people embarrassed about their sole offering of Groovy for the build DSL? Because Maven uses XML, any programming language can sit on top and be used as a configuration DSL. https://github.com/takari/polyglot-maven not only offers Groovy, but also Clojure, Scala, and Ruby.
> Will Groovy survive outside of Gradle?

It might not survive even inside of Gradle. As Gradle becomes more popular, I can't imagine Groovy remaining the only scripting language available for Gradle build scripts. Virtually all serious software offers a choice of scripting languages for configuration, e.g. Maven which can be configured not only with Groovy but also Clojure, Scala, and Ruby, see https://github.com/takari/polyglot-maven . Gradle 2.0 has virtually no Groovy code in its codebase, only what was essential for hosting Groovy for build scripts, so that might give a clue about their future intentions. One snag may be the retrenched Groovy programmer employed by Gradleware after VMware/Pivotal abandoned Groovy: he might sabotage any effort by Gradleware to diversify from Groovy as a scripting language for Gradle builds.

I think that calling something verbose and unreadable is an oxymoron. XML is very explicit about what each field is labeled. Having an XSD means you always know what field is available where and what type of values are permitted. BUT, if you're still not happy, there's always polyglot maven[1]

[1] https://github.com/takari/polyglot-maven

This was submitted 2 weeks ago with a comment here: https://news.ycombinator.com/item?id=9603867

My question in the comment was how we distinguish between needing and not needing an equals sign in the Gradle DSL, such as in the example given...

    testdroid {
      username  "[email protected]"
      password "password"
      deviceGroup "MyTestDevices"
      cloudUrl  =  'https://cloud.testdroid.com' // <<<<<<<<<<<<<< WHY THE = SIGN HERE ?
      projectName "Project 1"
      mode "FULL_RUN"
      testRunName "Custom test run name"
      deviceLanguageCode "en-US"
      hookUrl "http://localhost:9080"
      scheduler "PARALLEL"
      testScreenshotDir  =  "/sdcard/abc" // <<<<<<<<<<<<<< WHY THE = SIGN HERE ?

      appCrawlerConfig{
          applicationPassword = "appPassword2" // <<<<<<<<<<<<<< WHY THE = SIGN FOR THESE ?
          applicationUserName = "appUsername2"
      }
    }
Sounds like Gradle needs something more consistent than Groovy for its DSL. Maven's XML seems more consistent, and if your IDE doesn't handle the XML to your satifaction, you can easily use another language on top of it from the many choices available, e.g. https://github.com/takari/polyglot-maven
If you don't like XML but don't want to switch to Gradle, you could use another language atop Maven: https://github.com/takari/polyglot-maven