Ejemplo n.º 1
0
 @Configuration
 public Option[] config() {
   return new Option[] {
     jcloudsDistributionConfiguration(),
     keepRuntimeFolder(),
     logLevel(LogLevelOption.LogLevel.ERROR),
     systemProperty("jclouds.aws.identity"),
     systemProperty("jclouds.aws.credential"),
     systemProperty(
         "jclouds.karaf.version",
         MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),
     systemProperty(
         "jclouds.version", MavenUtils.getArtifactVersion(JCLOUDS_GROUP_ID, JCLOUDS_ARTIFACT_ID)),
     systemProperty(
         "jclouds.featureURL",
         String.format(
             JCLOUDS_FEATURE_FORMAT,
             MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID))),
     scanFeatures(
             String.format(
                 JCLOUDS_FEATURE_FORMAT,
                 MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),
             "jclouds",
             "jclouds-commands",
             "jclouds-aws-s3")
         .start()
   };
 }
Ejemplo n.º 2
0
 @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))
   };
 }
Ejemplo n.º 3
0
  protected Option[] configureSystemSettings() {

    return options(
        when(Boolean.getBoolean("isDebugEnabled"))
            .useOptions(vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005")),
        when(System.getProperty("maven.repo.local") != null)
            .useOptions(
                systemProperty("org.ops4j.pax.url.mvn.localRepository")
                    .value(System.getProperty("maven.repo.local", ""))),
        editConfigurationFilePut(
            "etc/system.properties",
            "ddf.version",
            MavenUtils.getArtifactVersion("ddf.test.itests", "test-itests-common")));
  }
Ejemplo n.º 4
0
 /**
  * Create an {@link org.ops4j.pax.exam.Option} for using a ESB distribution.
  *
  * @return
  */
 protected Option[] esbDistributionConfiguration(String distroArtifactId) {
   if (distroArtifactId == null) {
     distroArtifactId = ARTIFACT_ID;
   }
   return new Option[] {
     karafDistributionConfiguration()
         .frameworkUrl(
             maven()
                 .groupId("org.jboss.fuse")
                 .artifactId(distroArtifactId)
                 .versionAsInProject()
                 .type("zip"))
         .karafVersion(MavenUtils.getArtifactVersion("org.jboss.fuse", distroArtifactId))
         .name("JBoss Fuse")
         .unpackDirectory(new File("target/exam")),
     useOwnExamBundlesStartLevel(50),
     editConfigurationFilePut("etc/config.properties", "karaf.startlevel.bundle", "50"),
     editConfigurationFilePut(
         "etc/config.properties", "karaf.startup.message", "Loading Fuse from: ${karaf.home}"),
     editConfigurationFilePut("etc/users.properties", "admin", "admin,admin"),
     mavenBundle(
         "org.fusesource.tooling.testing",
         "pax-exam-karaf",
         MavenUtils.getArtifactVersion("org.fusesource.tooling.testing", "pax-exam-karaf")),
     mavenBundle(
         "org.jboss.fuse.itests",
         "esb-itests-common",
         MavenUtils.getArtifactVersion("org.jboss.fuse.itests", "esb-itests-common")),
     mavenBundle(
         "io.fabric8.itests",
         "fabric-itests-common",
         MavenUtils.getArtifactVersion("io.fabric8.itests", "fabric-itests-common")),
     keepRuntimeFolder(),
     logLevel(LogLevelOption.LogLevel.ERROR)
   };
 }
  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;
  }
  @Configuration
  public static Option[] configure() {
    return new Option[] {
      karafDistributionConfiguration()
          .frameworkUrl(
              maven()
                  .groupId("org.apache.karaf")
                  .artifactId("apache-karaf")
                  .type("tar.gz")
                  .versionAsInProject())
          // This version doesn't affect the version of karaf we use
          .karafVersion(MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf"))
          .name("Apache Karaf")
          .unpackDirectory(new File("target/exam/unpack/")),
      keepRuntimeFolder(),
      logLevel(LogLevelOption.LogLevel.INFO),

      // Load camel-core, camel-sprig, camel-test & camel-cxf Features
      loadCamelFeatures("camel-cxf"),

      // Load drools-module (= core + compiler + knowledge), drools-camel & drools-spring
      loadDroolsFeatures("drools-camel", "drools-spring")
    };
  }
Ejemplo n.º 7
0
 public static String getTestVersion() {
   return MavenUtils.getArtifactVersion("org.openeos", "org.openeos.test");
 }