Package org.moxie

Examples of org.moxie.MoxieException


      LauncherSpec cs = new LauncherSpec(getProject());
      launcher = cs;
      jarSpecs.add(cs);
      return cs;
    }
    throw new MoxieException("Can only specify one launcher class");
  }
View Full Code Here


        msg = MessageFormat.format(template, e.resolvingclass, e.missingclass, tag == null ? "classpath" : ("\"" + tag + "\" classpath"), tag);
      } else {
        String template = "Unable to resolve: {0}\n\n{1} could not be located on the \"{2}\" classpath.\nPlease add the \":{2}\" tag to the appropriate dependency in your Moxie descriptor file.\n";
        msg = MessageFormat.format(template, e.resolvingclass, e.missingclass, tag);
      }
      throw new MoxieException(msg);
    }

    if (fatjar) {
      // try to merge duplicate META-INF/services files
      JarUtils.mergeMetaInfServices(console, destFile);
View Full Code Here

      Method addURL = null;
      try {
        addURL = sysclass.getDeclaredMethod("addURL", new Class[] { URL.class });
        addURL.setAccessible(true);
      } catch (Throwable t) {
        throw new MoxieException("Error, could not access class loader!", t);
      }
      for (String path : cp) {
        try {
          addURL.invoke(sysloader, new Object[] { new File(path).toURI().toURL() });
          build.getConsole().debug(1, "{0}", path);
        } catch (Throwable t) {
          throw new MoxieException(MessageFormat.format(
            "Error, could not add {0} to classloader", path), t);
        }
      }
    } else {
      build.getConsole().error("Skipping update classpath. Unexpected class loader {0}", loader.getClass().getName());
View Full Code Here

        attrValue = value.toString();
      }
      try {
        ih.setAttribute(project, object, key, attrValue);
      } catch (UnsupportedAttributeException be) {
        throw new MoxieException("{0} does not support the \"{1}\" attribute!", object instanceof Task ? ((Task) object).getTaskName() : object.getClass().getSimpleName(), key);
      }
    }
  }
View Full Code Here

          Object value = method.invoke(object, (Object[]) null);
          console.debug(1, "{0} = {1}", attrib, value);
        }     
      } catch (Exception e) {
        console.error(e);
        throw new MoxieException("failed to log {0} attributes!", object instanceof Task ? ((Task) object).getTaskName() : object.getClass().getSimpleName());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.moxie.MoxieException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.