Пример #1
0
    @Override
    public FabBundleInfo getInfo() throws IOException {
      try {
        Map<String, Object> embeddedResources = new HashMap<String, Object>();
        Properties instructions = createInstructions(embeddedResources);

        PreConditionException.validateNotNull(instructions, "Instructions");
        String fabUri = instructions.getProperty(ServiceConstants.INSTR_FAB_URL);
        if (fabUri == null || fabUri.trim().length() == 0) {
          throw new IOException(
              "Instructions file must contain a property named " + ServiceConstants.INSTR_FAB_URL);
        }

        FabBundleInfo info =
            new FabBundleInfoImpl(
                classPathResolver,
                fabUri,
                instructions,
                getConfiguration(),
                embeddedResources,
                resolvePomDetails());
        return info;
      } catch (IOException e) {
        throw e;
      } catch (Exception e) {
        throw new IOException(e.getMessage(), e);
      }
    }
Пример #2
0
 protected void logFailure(Exception e) {
   LOG.error(e.getMessage());
   Throwable cause = e.getCause();
   if (cause != null && cause != e) {
     LOG.error("Caused by: " + e, e);
   }
 }