On Thu, 2017-11-09 at 15:22 +0100, Konrad Windszus wrote:
> Isn't JSON easier to process (at least in Groovy?)
> Otherwise looks good.

XML is quite easy in Groovy as well with XmlParser:


  def slingMod = new XmlParser().parse("https://raw.githubusercontent.c
om/apache/sling-org-apache-sling-starter/master/.sling-module.xml")

  def jdks = []

  if ( slingMod.jenkins.jdks ) {
      slingMod.jenkins.jdks.jdk.each { jdks += it.text() }
  }


There are two reasons for using XML:

1. it allows comments
2. it has more natural support for text blocks ( CDATA sections )

Robert

> Konrad
> 
> > On 9. Nov 2017, at 13:56, Robert Munteanu <[email protected]>
> > wrote:
> > 
> > Hi,
> > 
> > For aiding with tooling automation I propose that we add a Sling
> > module
> > descriptor for git repositories that need some special treatment.
> > 
> > Note that this is only for usage from tooling, e.g. Jenkins, repo
> > scripts, and not intended to be used in any way at run time or even
> > at
> > build time ( Maven ).
> > 
> > The complete write-up is at 
> > 
> >  https://cwiki.apache.org/confluence/display/SLING/Sling+module+des
> > cri
> > ptor
> > 
> > Comments welcome,
> > 
> > Thanks,
> > 
> > Robert
> 
> 

Reply via email to