public static LoadPomTask loadPomFromClassLoaderResource(String pathToPomResource, ClassLoader cl, String... profiles) throws IllegalArgumentException, InvalidConfigurationFileException { Validate.notNullOrEmpty(pathToPomResource, "path to CL resource must be specified"); Validate.notNull(cl, "ClassLoader must be specified"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(pathToPomResource, cl); return new LoadPomTask(file, profiles); }
public static LoadPomTask loadPomFromClassLoaderResource(String pathToPomResource, ClassLoader cl, String... profiles) throws IllegalArgumentException, InvalidConfigurationFileException { Validate.notNullOrEmpty(pathToPomResource, "path to CL resource must be specified"); Validate.notNull(cl, "ClassLoader must be specified"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(pathToPomResource, cl); return new LoadPomTask(file, profiles); }
/** * Checks that the specified array is not null or contain any null values. * * @param objects * The object to check * @param message * The exception message */ public static void notNullAndNoNullValues(final Object[] objects, final String message) { notNull(objects, message); for (Object object : objects) { notNull(object, message); } }
/** * Checks that the specified array is not null or contain any null values. * * @param objects * The object to check * @param message * The exception message */ public static void notNullAndNoNullValues(final Object[] objects, final String message) { notNull(objects, message); for (Object object : objects) { notNull(object, message); } }
public static LoadPomTask loadPomFromFile(final File pomFile, final String... profiles) { Validate.notNull(pomFile, "POM file must be specified"); return new LoadPomTask(pomFile, profiles); }
public static LoadPomTask loadPomFromFile(final File pomFile, final String... profiles) { Validate.notNull(pomFile, "POM file must be specified"); return new LoadPomTask(pomFile, profiles); }
@Override public <RETURNTYPE> RETURNTYPE[] as(Class<RETURNTYPE> returnTypeClass) throws IllegalArgumentException, UnsupportedOperationException { Validate.notNull(returnTypeClass, "Return type class must not be null"); final FormatProcessor<? super MavenResolvedArtifact, RETURNTYPE> processor = FormatProcessors.find( MavenResolvedArtifact.class, returnTypeClass); @SuppressWarnings("unchecked") final RETURNTYPE[] array = (RETURNTYPE[]) Array.newInstance(returnTypeClass, artifacts.size()); int i = 0; for (final MavenResolvedArtifact artifact : artifacts) { array[i++] = processor.process(artifact, returnTypeClass); } return array; }
@Override public <RETURNTYPE> RETURNTYPE[] as(Class<RETURNTYPE> returnTypeClass) throws IllegalArgumentException, UnsupportedOperationException { Validate.notNull(returnTypeClass, "Return type class must not be null"); final FormatProcessor<? super MavenResolvedArtifact, RETURNTYPE> processor = FormatProcessors.find( MavenResolvedArtifact.class, returnTypeClass); @SuppressWarnings("unchecked") final RETURNTYPE[] array = (RETURNTYPE[]) Array.newInstance(returnTypeClass, artifacts.size()); int i = 0; for (final MavenResolvedArtifact artifact : artifacts) { array[i++] = processor.process(artifact, returnTypeClass); } return array; }
@Override public MavenWorkingSession execute(final MavenWorkingSession session) { Validate.notNull(pomFile, "Path to pom.xml file must not be null"); Validate.readable(pomFile, "Path to the POM ('" + pomFile + "') file must be defined and accessible"); return session.loadPomFromFile(pomFile, profiles); }
@Override public MavenWorkingSession execute(final MavenWorkingSession session) { Validate.notNull(pomFile, "Path to pom.xml file must not be null"); Validate.readable(pomFile, "Path to the POM ('" + pomFile + "') file must be defined and accessible"); return session.loadPomFromFile(pomFile, profiles); }
@Override public ConfiguredMavenImporter configureFromFile(File file) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.notNull(file, "settings file must be specified"); Validate.readable(file, "settings file is not readable: " + file.getAbsolutePath()); new ConfigureSettingsFromFileTask(file).execute(session); return this; }
@Override public ConfiguredMavenImporter configureFromFile(File file) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.notNull(file, "settings file must be specified"); Validate.readable(file, "settings file is not readable: " + file.getAbsolutePath()); new ConfigureSettingsFromFileTask(file).execute(session); return this; }
private UNCONFIGURABLERESOLVERSYSTEMTYPE configureFromClassloaderResource(final String path, final ClassLoader loader) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.isNullOrEmpty(path); Validate.notNull(loader, "ClassLoader is required"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(path, loader); return this.fromFile(file); }
@Override public ConfiguredMavenImporter configureFromClassloaderResource(String path, ClassLoader cl) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.isNullOrEmpty(path); Validate.notNull(cl, "ClassLoader is required"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(path, cl); return this.configureFromFile(file); }
@Override public ConfiguredMavenImporter configureFromClassloaderResource(String path, ClassLoader cl) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.isNullOrEmpty(path); Validate.notNull(cl, "ClassLoader is required"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(path, cl); return this.configureFromFile(file); }
private UNCONFIGURABLERESOLVERSYSTEMTYPE configureFromClassloaderResource(final String path, final ClassLoader loader) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException { Validate.isNullOrEmpty(path); Validate.notNull(loader, "ClassLoader is required"); final File file = FileUtil.INSTANCE.fileFromClassLoaderResource(path, loader); return this.fromFile(file); }
@Override public UNCONFIGURABLERESOLVERSYSTEMTYPE fromFile(File file) throws IllegalArgumentException, InvalidConfigurationFileException { Validate.notNull(file, "settings file must be specified"); Validate.readable(file, "settings file is not readable: " + file.getAbsolutePath()); new ConfigureSettingsFromFileTask(file).execute(this.getSession()); return this.getUnconfigurableView(); }
@Override public UNCONFIGURABLERESOLVERSYSTEMTYPE fromFile(File file) throws IllegalArgumentException, InvalidConfigurationFileException { Validate.notNull(file, "settings file must be specified"); Validate.readable(file, "settings file is not readable: " + file.getAbsolutePath()); new ConfigureSettingsFromFileTask(file).execute(this.getSession()); return this.getUnconfigurableView(); }