You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/06/24 08:36:21 UTC

[sling-whiteboard] branch master updated: Removed feature-api-regions already promoted to sling-org-apache-sling-feature-apiregions-model repository

This is an automated email from the ASF dual-hosted git repository.

simonetripodi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 47bbca6  Removed feature-api-regions already promoted to sling-org-apache-sling-feature-apiregions-model repository
47bbca6 is described below

commit 47bbca62d55a9a90be4696ddd7a99fec1dcc05d5
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Mon Jun 24 10:36:10 2019 +0200

    Removed feature-api-regions already promoted to sling-org-apache-sling-feature-apiregions-model repository
---
 feature-api-regions/CODE_OF_CONDUCT.md             |  22 --
 feature-api-regions/CONTRIBUTING.md                |  24 --
 feature-api-regions/LICENSE                        | 201 ---------------
 feature-api-regions/README.md                      | 164 ------------
 feature-api-regions/pom.xml                        |  76 ------
 .../sling/feature/apiregions/model/ApiRegion.java  | 280 ---------------------
 .../sling/feature/apiregions/model/ApiRegions.java |  85 -------
 .../feature/apiregions/model/JoinedIterator.java   |  54 ----
 .../model/io/json/ApiRegionsJSONParser.java        | 160 ------------
 .../model/io/json/ApiRegionsJSONSerializer.java    | 115 ---------
 .../apiregions/model/io/json/JSONConstants.java    |  27 --
 .../apiregions/model/io/json/package-info.java     |  21 --
 .../feature/apiregions/model/package-info.java     |  21 --
 .../feature/apiregions/model/ApiRegionTest.java    | 158 ------------
 .../feature/apiregions/model/ApiRegionsTest.java   | 113 ---------
 .../model/io/json/ApiRegionsJSONParserTest.java    | 100 --------
 .../io/json/ApiRegionsJSONSerializerTest.java      | 125 ---------
 17 files changed, 1746 deletions(-)

