You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2014/03/06 15:55:18 UTC

[jira] [Created] (SLING-3437) Support JSON and YAML formats do describe the bundles list

Simone Tripodi created SLING-3437:
-------------------------------------

             Summary: Support JSON and YAML formats do describe the bundles list
                 Key: SLING-3437
                 URL: https://issues.apache.org/jira/browse/SLING-3437
             Project: Sling
          Issue Type: New Feature
          Components: Maven Plugins and Archetypes
    Affects Versions: Maven Launchpad Plugin 2.3.0
            Reporter: Simone Tripodi
             Fix For: Maven Launchpad Plugin 2.3.2


In latest Modello release I contributed the support to generate both JSON and YAML formats, with just settings adjustment we can provide our users the support for these two formats for free.

So, given the XML representation of the following XML bundles list:

{noformat}
<?xml version="1.0"?>
<bundles>
  <startLevel level="boot">
    <bundle>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.6.4</version>
    </bundle>
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.commons.log</artifactId>
      <version>3.0.3-SNAPSHOT</version>
    </bundle>
  </startLevel>
  <startLevel level="0">
    <bundle>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.4</version>
    </bundle>
    <bundle>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.2.2</version>
    </bundle>
    <bundle>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.1</version>
    </bundle>
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.installer.provider.jcr</artifactId>
      <version>3.1.6</version>
      <runModes>test,dev</runModes>
    </bundle>
  </startLevel>
  <startLevel level="5">
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.extensions.webconsolebranding</artifactId>
      <version>1.0.0</version>
      <runModes>dev</runModes>
    </bundle>
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.extensions.webconsolesecurityprovider</artifactId>
      <version>1.0.0</version>
      <runModes>test</runModes>
    </bundle>
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>five.norunmode</artifactId>
      <version>1.0.0</version>
    </bundle>
  </startLevel>
  <startLevel level="15">
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.jcr.oak.server</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <runModes>oak</runModes>
    </bundle>
    <bundle>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>14.0.1</version>
      <runModes>jackrabbit</runModes>
    </bundle>
    <bundle>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>2.0.0</version>
      <runModes>oak,jackrabbit</runModes>
    </bundle>
    <bundle>
      <groupId>org.apache.sling</groupId>
      <artifactId>fifteen.norunmode</artifactId>
      <version>1.0.0</version>
    </bundle>
  </startLevel>
</bundles>
{noformat}

it can be represented in JSON format:

{noformat}
{
  "startLevels" : [ {
    "level" : "boot",
    "bundles" : [ {
      "groupId" : "org.slf4j",
      "artifactId" : "slf4j-api",
      "version" : "1.6.4"
    }, {
      "groupId" : "org.apache.sling",
      "artifactId" : "org.apache.sling.commons.log",
      "version" : "3.0.3-SNAPSHOT"
    } ]
  }, {
    "level" : "0",
    "bundles" : [ {
      "groupId" : "commons-io",
      "artifactId" : "commons-io",
      "version" : "1.4"
    }, {
      "groupId" : "commons-fileupload",
      "artifactId" : "commons-fileupload",
      "version" : "1.2.2"
    }, {
      "groupId" : "commons-collections",
      "artifactId" : "commons-collections",
      "version" : "3.2.1"
    }, {
      "groupId" : "org.apache.sling",
      "artifactId" : "org.apache.sling.installer.provider.jcr",
      "version" : "3.1.6",
      "runModes" : "test,dev"
    } ]
  }, {
    "level" : "5",
    "bundles" : [ {
      "groupId" : "org.apache.sling",
      "artifactId" : "org.apache.sling.extensions.webconsolebranding",
      "version" : "1.0.0",
      "runModes" : "dev"
    }, {
      "groupId" : "org.apache.sling",
      "artifactId" : "org.apache.sling.extensions.webconsolesecurityprovider",
      "version" : "1.0.0",
      "runModes" : "test"
    }, {
      "groupId" : "org.apache.sling",
      "artifactId" : "five.norunmode",
      "version" : "1.0.0"
    } ]
  }, {
    "level" : "15",
    "bundles" : [ {
      "groupId" : "org.apache.sling",
      "artifactId" : "org.apache.sling.jcr.oak.server",
      "version" : "0.0.1-SNAPSHOT",
      "runModes" : "oak"
    }, {
      "groupId" : "com.google.guava",
      "artifactId" : "guava",
      "version" : "14.0.1",
      "runModes" : "jackrabbit"
    }, {
      "groupId" : "com.google.code.findbugs",
      "artifactId" : "jsr305",
      "version" : "2.0.0",
      "runModes" : "oak,jackrabbit"
    }, {
      "groupId" : "org.apache.sling",
      "artifactId" : "fifteen.norunmode",
      "version" : "1.0.0"
    } ]
  } ]
}
{noformat}

and YAML

{noformat}
%YAML 1.1
---
"startLevels":
- "level": "boot"
  "bundles":
  - "groupId": "org.slf4j"
    "artifactId": "slf4j-api"
    "version": "1.6.4"
  - "groupId": "org.apache.sling"
    "artifactId": "org.apache.sling.commons.log"
    "version": "3.0.3-SNAPSHOT"
- "level": "0"
  "bundles":
  - "groupId": "commons-io"
    "artifactId": "commons-io"
    "version": "1.4"
  - "groupId": "commons-fileupload"
    "artifactId": "commons-fileupload"
    "version": "1.2.2"
  - "groupId": "commons-collections"
    "artifactId": "commons-collections"
    "version": "3.2.1"
  - "groupId": "org.apache.sling"
    "artifactId": "org.apache.sling.installer.provider.jcr"
    "version": "3.1.6"
    "runModes": "test,dev"
- "level": "5"
  "bundles":
  - "groupId": "org.apache.sling"
    "artifactId": "org.apache.sling.extensions.webconsolebranding"
    "version": "1.0.0"
    "runModes": "dev"
  - "groupId": "org.apache.sling"
    "artifactId": "org.apache.sling.extensions.webconsolesecurityprovider"
    "version": "1.0.0"
    "runModes": "test"
  - "groupId": "org.apache.sling"
    "artifactId": "five.norunmode"
    "version": "1.0.0"
- "level": "15"
  "bundles":
  - "groupId": "org.apache.sling"
    "artifactId": "org.apache.sling.jcr.oak.server"
    "version": "0.0.1-SNAPSHOT"
    "runModes": "oak"
  - "groupId": "com.google.guava"
    "artifactId": "guava"
    "version": "14.0.1"
    "runModes": "jackrabbit"
  - "groupId": "com.google.code.findbugs"
    "artifactId": "jsr305"
    "version": "2.0.0"
    "runModes": "oak,jackrabbit"
  - "groupId": "org.apache.sling"
    "artifactId": "fifteen.norunmode"
    "version": "1.0.0"
{noformat}

Patch is coming! :)



--
This message was sent by Atlassian JIRA
(v6.2#6252)