Package org.springframework.ide.eclipse.boot.core

Examples of org.springframework.ide.eclipse.boot.core.MavenCoordinates


        //TODO: progress monitor handling
        ISpringBootProject bootProject = SpringBootCore.create(project);

        Collection<MavenCoordinates> sources;
        sources = getProviders();
        MavenCoordinates source = chooseSource(sources);
        if (source!=null) {
          bootProject.addMavenDependency(source, preferManagedVersion);
        }
      } catch (Exception e) {
        BootActivator.log(e);
View Full Code Here


      return null;
    }

    private String toHtml(Object object) {
      if (object instanceof MavenCoordinates) {
        MavenCoordinates artifact = (MavenCoordinates) object;
        StringBuilder html = new StringBuilder();
        html.append("<li>");
        html.append("<b>"+artifact.getArtifactId()+"</b><br>");
        html.append("group: "+artifact.getGroupId()+"<br>");
        html.append("version: "+artifact.getVersion());
        html.append("</li>");
        return html.toString();
      }
      return object.toString();
    }
View Full Code Here

    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
      Object parentElement = peek();
      Object thisElement = null;
      if (qName.equals("artifact")) {
        MavenCoordinates artifact = MavenCoordinates_parse(attributes.getValue("id"));
        if (artifact!=null) {
          thisElement = artifact;
          if (parentElement!=null) {
            Assert.isLegal(parentElement instanceof MavenCoordinates, "parent of artifact should always be another artififact");
            dgraph.addEdge(thisElement, parentElement);
View Full Code Here

     */
    public MavenCoordinates MavenCoordinates_parse(String artifact) {
      String[] pieces = artifact.split(":");
      if (pieces.length==3) {
        //e.g: org.springframework:spring-core:4.0.0.RC1
        return new MavenCoordinates(intern(pieces[0]), intern(pieces[1]), intern(pieces[2]));
      } else if (pieces.length==4) {
        //e.g: org.springframework:spring-core:jar:4.0.0.RC1
        String type = pieces[2];
        if ("jar".equals(type)) {
          return new MavenCoordinates(intern(pieces[0]), intern(pieces[1]), intern(pieces[3]));
        }
      }
      throw new IllegalArgumentException("Unsupported artifact string: '"+artifact+"'");
    }
View Full Code Here

  private List<SpringBootStarter> getStarters(List<Dependency> deps) {
    if (deps != null) {
      ArrayList<SpringBootStarter> starters = new ArrayList<SpringBootStarter>();
      for (Dependency _dep : deps) {
        IMavenCoordinates dep = new MavenCoordinates(_dep.getGroupId(),
            _dep.getArtifactId(), _dep.getVersion());
        if (SpringBootStarter.isStarter(dep)) {
          starters.add(new SpringBootStarter(dep));
        }
      }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.boot.core.MavenCoordinates

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.