anchor.diff:  [source,xml]
   ----
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  -<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="gradle-karaf-features-plugin-examples">
  -  <repository>mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0/xml/features</repository>
  +<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="my.project-0.0.1">
     <repository>mvn:org.apache.karaf.features/standard/4.0.0/xml/features</repository>
  -  <feature name="common" version="0.0.1" description="Common dependencies">
  +  <feature name="my-feature1" version="0.0.1" description="Includes runtime and foo dependencies">
       <bundle>mvn:com.google.guava/guava/19.0</bundle>
       <bundle>mvn:commons-io/commons-io/2.4</bundle>
  -    <capability></capability>
  -  </feature>
  -  <feature name="rest" version="0.0.1" description="REST dependencies">
  +  </feature>
  +  <feature name="my-feature2" version="0.0.1" description="Includes runtime, bar and baz dependencies">
       <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
       <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
       <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
       <!--
           as squareup's jars a re not OSGi ready, the plugin automatically adds wrap instruction
       -->
  -    <bundle>wrap:mvn:com.squareup.okio/okio/1.6.0</bundle>
  -    <bundle>wrap:mvn:com.squareup.okhttp3/okhttp/3.2.0</bundle>
       <bundle>wrap:mvn:com.squareup.retrofit2/retrofit/2.0.0</bundle>
  -    <capability></capability>
  -  </feature>
  -  <feature name="aries-blueprint" version="0.0.1" description="Aries Blueprint">
  +  </feature>
  +  <feature name="my-feature3" version="0.0.1" description="Feature with capabilities">
       <feature>aries-proxy</feature>
  -    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
  -    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.8</bundle>
  -    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
  -    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.6.0</bundle>
  +    <bundle start-level="20">mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
  +    <bundle start-level="20">mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
  +    <bundle start-level="20">mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
       <conditional>
         <condition>bundle</condition>
  -      <bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.0.4</bundle>
  +      <bundle>mvn:commons-io/commons-io/2.4</bundle>
       </conditional>
  -    <capability>osgi.service;effective:='active';resolution:='mandatory';objectClass=org.apache.aries.blueprint.services.ParserService,osgi.extender;effective:='resolve';resolution:='mandatory';osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"</capability>
  -  </feature>
  -  <feature name="hazelcast" version="1.2.3" description="In memory data grid">
  -    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast</configfile>
  -    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast-clustered</configfile>
  -    <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
  -    <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.2</bundle>
  -    <bundle>mvn:com.hazelcast/hazelcast-all/3.6.1</bundle>
  +    <capability>osgi.service;effective:='active';resolution:='mandatory';objectClass=org.apache.aries.blueprint.services.ParserService</capability>
  +    <capability>osgi.extender;effective:='resolve';resolution:='mandatory';osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"</capability>
  +  </feature>
  +  <feature name="my-feature4" version="0.0.1" description="Feature with config file">
  +    <configfile finalname="/etc/my-file.xml">mvn:com.my.company/my.artifact/0.0.1/xml/my-file</configfile>
  +    <configfile finalname="${karaf.etc}/my.Config.cfg" override="true">mvn:com.my.company/my.artifact/0.0.1/cfg/features</configfile>
  +    <bundle>mvn:commons-io/commons-io/2.4</bundle>
     </feature>
   </features>
   ----
  
positive.code: 
  [source,groovy]
  ----
  karafFeatures {
    name = 'featuresName'
    xsdVersion = '1.3.0'
    outputFile = file("${project.buildDir}/karaf/features/${project.name}-feature.xml")
    features {
      mainFeature {
        name = 'main-feature-name'
        feature('dependent-feature') {
  
negative.code:             }
          }
  
          // Define a feature named 'my-feature4'
          feature {
              name        = 'my-feature4'
              description = 'Feature with config file'
  
              configurations 'foo'
  
              // Add configFile entry
              configFile {
                  filename = "/etc/my-file.xml"
                  uri      = "mvn:com.my.company/my.artifact/${project.version}/xml/my-file"
              }
  
              // Add configFile entry and copy a local file to the kar repository
              configFile {
                  filename = '${karaf.etc}/my.Config.cfg'
                  file     = file("resources/my.Config.cfg")
                  uri      = "mvn:com.my.company/my.artifact/${project.version}/cfg/features"
                  override = true // (optional) Override existing configuration files within karaf. False by default
              }
          }
  