diff --git a/feature-api-regions/CODE_OF_CONDUCT.md b/feature-api-regions/CODE_OF_CONDUCT.md
deleted file mode 100644
index 0fa18e5..0000000
--- a/feature-api-regions/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-Apache Software Foundation Code of Conduct
-====
-
-Being an Apache project, Apache Sling adheres to the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
diff --git a/feature-api-regions/CONTRIBUTING.md b/feature-api-regions/CONTRIBUTING.md
deleted file mode 100644
index ac82a1a..0000000
--- a/feature-api-regions/CONTRIBUTING.md
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-Contributing
-====
-
-Thanks for choosing to contribute!
-
-You will find all the necessary details about how you can do this at https://sling.apache.org/contributing.html.
diff --git a/feature-api-regions/LICENSE b/feature-api-regions/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/feature-api-regions/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/feature-api-regions/README.md b/feature-api-regions/README.md
deleted file mode 100644
index db9032d..0000000
--- a/feature-api-regions/README.md
+++ /dev/null
@@ -1,164 +0,0 @@
-[<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
-
-# Apache Sling Feature Model API Regions
-
-This small set of APIs aims to provide to Apache Sling users an easy-to-use layer to manipulate
-`api-regions` JSON extensions.
-
-## Motivation
-
-The `api-regions` extensions gained popularity via the [APIs Jar MOJO](https://github.com/apache/sling-slingfeature-maven-plugin/blob/master/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java) that, for each selected Apache Sling Feature Model file, generates multiple Java Archives, one for each declared section in the `api-regions` extension, containing declared APIs in each region.
-
-During the time, business intelligence on top of `api-regions` extension will be required, i.e. analyzing the evolution of each region in each Apache Sling Feature Model file, to see what's removed and what's added (just to mention few operations), so having a single APIs set to manipulate `api-regions` will be helpful avoiding code redundancies across multiple applications.
-
-## Quick how-to
-
-`api-regions` extensions are generally obtained by parsing the JSON content in the `api-regions` declaration, i.e. given the following sample region:
-
-```json
-[
-  {
-    "name": "base",
-    "exports": [
-      "org.apache.felix.inventory",
-      "org.apache.felix.metatype"
-    ]
-  },
-  {
-    "name": "extended",
-    "exports": [
-      "org.apache.felix.scr.component",
-      "org.apache.felix.scr.info"
-    ]
-  }
-]
-```
-
-then obtaining simple APIs will look like:
-
-```java
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-import org.apache.sling.feature.apiregions.model.io.json.ApiRegionsJSONParser;
-
-...
-
-Feature feature = [somehow obtained]
-// parseApiRegions method can be invoked also passing a org.apache.sling.feature.Extension instance
-// or a String which represents the JSON structure of an api-regions extension.
-ApiRegions regions = ApiRegionsJSONParser.parseApiRegions(feature);
-
-for (ApiRegion region : regions) {
-    System.out.println("-" + region.getName());
-
-    for (String api : region) {
-        System.out.println(" * " + api);
-    }
-
-    System.out.println("--------");
-}
-```
-
-That code will output:
-
-```
-- base
- * org.apache.felix.inventory
- * org.apache.felix.metatype
---------
-- extended
- * org.apache.felix.scr.component
- * org.apache.felix.scr.info
- * org.apache.felix.inventory
- * org.apache.felix.metatype
---------
-```
-
-## Note
-
-Pleas take in account that each declared region in `api-regions` inherits declared APIs from the previous declared region.
-
-
-## APIs to create regions
-
-Users can also use APIs to manually declare their `api-regions` instances:
-
-```java
-omit imports for brevity;
-
-...
-
-ApiRegions apiRegions = new ApiRegions();
-ApiRegion granpa = apiRegions.addNew("granpa");
-granpa.add("org.apache.sling.feature.apiregions.model");
-
-ApiRegion father = apiRegions.addNew("father");
-father.add("org.apache.sling.feature.apiregions.model.io");
-
-ApiRegion child = apiRegions.addNew("child");
-child.add("org.apache.sling.feature.apiregions.model.io.json");
-
-for (ApiRegion region : apiRegions) {
-    System.out.println("-" + region.getName());
-
-    for (String api : region) {
-        System.out.println(" * " + api);
-    }
-
-    System.out.println("--------");
-}
-```
-
-That code will output:
-
-```
-- granpa
- * org.apache.sling.feature.apiregions.model
---------
-- father
- * org.apache.sling.feature.apiregions.model
- * org.apache.sling.feature.apiregions.model.io
---------
-- child
- * org.apache.sling.feature.apiregions.model
- * org.apache.sling.feature.apiregions.model.io
- * org.apache.sling.feature.apiregions.model.io.json
---------
-```
-
-JSON serialization is available as well:
-
-```java
-import org.apache.sling.feature.apiregions.model.io.json.ApiRegionsJSONSerializer
-
-...
-
-ApiRegionsJSONSerializer.serializeApiRegions(ApiRegions, System.out);
-```
-
-that will output:
-
-```json
-[
-  {
-    "name":"granpa",
-    "exports":[
-      "org.apache.sling.feature.apiregions.model"
-    ]
-  },
-  {
-    "name":"father",
-    "exports":[
-      "org.apache.sling.feature.apiregions.model.io"
-    ]
-  },
-  {
-    "name":"child",
-    "exports":[
-      "org.apache.sling.feature.apiregions.model.io.json"
-    ]
-  }
-]
-
-```
diff --git a/feature-api-regions/pom.xml b/feature-api-regions/pom.xml
deleted file mode 100644
index 03caa6b..0000000
--- a/feature-api-regions/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with this
- work for additional information regarding copyright ownership. The ASF
- licenses this file to You under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- License for the specific language governing permissions and limitations under
- the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.sling</groupId>
-    <artifactId>sling</artifactId>
-    <version>34</version>
-    <relativePath />
-  </parent>
-
-  <artifactId>org.apache.sling.feature.apiregions.model</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
-
-  <name>Apache Sling Feature Model API Regions</name>
-  <description>Apache Sling Feature Model API Regions</description>
-
-  <properties>
-    <sling.java.version>8</sling.java.version>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <!--
-     | Sling Feature Model libraries
-    -->
-    <dependency>
-      <groupId>org.apache.sling</groupId>
-      <artifactId>org.apache.sling.feature</artifactId>
-      <version>1.0.0</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- Parse the JSON api-region extension -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-json_1.0_spec</artifactId>
-      <version>1.0-alpha-1</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!--
-     | Test only dependencies
-    -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.johnzon</groupId>
-      <artifactId>johnzon-core</artifactId>
-      <version>1.0.0</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegion.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegion.java
deleted file mode 100644
index 3e2e620..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegion.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.Formatter;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.regex.Pattern;
-
-/**
- * In-memory representation of a <code>api-regions</code> section.
- */
-public final class ApiRegion implements Iterable<String> {
-
-    private static final Pattern PACKAGE_NAME_VALIDATION =
-            Pattern.compile("^[a-z]+(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$");
-
-    private static final String PACKAGE_DELIM = ".";
-
-    private static final Set<String> KEYWORDS = new HashSet<>();
-
-    static {
-        KEYWORDS.add("abstract");
-        KEYWORDS.add("continue");
-        KEYWORDS.add("for");
-        KEYWORDS.add("new");
-        KEYWORDS.add("switch");
-        KEYWORDS.add("assert");
-        KEYWORDS.add("default");
-        KEYWORDS.add("package");
-        KEYWORDS.add("synchronized");
-        KEYWORDS.add("boolean");
-        KEYWORDS.add("do");
-        KEYWORDS.add("if");
-        KEYWORDS.add("private");
-        KEYWORDS.add("this");
-        KEYWORDS.add("break");
-        KEYWORDS.add("double");
-        KEYWORDS.add("implements");
-        KEYWORDS.add("protected");
-        KEYWORDS.add("throw");
-        KEYWORDS.add("byte");
-        KEYWORDS.add("else");
-        KEYWORDS.add("import");
-        KEYWORDS.add("public");
-        KEYWORDS.add("throws");
-        KEYWORDS.add("case");
-        KEYWORDS.add("enum");
-        KEYWORDS.add("instanceof");
-        KEYWORDS.add("return");
-        KEYWORDS.add("transient");
-        KEYWORDS.add("catch");
-        KEYWORDS.add("extends");
-        KEYWORDS.add("int");
-        KEYWORDS.add("short");
-        KEYWORDS.add("try");
-        KEYWORDS.add("char");
-        KEYWORDS.add("final");
-        KEYWORDS.add("interface");
-        KEYWORDS.add("static");
-        KEYWORDS.add("void");
-        KEYWORDS.add("class");
-        KEYWORDS.add("finally");
-        KEYWORDS.add("long");
-        KEYWORDS.add("strictfp");
-        KEYWORDS.add("volatile");
-        KEYWORDS.add("float");
-        KEYWORDS.add("native");
-        KEYWORDS.add("super");
-        KEYWORDS.add("while");
-    }
-
-    private final Set<String> apis = new HashSet<>();
-
-    private final String name;
-
-    private final ApiRegion parent;
-
-    protected ApiRegion(String name, ApiRegion parent) {
-        this.name = name;
-        this.parent = parent;
-    }
-
-    /**
-     * Returns the name identifying this API region.
-     *
-     * @return the name identifying this API region.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Returns the parent API region which is extended,
-     * <code>null</code> if this region represents the first section in the regions.
-     *
-     * @return the parent API region which is extended,
-     * <code>null</code> if this region represents the first section in the regions.
-     */
-    public ApiRegion getParent() {
-        return parent;
-    }
-
-    /**
-     * Add new API packages iterating over the input collection,
-     * filtering out null, empty or non-conforming to Java packages convention.
-     *
-     * @param apis the input API packages, must be not null.
-     */
-    public void addAll(Iterable<String> apis) {
-        requireNonNull(apis, "Impossible to import null APIs");
-
-        for (String api : apis) {
-            add(api);
-        }
-    }
-
-    /**
-     * Add a new API package filtering out null, empty or non-conforming to Java packages convention.
-     *
-     * @param api the new API package, must be not null, not empty and conforming to Java packages convention
-     * @return true if the API package is added, false otherwise.
-     */
-    public boolean add(String api) {
-        // ignore null, empty package and non well-formed packages names, i.e. javax.jms.doc-files
-        if (isEmpty(api) || !PACKAGE_NAME_VALIDATION.matcher(api).matches()) {
-            // ignore it
-            return false;
-        }
-
-        // ignore packages with reserved keywords, i.e. org.apache.commons.lang.enum
-        StringTokenizer tokenizer = new StringTokenizer(api, PACKAGE_DELIM);
-        while (tokenizer.hasMoreTokens()) {
-            String apiPart = tokenizer.nextToken();
-            if (KEYWORDS.contains(apiPart)) {
-                return false;
-            }
-        }
-
-        if (contains(api)) {
-            return false;
-        }
-
-        return apis.add(api);
-    }
-
-    /**
-     * Check is the region contains, across the whole region hierarchy,
-     * if the input API package is contained.
-     * 
-     * @param api the API package to check
-     * @return true, if the API package is contained by this (or parents) region, false otherwise.
-     */
-    public boolean contains(String api) {
-        if (isEmpty(api)) {
-            return false;
-        }
-
-        if (apis.contains(api)) {
-            return true;
-        }
-
-        if (parent != null) {
-            return parent.contains(api);
-        }
-
-        return false;
-    }
-
-    /**
-     * Check if this region, across the whole region hierarchy, contains any API.
-     *
-     * @return true if this region, across the whole region hierarchy, contains any API, false otherwise.
-     */
-    public boolean isEmpty() {
-        if (!apis.isEmpty()) {
-            return false;
-        }
-
-        if (parent != null) {
-            return parent.isEmpty();
-        }
-
-        return true;
-    }
-
-    /**
-     * Removes in this region, or in a region across the whole hierarchy,
-     * the input API package.
-     *
-     * @param api the API package to remove
-     * @return true if the API package was removed in this or one region across the whole region hierarchy,
-     * false otherwise
-     */
-    public boolean remove(String api) {
-        if (isEmpty(api)) {
-            return false;
-        }
-
-        if (apis.remove(api)) {
-            return true;
-        }
-
-        if (parent != null) {
-            return parent.remove(api);
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Iterator<String> iterator() {
-        List<Iterable<String>> iterators = new LinkedList<>();
-
-        ApiRegion region = this;
-        while (region != null) {
-            iterators.add(region.apis);
-            region = region.getParent();
-        }
-
-        return new JoinedIterator<String>(iterators.iterator());
-    }
-
-    /**
-     * Returns the API packages that are stored only in this region.
-     *
-     * @return the API packages that are stored only in this region.
-     */
-    public Iterable<String> getExports() {
-        return apis;
-    }
-
-    @Override
-    public String toString() {
-        Formatter formatter = new Formatter();
-        formatter.format("Region '%s'", name);
-
-        if (parent != null) {
-            formatter.format(" inherits from %n")
-                     .format(parent.toString());
-        }
-
-        for (String api : apis) {
-            formatter.format("%n * %s", api);
-        }
-
-        String toString = formatter.toString();
-        formatter.close();
-
-        return toString;
-    }
-
-    private static boolean isEmpty(String value) {
-        return value == null || value.isEmpty();
-    }
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegions.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegions.java
deleted file mode 100644
index b6db357..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/ApiRegions.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model;
-
-import java.util.Iterator;
-import java.util.Stack;
-
-/**
- * <code>api-regions</code> in memory representation.
- */
-public final class ApiRegions implements Iterable<ApiRegion> {
-
-    private final Stack<ApiRegion> regions = new Stack<>();
-
-    /**
-     * Creates then adds a new API region, given its name.
-     *
-     * <i>Please note</i>: according the <code>api-regions</code> specifications,
-     * the order in which the regions are created influences the regions hierarchy.
-     *
-     * @param regionName the name of the region to be created, must be not null and not empty.
-     * @return the created region, identified by the passed name.
-     */
-    public ApiRegion addNew(String regionName) {
-        if (regionName == null || regionName.isEmpty()) {
-            throw new IllegalArgumentException("Impossible to create a new API Region without specifying a valid name");
-        }
-
-        ApiRegion parent = regions.isEmpty() ? null : regions.peek(); // null parent means 'root' in the hierarchy
-        ApiRegion newRegion = new ApiRegion(regionName, parent);
-        return regions.push(newRegion);
-    }
-
-    /**
-     * Search and returns, if found, the region identified by the given name.
-     *
-     * @param regionName the name of the region to find
-     * @return the region identified by the passed name, null if not found or the name is null or empty
-     */
-    public ApiRegion getByName(String regionName) {
-        if (regionName == null || regionName.isEmpty()) {
-            return null;
-        }
-
-        for (ApiRegion region : regions) {
-            if (regionName.equals(region.getName())) {
-                return region;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Checks if any region is present
-     *
-     * @return true if there is at least one declared regin, false otherwise.
-     */
-    public boolean isEmpty() {
-        return regions.isEmpty();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Iterator<ApiRegion> iterator() {
-        return regions.iterator();
-    }
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/JoinedIterator.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/JoinedIterator.java
deleted file mode 100644
index ea742ca..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/JoinedIterator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model;
-
-import java.util.Iterator;
-
-final class JoinedIterator<E> implements Iterator<E> {
-
-    private final Iterator<Iterable<E>> iterator;
-
-    private Iterator<E> currentIterator;
-
-    public JoinedIterator(Iterator<Iterable<E>> iterator) {
-        this.iterator = iterator;
-        currentIterator = null;
-    }
-
-    @Override
-    public boolean hasNext() {
-        if (currentIterator == null) {
-            if (iterator.hasNext()) {
-                currentIterator = iterator.next().iterator();
-            } else {
-                return false;
-            }
-        }
-
-        while (!currentIterator.hasNext() && iterator.hasNext()) {
-            currentIterator = iterator.next().iterator();
-        }
-
-        return currentIterator.hasNext();
-    }
-
-    @Override
-    public E next() {
-        return currentIterator.next();
-    }
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParser.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParser.java
deleted file mode 100644
index 50949aa..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParser.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
-
-import static org.apache.sling.feature.ExtensionType.JSON;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import javax.json.Json;
-import javax.json.stream.JsonParser;
-import javax.json.stream.JsonParser.Event;
-
-import static java.util.Objects.requireNonNull;
-
-import org.apache.sling.feature.Extension;
-import org.apache.sling.feature.Extensions;
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-
-/**
- * <code>api-regions</code> JSON format parser implementation.
- */
-public final class ApiRegionsJSONParser implements JSONConstants {
-
-    private ApiRegionsJSONParser() {
-        // this class must not be instantiated from outside
-    }
-
-    /**
-     * Extracts and parses an <code>api-regions</code> JSON Extension from a Feature Model,
-     * mapping it to the related in-memory representation.
-     *
-     * @param feature the Feature Model containing the <code>api-regions</code> to parse.
-     * @return the related in-memory representation of the <code>api-regions</code>,
-     * null if the <code>api-regions</code> extension does not exist in the input Feature Model.
-     */
-    public static ApiRegions parseApiRegions(Feature feature) {
-        requireNonNull(feature, "Impossible to extract api-regions from a null feature");
-
-        Extensions extensions = feature.getExtensions();
-        Extension apiRegionsExtension = extensions.getByName(API_REGIONS_KEY);
-        if (apiRegionsExtension == null) {
-            return null;
-        }
-
-        return parseApiRegions(apiRegionsExtension);
-    }
-
-    /**
-     * Extracts and parses an <code>api-regions</code> JSON Extension, mapping it to the related in-memory representation.
-     *
-     * @param apiRegionsExtension the <code>api-regions</code> JSON Extension, must named <code>api-regions</code> and of type JSON.
-     * @return the related in-memory representation of the <code>api-regions</code>
-     */
-    public static ApiRegions parseApiRegions(Extension apiRegionsExtension) {
-        requireNonNull(apiRegionsExtension, "Impossible to extract api-regions from a null extension");
-
-        if (!API_REGIONS_KEY.equals(apiRegionsExtension.getName())) {
-            throw new IllegalArgumentException(apiRegionsExtension.getName() + " is not a recognised api-regions extension");
-        }
-        if (JSON != apiRegionsExtension.getType()) {
-            throw new IllegalArgumentException("api-regions extension must be of JSON type, "
-                                               + apiRegionsExtension.getType()
-                                               + " is not a recognised as valid api-regions extension");
-        }
-
-        return parseApiRegions(apiRegionsExtension.getJSON());
-    }
-
-    /**
-     * Parses an <code>api-regions</code> JSON string representation, mapping it to the related in-memory representation.
-     *
-     * @param jsonRepresentation the <code>api-regions</code> JSON string representation
-     * @return the related in-memory representation of the <code>api-regions</code>
-     */
-    public static ApiRegions parseApiRegions(String jsonRepresentation) {
-        requireNonNull(jsonRepresentation, "Impossible to extract api-regions from a null JSON representation");
-
-        ApiRegions apiRegions = new ApiRegions();
-
-        // pointers
-        Event event;
-        String regionName;
-        Collection<String> apis;
-
-        JsonParser parser = Json.createParser(new StringReader(jsonRepresentation));
-        if (Event.START_ARRAY != parser.next()) {
-            throw new IllegalStateException("Expected 'api-region' element to start with an Array: "
-                                             + parser.getLocation());
-        }
-
-        while (Event.END_ARRAY != (event = parser.next())) {
-            if (Event.START_OBJECT != event) {
-                throw new IllegalStateException("Expected 'api-region' data to start with an Object: "
-                                                + parser.getLocation());
-            }
-
-            regionName = null;
-            apis = null;
-
-            while (Event.END_OBJECT != (event = parser.next())) {
-                if (Event.KEY_NAME == event) {
-                    switch (parser.getString()) {
-                        case NAME_KEY:
-                            parser.next();
-                            regionName = parser.getString();
-                            break;
-
-                        case EXPORTS_KEY:
-                            // start array
-                            parser.next();
-
-                            apis = new ArrayList<>();
-
-                            while (parser.hasNext() && Event.VALUE_STRING == parser.next()) {
-                                String api = parser.getString();
-                                // skip comments
-                                if ('#' != api.charAt(0)) {
-                                    apis.add(api);
-                                }
-                            }
-
-                            break;
-
-                        default:
-                            break;
-                    }
-                }
-            }
-
-            if (regionName != null
-                    && !regionName.isEmpty()
-                    && apis != null
-                    && !apis.isEmpty()) {
-                ApiRegion apiRegion = apiRegions.addNew(regionName);
-                apiRegion.addAll(apis);
-            }
-        }
-
-        return apiRegions;
-    }
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializer.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializer.java
deleted file mode 100644
index 3114e05..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializer.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Collections;
-
-import javax.json.Json;
-import javax.json.stream.JsonGenerator;
-import javax.json.stream.JsonGeneratorFactory;
-
-import org.apache.sling.feature.Extension;
-import org.apache.sling.feature.ExtensionType;
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-
-/**
- * <code>api-regions</code> JSON format serializer implementation.
- */
-public final class ApiRegionsJSONSerializer implements JSONConstants {
-
-    private static final JsonGeneratorFactory GENERATOR_FACTORY = Json.createGeneratorFactory(Collections.singletonMap(JsonGenerator.PRETTY_PRINTING, true));
-
-    private ApiRegionsJSONSerializer() {
-        // this class must not be instantiated from outside
-    }
-
-    /**
-     * Serializes the input <code>api-regions</code> to the target stream.
-     *
-     * @param apiRegions the <code>api-regions</code> has to be serialized
-     * @param output the target stream where serializing the <code>api-regions</code>
-     */
-    public static void serializeApiRegions(ApiRegions apiRegions, OutputStream output) {
-        requireNonNull(output, "Impossible to serialize api-regions to a null stream");
-        serializeApiRegions(apiRegions, new OutputStreamWriter(output));
-    }
-
-    /**
-     * Serializes the input <code>api-regions</code> to the target writer.
-     *
-     * @param apiRegions the <code>api-regions</code> has to be serialized
-     * @param writer the target writer where serializing the <code>api-regions</code>
-     */
-    public static void serializeApiRegions(ApiRegions apiRegions, Writer writer) {
-        requireNonNull(apiRegions, "Impossible to serialize null api-regions");
-        requireNonNull(writer, "Impossible to serialize api-regions to a null stream");
-
-        JsonGenerator generator = GENERATOR_FACTORY.createGenerator(writer)
-                                                   .writeStartArray();
-
-        for (ApiRegion apiRegion : apiRegions) {
-            generator.writeStartObject()
-                     .write(NAME_KEY, apiRegion.getName())
-                     .writeStartArray(EXPORTS_KEY);
-
-            for (String api : apiRegion.getExports()) {
-                generator.write(api);
-            }
-
-            generator.writeEnd().writeEnd();
-        }
-
-        generator.writeEnd().close();
-    }
-
-    /**
-     * Maps the input <code>api-regions</code> to the <code>api-regions</code> Feature Model Extension.
-     *
-     * @param apiRegions the <code>api-regions</code> has to be serialized
-     * @return the mapped <code>api-regions</code> Feature Model Extension
-     */
-    public static Extension serializeApiRegions(ApiRegions apiRegions) {
-        StringWriter stringWriter = new StringWriter();
-        serializeApiRegions(apiRegions, stringWriter);
-
-        Extension apiRegionsExtension = new Extension(ExtensionType.JSON, API_REGIONS_KEY, false);
-        apiRegionsExtension.setJSON(stringWriter.toString());
-        return apiRegionsExtension;
-    }
-
-    /**
-     * Maps the input <code>api-regions</code> to the <code>api-regions</code> Feature Model Extension
-     * and add it to the target Feature.
-     *
-     * @param apiRegions the <code>api-regions</code> has to be serialized
-     * @param feature the target Feature where adding the extension
-     */
-    public static void serializeApiRegions(ApiRegions apiRegions, Feature feature) {
-        requireNonNull(feature, "Impossible to serialize api-regions to a null Feature");
-        Extension apiRegionsExtension = serializeApiRegions(apiRegions);
-        feature.getExtensions().add(apiRegionsExtension);
-    }
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/JSONConstants.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/JSONConstants.java
deleted file mode 100644
index 51e132b..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/JSONConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
-
-interface JSONConstants {
-
-    public static final String API_REGIONS_KEY = "api-regions";
-
-    public static final String NAME_KEY = "name";
-
-    public static final String EXPORTS_KEY = "exports";
-
-}
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/package-info.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/package-info.java
deleted file mode 100644
index 0ae6d31..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/io/json/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-/**
- * <code>api-regions</code> Parser APIs.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
diff --git a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/package-info.java b/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/package-info.java
deleted file mode 100644
index d890026..0000000
--- a/feature-api-regions/src/main/java/org/apache/sling/feature/apiregions/model/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-/**
- * Basic <code>api-regions</code> APIs.
- */
-package org.apache.sling.feature.apiregions.model;
diff --git a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionTest.java b/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionTest.java
deleted file mode 100644
index 8c375a2..0000000
--- a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.junit.Test;
-
-public class ApiRegionTest {
-
-    @Test
-    public void ignoreNullPackageName() {
-        ingnoreApi(null);
-    }
-
-    @Test
-    public void ignoreEmptyPackageName() {
-        ingnoreApi("");
-    }
-
-    @Test
-    public void ignoreInvalidPackageName() {
-        ingnoreApi("1inv4l1d.package");
-    }
-
-    @Test
-    public void ignoreReservedWords() {
-        ingnoreApi("org.apache.commons.lang.enum");
-    }
-
-    private void ingnoreApi(String api) {
-        ApiRegion testRegion = new ApiRegion(getClass().getName(), null);
-        assertFalse(testRegion.add(api));
-        assertFalse(testRegion.contains(api));
-    }
-
-    @Test
-    public void inheritanceCheck() {
-        ApiRegion granpa = new ApiRegion("granpa", null);
-        assertTrue(granpa.add("org.apache.sling.feature.apiregions"));
-
-        ApiRegion father = new ApiRegion("father", granpa);
-        assertTrue(father.add("org.apache.sling.feature.apiregions.io"));
-        assertFalse(father.add("org.apache.sling.feature.apiregions")); // inherited by granpa
-
-        ApiRegion child = new ApiRegion("child", father);
-        assertFalse(child.add("org.apache.sling.feature.apiregions.io")); // inherited by father
-        assertFalse(child.add("org.apache.sling.feature.apiregions")); // inherited by granpa
-
-        assertSame(father, child.getParent());
-        assertSame(granpa, father.getParent());
-        assertNull(granpa.getParent());
-    }
-
-    @Test
-    public void inheritanceContainsCheck() {
-        ApiRegion granpa = new ApiRegion("granpa", null);
-        granpa.add("org.apache.sling.feature.apiregions");
-
-        ApiRegion father = new ApiRegion("father", granpa);
-        father.add("org.apache.sling.feature.apiregions.io");
-
-        ApiRegion child = new ApiRegion("child", father);
-        child.add("org.apache.sling.feature.apiregions.io.json");
-
-        assertTrue(child.contains("org.apache.sling.feature.apiregions.io.json"));
-        assertTrue(child.contains("org.apache.sling.feature.apiregions.io")); // inherited by father
-        assertTrue(child.contains("org.apache.sling.feature.apiregions")); // inherited by granpa
-    }
-
-    @Test
-    public void inheritanceEmptyCheck() {
-        ApiRegion granpa = new ApiRegion("granpa", null);
-        granpa.add("org.apache.sling.feature.apiregions");
-
-        ApiRegion father = new ApiRegion("father", granpa);
-        ApiRegion child = new ApiRegion("child", father);
-
-        assertFalse(child.isEmpty());
-        assertFalse(father.isEmpty());
-        assertFalse(granpa.isEmpty());
-
-        ApiRegion neighbour = new ApiRegion("neighbour", null);
-        assertTrue(neighbour.isEmpty());
-    }
-
-    @Test
-    public void inheritanceAvoidsDuplicates() {
-        ApiRegion granpa = new ApiRegion("granpa", null);
-        assertTrue(granpa.add("org.apache.sling.feature.apiregions"));
-
-        ApiRegion father = new ApiRegion("father", granpa);
-        assertFalse(father.add("org.apache.sling.feature.apiregions"));
-    }
-
-    @Test
-    public void inheritaceRemove() {
-        ApiRegion father = new ApiRegion("father", null);
-        father.add("org.apache.sling.feature.apiregions");
-
-        ApiRegion child = new ApiRegion("child", father);
-        child.add("org.apache.sling.feature.apiregions.io");
-
-        assertFalse(child.remove(null));
-        assertFalse(child.remove(""));
-        assertFalse(child.remove("does.not.exist"));
-        assertTrue(child.remove("org.apache.sling.feature.apiregions")); // inherited
-        assertFalse(child.contains("org.apache.sling.feature.apiregions")); // inherited
-        assertFalse(child.contains("org.apache.sling.feature.apiregions"));
-    }
-
-    @Test
-    public void inheritanceIteratorCheck() {
-        ApiRegion granpa = new ApiRegion("granpa", null);
-        granpa.add("org.apache.sling.feature.apiregions");
-
-        ApiRegion father = new ApiRegion("father", granpa);
-        father.add("org.apache.sling.feature.apiregions.io");
-
-        ApiRegion child = new ApiRegion("child", father);
-        child.add("org.apache.sling.feature.apiregions.io.json");
-
-        // build the expected packages
-
-        Set<String> packages = new HashSet<>();
-        packages.add("org.apache.sling.feature.apiregions.io.json");
-        packages.add("org.apache.sling.feature.apiregions.io");
-        packages.add("org.apache.sling.feature.apiregions");
-
-        for (String api : child) {
-            packages.remove(api);
-        }
-
-        assertTrue("Expected all packages removed, still found" + packages, packages.isEmpty());
-    }
-
-}
diff --git a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionsTest.java b/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionsTest.java
deleted file mode 100644
index 71dadd3..0000000
--- a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/ApiRegionsTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ApiRegionsTest {
-
-    private ApiRegions apiRegions;
-
-    @Before
-    public void setUp() {
-        apiRegions = new ApiRegions();
-    }
-
-    @After
-    public void tearDown() {
-        apiRegions = null;
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void canNotCreateRegionWithNullName() {
-        apiRegions.addNew(null);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void canNotCreateRegionWithEmptyName() {
-        apiRegions.addNew("");
-    }
-
-    @Test
-    public void impossibleToGetRegionWithNullName() {
-        assertNull(apiRegions.getByName(null));
-    }
-
-    @Test
-    public void impossibleToGetRegionWithEmptyName() {
-        assertNull(apiRegions.getByName(""));
-    }
-
-    @Test
-    public void impossibleToGetRegionWithNotRegisteredRegion() {
-        assertNull(apiRegions.getByName("not-registered-yet"));
-    }
-
-    @Test
-    public void getRegionWithRegisteredRegion() {
-        assertTrue(apiRegions.isEmpty());
-
-        String regionName = "registered";
-        ApiRegion region = apiRegions.addNew(regionName);
-        assertNotNull(region);
-        assertFalse(apiRegions.isEmpty());
-        assertNotNull(apiRegions.getByName(regionName));
-    }
-
-    @Test
-    public void sequentialInheritance() {
-        ApiRegion granpa = apiRegions.addNew("granpa");
-        ApiRegion father = apiRegions.addNew("father");
-        ApiRegion child = apiRegions.addNew("child");
-
-        assertSame(father, child.getParent());
-        assertSame(granpa, father.getParent());
-        assertNull(granpa.getParent());
-    }
-
-    @Test
-    public void iteratingOverRegions() {
-        apiRegions.addNew("granpa");
-        apiRegions.addNew("father");
-        apiRegions.addNew("child");
-
-        List<String> expected = Arrays.asList("granpa", "father", "child");
-
-        List<String> actual = new LinkedList<>();
-        for (ApiRegion region : apiRegions) {
-            actual.add(region.getName());
-        }
-
-        assertEquals(expected, actual);
-    }
-
-}
diff --git a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParserTest.java b/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParserTest.java
deleted file mode 100644
index a71b0ef..0000000
--- a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONParserTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.sling.feature.ArtifactId;
-import org.apache.sling.feature.Extension;
-import org.apache.sling.feature.ExtensionType;
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-import org.apache.sling.feature.apiregions.model.io.json.ApiRegionsJSONParser;
-import org.junit.Test;
-
-public class ApiRegionsJSONParserTest {
-
-    @Test(expected = NullPointerException.class)
-    public void canNotParseNullFeature() {
-        ApiRegionsJSONParser.parseApiRegions((Feature) null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void canNotParseNullExtension() {
-        ApiRegionsJSONParser.parseApiRegions((Extension) null);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void canNotParseInvalidExtensionName() {
-        Extension extension = new Extension(ExtensionType.JSON, "invalid", false);
-        ApiRegionsJSONParser.parseApiRegions(extension);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void canNotParseInvalidExtensionType() {
-        Extension extension = new Extension(ExtensionType.TEXT, "api-regions", false);
-        ApiRegionsJSONParser.parseApiRegions(extension);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void canNotParseNullJsonRepresentation() {
-        ApiRegionsJSONParser.parseApiRegions((String) null);
-    }
-
-    @Test
-    public void parseApiRegions() {
-        Extension extension = new Extension(ExtensionType.JSON, "api-regions", false);
-        extension.setJSON("[\n" + 
-                            "  {\n" + 
-                            "    \"name\":\"base\",\n" + 
-                            "    \"exports\":[\n" + 
-                            "      \"org.apache.felix.metatype\",\n" + 
-                            "      \"org.apache.felix.inventory\"\n" + 
-                            "    ]\n" + 
-                            "  },\n" + 
-                            "  {\n" + 
-                            "    \"name\":\"extended\",\n" + 
-                            "    \"exports\":[\n" + 
-                            "      \"org.apache.felix.scr.component\",\n" + 
-                            "      \"org.apache.felix.scr.info\"\n" + 
-                            "    ]\n" + 
-                            "  }\n" + 
-                            "]");
-        Feature feature = new Feature(ArtifactId.fromMvnId("org.apache.sling:org.apache.sling.feature.apiregions:1.0.0"));
-        feature.getExtensions().add(extension);
-
-        ApiRegions apiRegions = ApiRegionsJSONParser.parseApiRegions(feature);
-
-        ApiRegion base = apiRegions.getByName("base");
-        assertNull(base.getParent());
-        assertTrue(base.contains("org.apache.felix.inventory"));
-        assertTrue(base.contains("org.apache.felix.metatype"));
-
-        ApiRegion extended = apiRegions.getByName("extended");
-        assertNotNull(extended.getParent());
-        assertSame(base, extended.getParent());
-        assertTrue(extended.contains("org.apache.felix.inventory"));
-        assertTrue(extended.contains("org.apache.felix.metatype"));
-        assertTrue(extended.contains("org.apache.felix.scr.component"));
-        assertTrue(extended.contains("org.apache.felix.scr.info"));
-    }
-
-}
diff --git a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializerTest.java b/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializerTest.java
deleted file mode 100644
index ba1d4ce..0000000
--- a/feature-api-regions/src/test/java/org/apache/sling/feature/apiregions/model/io/json/ApiRegionsJSONSerializerTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.feature.apiregions.model.io.json;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.io.Writer;
-
-import org.apache.sling.feature.ArtifactId;
-import org.apache.sling.feature.Extension;
-import org.apache.sling.feature.ExtensionType;
-import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.apiregions.model.ApiRegion;
-import org.apache.sling.feature.apiregions.model.ApiRegions;
-import org.apache.sling.feature.apiregions.model.io.json.ApiRegionsJSONSerializer;
-import org.apache.sling.feature.apiregions.model.io.json.JSONConstants;
-import org.junit.Before;
-import org.junit.Test;
-
-public final class ApiRegionsJSONSerializerTest {
-
-    private ApiRegions apiRegions;
-
-    private String expected;
-
-    @Before
-    public void setUp() {
-        apiRegions = new ApiRegions();
-
-        ApiRegion base = apiRegions.addNew("base");
-        base.add("org.apache.felix.inventory");
-        base.add("org.apache.felix.metatype");
-
-        ApiRegion extended = apiRegions.addNew("extended");
-        extended.add("org.apache.felix.scr.component");
-        extended.add("org.apache.felix.scr.info");
-
-        expected = "[\n" + 
-                "  {\n" + 
-                "    \"name\":\"base\",\n" + 
-                "    \"exports\":[\n" + 
-                "      \"org.apache.felix.metatype\",\n" + 
-                "      \"org.apache.felix.inventory\"\n" + 
-                "    ]\n" + 
-                "  },\n" + 
-                "  {\n" + 
-                "    \"name\":\"extended\",\n" + 
-                "    \"exports\":[\n" + 
-                "      \"org.apache.felix.scr.component\",\n" + 
-                "      \"org.apache.felix.scr.info\"\n" + 
-                "    ]\n" + 
-                "  }\n" + 
-                "]";
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void nullOutputStreamNotAccepted() {
-        ApiRegionsJSONSerializer.serializeApiRegions(null, (OutputStream) null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void nullApiRegionsNotAccepted() {
-        ApiRegionsJSONSerializer.serializeApiRegions(null, (Writer) null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void nullWriterNotAccepted() {
-        ApiRegionsJSONSerializer.serializeApiRegions(new ApiRegions(), (Writer) null);
-    }
-
-    @Test
-    public void stringSerialization() {
-        StringWriter writer = new StringWriter();
-        ApiRegionsJSONSerializer.serializeApiRegions(apiRegions, writer);
-
-        String actual = writer.toString();
-
-        assertEquals(expected, actual);
-    }
-
-    @Test
-    public void extensionCreation() {
-        Extension extension = ApiRegionsJSONSerializer.serializeApiRegions(apiRegions);
-        extensionAssertions(extension);
-    }
-
-    @Test
-    public void addExtensionToFeature() {
-        Feature feature = new Feature(ArtifactId.fromMvnId("org.apache.sling:org.apache.sling.feature.apiregions:1.0.0"));
-
-        ApiRegionsJSONSerializer.serializeApiRegions(apiRegions, feature);
-
-        Extension extension = feature.getExtensions().getByName(JSONConstants.API_REGIONS_KEY);
-        extensionAssertions(extension);
-    }
-
-    private void extensionAssertions(Extension extension) {
-        assertNotNull(extension);
-        assertEquals(ExtensionType.JSON, extension.getType());
-        assertEquals(JSONConstants.API_REGIONS_KEY, extension.getName());
-        assertFalse(extension.isRequired());
-        assertTrue(extension.isOptional());
-        assertEquals(expected, extension.getJSON());
-    }
-
-}