Examples of NexusConfigurationXpp3Reader


Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

  public Configuration loadNexusConfig()
      throws IOException
  {
    final File nexusConfigFile = getNexusConfigurationFile();
    final NexusConfigurationXpp3Reader reader = new NexusConfigurationXpp3Reader();

    try (FileInputStream in = new FileInputStream(nexusConfigFile)) {
      return reader.read(in, false);
    }
    catch (XmlPullParserException e) {
      log.error(e.getMessage(), e);
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

  }

  protected Configuration loadNexusConfig(File configFile)
      throws Exception
  {
    NexusConfigurationXpp3Reader reader = new NexusConfigurationXpp3Reader();

    try (Reader fr = new FileReader(configFile)) {
      return reader.read(fr);
    }

  }
View Full Code Here

Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

    File configFile = new File(getNexusConfiguration());

    // raw load the config file in place
    FileReader fileReader = new FileReader(configFile);

    NexusConfigurationXpp3Reader reader = new NexusConfigurationXpp3Reader();

    Configuration config = reader.read(fileReader);

    fileReader.close();

    CRepository publicGroup = null;
View Full Code Here

Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

      throws IOException, ConfigurationException
  {
    Reader fr = null;

    try {
      NexusConfigurationXpp3Reader reader = new NexusConfigurationXpp3Reader();

      fr = new InputStreamReader(is);

      InterpolatorFilterReader ip = new InterpolatorFilterReader(fr, interpolatorProvider.getInterpolator());

      // read again with interpolation
      configuration = reader.read(ip);
    }
    catch (XmlPullParserException e) {
      configuration = null;

      throw new ConfigurationException("Nexus configuration file was not loaded, it has the wrong structure.", e);
View Full Code Here

Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

  private void setupEmailConfig()
      throws IOException, XmlPullParserException
  {
    try (FileInputStream fis = new FileInputStream(this.getNexusConfiguration())) {
      NexusConfigurationXpp3Reader reader = new NexusConfigurationXpp3Reader();
      Configuration config = reader.read(fis);

      config.getSmtpConfiguration().setPort(this.emailServerPort);
      config.getSmtpConfiguration().setHostname("localhost");
      // config.getSmtpConfiguration().setDebugMode( true );
View Full Code Here

Examples of org.sonatype.nexus.configuration.model.io.xpp3.NexusConfigurationXpp3Reader

  @Test
  public void modifyConfiguration()
      throws Exception
  {
    final Configuration configuration = new NexusConfigurationXpp3Reader().read(
        new FileInputStream(util.resolveFile("target/test-classes/nexus.xml"))
    );

    modifier.apply(configuration);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.