@Configuration
 public Option[] config() {
   return new Option[] {
     new DefaultCompositeOption(fabricDistributionConfiguration()),
     // debugConfiguration("5005",true),
     editConfigurationFilePut(
         "etc/system.properties",
         "fabric.version",
         MavenUtils.asInProject().getVersion(GROUP_ID, ARTIFACT_ID))
   };
 }
  private static String getKarafVersion() {
    String karafVersion = System.getProperty(PROP_KARAF_VERSION);
    if (karafVersion == null) {
      if (System.getProperty(PROP_KARAF_DISTRIBUTION_FILE) != null) {
        throw new RuntimeException(
            "When you are running against custom container "
                + "it is necessary to define Karaf version by defining system property karaf.version.");
      }

      // set the Karaf version defined by Maven
      VersionResolver versionResolver = MavenUtils.asInProject();
      karafVersion = versionResolver.getVersion(KARAF_GROUP_ID, KARAF_ARTIFACT_ID);
    }
    return karafVersion;
  }