List of usage examples for org.springframework.ide.eclipse.boot.core Repo getName
public String getName()
From source file:org.springframework.ide.eclipse.boot.core.internal.MavenSpringBootProject.java
private void addReposIfNeeded(Document pom, List<Repo> repos) { //Example:/*from ww w .ja v a 2s.co m*/ // <repositories> // <repository> // <id>spring-snapshots</id> // <name>Spring Snapshots</name> // <url>https://repo.spring.io/snapshot</url> // <snapshots> // <enabled>true</enabled> // </snapshots> // </repository> // <repository> // <id>spring-milestones</id> // <name>Spring Milestones</name> // <url>https://repo.spring.io/milestone</url> // <snapshots> // <enabled>false</enabled> // </snapshots> // </repository> // </repositories> if (repos != null && !repos.isEmpty()) { Element doc = pom.getDocumentElement(); Element repoList = findChild(doc, REPOSITORIES); if (repoList == null) { repoList = createElement(doc, REPOSITORIES); format(repoList); } for (Repo repo : repos) { String id = repo.getId(); Element repoEl = findChild(repoList, REPOSITORY, childEquals(ID, id)); if (repoEl == null) { repoEl = createElement(repoList, REPOSITORY); createElementWithTextMaybe(repoEl, ID, id); createElementWithTextMaybe(repoEl, NAME, repo.getName()); createElementWithTextMaybe(repoEl, URL, repo.getUrl()); Boolean isSnapshot = repo.getSnapshotEnabled(); if (isSnapshot != null) { Element snapshot = createElement(repoEl, SNAPSHOTS); createElementWithText(snapshot, ENABLED, isSnapshot.toString()); } format(repoEl); } } } }