/** * A utility method to create a Maven artifact resource loader for the given artifact name. * * @param name the artifact name * @return the resource loader * @throws IOException if the artifact could not be resolved */ public static ResourceLoader createMavenArtifactLoader(final String name) throws IOException { return createMavenArtifactLoader(MavenResolver.createDefaultResolver(), name); }
/** * A utility method to create a Maven artifact resource loader for the given artifact name. * * @param name the artifact name * @return the resource loader * @throws IOException if the artifact could not be resolved */ public static ResourceLoader createMavenArtifactLoader(final String name) throws IOException { return createMavenArtifactLoader(MavenResolver.createDefaultResolver(), name); }
/** * Parse a {@code module.xml} file. * * @param factory the resource root factory to use (must not be {@code null}) * @param rootPath the root path to send in to the resource root factory (must not be {@code null}) * @param source a stream of the {@code module.xml} content (must not be {@code null}) * @param moduleInfoFile the {@code File} of the {@code module.xml} content (must not be {@code null}) * @param moduleLoader the module loader to use for dependency specifications (must not be {@code null}) * @param moduleName the module name of the module to load * @return a module specification * @throws ModuleLoadException if a dependency could not be established or another error occurs * @throws IOException if I/O fails */ public static ModuleSpec parseModuleXml(final ResourceRootFactory factory, final String rootPath, InputStream source, final String moduleInfoFile, final ModuleLoader moduleLoader, final String moduleName) throws ModuleLoadException, IOException { return parseModuleXml(factory, MavenResolver.createDefaultResolver(), rootPath, source, moduleInfoFile, moduleLoader, moduleName); }
/** * Parse a {@code module.xml} file. * * @param factory the resource root factory to use (must not be {@code null}) * @param rootPath the root path to send in to the resource root factory (must not be {@code null}) * @param source a stream of the {@code module.xml} content (must not be {@code null}) * @param moduleInfoFile the {@code File} of the {@code module.xml} content (must not be {@code null}) * @param moduleLoader the module loader to use for dependency specifications (must not be {@code null}) * @param moduleIdentifier the module identifier of the module to load * @return a module specification * @throws ModuleLoadException if a dependency could not be established or another error occurs * @throws IOException if I/O fails * @deprecated Use {@link #parseModuleXml(ResourceRootFactory, String, InputStream, String, ModuleLoader, String)} instead. */ @Deprecated public static ModuleSpec parseModuleXml(final ResourceRootFactory factory, final String rootPath, InputStream source, final String moduleInfoFile, final ModuleLoader moduleLoader, final ModuleIdentifier moduleIdentifier) throws ModuleLoadException, IOException { return parseModuleXml(factory, MavenResolver.createDefaultResolver(), rootPath, source, moduleInfoFile, moduleLoader, moduleIdentifier); }