Package org.sonatype.configuration.upgrade

Examples of org.sonatype.configuration.upgrade.ConfigurationIsCorruptedException


    try (Reader r = new BufferedReader(ReaderFactory.newXmlReader(file))) {
      // reading without interpolation to preserve user settings as variables
      return new org.sonatype.security.configuration.model.v2_0_5.io.xpp3.SecurityConfigurationXpp3Reader().read(r);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }
  }
View Full Code Here


    try (Reader r = new BufferedReader(ReaderFactory.newXmlReader(file))) {
      // reading without interpolation to preserve user settings as variables
      return new org.sonatype.security.configuration.model.v2_0_7.io.xpp3.SecurityConfigurationXpp3Reader().read(r);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }
  }
View Full Code Here

    try (Reader r = new BufferedReader(ReaderFactory.newXmlReader(file))) {
      // reading without interpolation to preserve user settings as variables
      return new org.sonatype.security.configuration.model.v2_0_4.io.xpp3.SecurityConfigurationXpp3Reader().read(r);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }
  }
View Full Code Here

      SecurityConfigurationXpp3Reader reader = new SecurityConfigurationXpp3Reader();

      return reader.read(r);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }
    finally {
      if (r != null) {
        r.close();
      }
View Full Code Here

      Xpp3Dom dom = Xpp3DomBuilder.build(r);

      modelVersion = dom.getChild("version").getValue();
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }

    if (SecurityConfiguration.MODEL_VERSION.equals(modelVersion)) {
      // we have a problem here, model version is OK but we could not load it previously?
      throw new ConfigurationIsCorruptedException(file);
    }

    UpgradeMessage msg = new UpgradeMessage();

    msg.setModelVersion(modelVersion);
View Full Code Here

          new org.sonatype.nexus.configuration.model.v2_7_0.io.xpp3.NexusConfigurationXpp3Reader();

      conf = reader.read(fr);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }

    return conf;
  }
View Full Code Here

          new org.sonatype.nexus.configuration.model.v2_5_0.io.xpp3.NexusConfigurationXpp3Reader();

      conf = reader.read(fr);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }

    return conf;
  }
View Full Code Here

          new org.sonatype.nexus.configuration.model.v2_0_0.io.xpp3.NexusConfigurationXpp3Reader();

      conf = reader.read(fr);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }
    finally {
      if (fr != null) {
        fr.close();
      }
View Full Code Here

          new org.sonatype.nexus.configuration.model.v2_2_0.io.xpp3.NexusConfigurationXpp3Reader();

      conf = reader.read(fr);
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }

    return conf;
  }
View Full Code Here

      Xpp3Dom dom = Xpp3DomBuilder.build(r);

      modelVersion = dom.getChild("version").getValue();
    }
    catch (XmlPullParserException e) {
      throw new ConfigurationIsCorruptedException(file.getAbsolutePath(), e);
    }

    if (Configuration.MODEL_VERSION.equals(modelVersion)) {
      // we have a problem here, model version is OK but we could not load it previously?
      throw new ConfigurationIsCorruptedException(file);
    }

    UpgradeMessage msg = new UpgradeMessage();

    msg.setModelVersion(modelVersion);
View Full Code Here

TOP

Related Classes of org.sonatype.configuration.upgrade.ConfigurationIsCorruptedException

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.