Package org.jboss.shrinkwrap.resolver.api

Examples of org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException


            int counter = 1;
            for (ModelProblem problem : e.getProblems()) {
                sb.append(counter++).append("/ ").append(problem).append("\n");
            }

            throw new InvalidConfigurationFileException(sb.toString());
        }

        // get and update model
        Model model = result.getEffectiveModel();
        this.model = model;
View Full Code Here


            Validate.isReadable(resolvedPath, "Path to the settings.xml ('" + pathToSettingsXmlFile
                    + "') must be defined and accessible");
        }
        // rewrap exception
        catch (IllegalArgumentException e) {
            throw new InvalidConfigurationFileException(e.getMessage());
        }
        this.settingsXmlFile = new File(resolvedPath);
    }
View Full Code Here

            Validate.isReadable(settingsXmlFile, "Path to the settings.xml ('" + settingsXmlFile
                    + "') must be defined and accessible");
        }
        // rewrap exception
        catch (IllegalArgumentException e) {
            throw new InvalidConfigurationFileException(e.getMessage());
        }

        final MavenWorkingSession newSession = session.configureSettingsFromFile(null, settingsXmlFile);
        return newSession.regenerateSession();
    }
View Full Code Here

    }

    private String getMaster() throws SecDispatcherException, InvalidConfigurationFileException {

        if (securitySettings == null) {
            throw new InvalidConfigurationFileException(
                    "Unable to get security configuration from " + securitySettingsPath.getPath()
                            + ". Please define path to the settings-security.xml file via -D" +
                            MavenSettingsBuilder.ALT_SECURITY_SETTINGS_XML_LOCATION
                            + ", or put it the the default location defined by Maven.");
        }
        String master = securitySettings.getMaster();

        if (master == null) {
            throw new InvalidConfigurationFileException("Security configuration from " + securitySettingsPath.getPath()
                    + " does not contain master password");
        }

        try {
            return cipher.decryptDecorated(master, DEFAULT_PASSPHRASE);
View Full Code Here

                        }
                    }
                    final String topLevel = reader.getLocalName();

                    if (!"settings".equals(topLevel)) {
                        throw new InvalidConfigurationFileException("Invalid format settings.xml found: "
                                + userSettingsFile);
                    }
                } catch (final FileNotFoundException e) {
                    // Ignore at this level
                } catch (final XMLStreamException xmlse) {
                    throw new RuntimeException("Could not check file format of specified settings.xml: "
                            + userSettingsFile, xmlse);
                }

            }

            result = builder.build(request);
        }
        // wrap exception message
        catch (SettingsBuildingException e) {
            StringBuilder sb = new StringBuilder("Found ").append(e.getProblems().size())
                    .append(" problems while building settings.xml model from both global Maven configuration file")
                    .append(request.getGlobalSettingsFile()).append(" and/or user configuration file: ")
                    .append(request.getUserSettingsFile()).append("\n");

            int counter = 1;
            for (SettingsProblem problem : e.getProblems()) {
                sb.append(counter++).append("/ ").append(problem).append("\n");
            }

            throw new InvalidConfigurationFileException(sb.toString());
        }

        // get settings object and update it according to property values
        Settings settings = result.getEffectiveSettings();
        settings = enrichWithLocalRepository(settings);
View Full Code Here

            int counter = 1;
            for (SettingsProblem problem : result.getProblems()) {
                sb.append(counter++).append("/ ").append(problem).append("\n");
            }

            throw new InvalidConfigurationFileException(sb.toString());
        }

        settings.setProxies(result.getProxies());
        settings.setServers(result.getServers());
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException

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.