@Test(expected = fr.norad.visuwall.providers.common.MavenIdNotFoundException.class) public void should_not_find_artifact_id() throws Exception { when(documentLoader.loadFromUrl(anyString())).thenThrow(new fr.norad.visuwall.providers.common.DocumentNotLoadedException("file not found", null)); maven.findMavenIdFrom("test-project"); }
public String findMavenIdFrom(String pomUrl) throws MavenIdNotFoundException { try { Document document = documentLoader.loadFromUrl(pomUrl); return findMavenId(document); } catch (DocumentNotLoadedException e) { throw new MavenIdNotFoundException("Can't find pom at " + pomUrl, e); } }
Maven { public String findMavenIdFrom(String pomUrl) throws MavenIdNotFoundException { try { Document document = documentLoader.loadFromUrl(pomUrl); return findMavenId(document); } catch (DocumentNotLoadedException e) { throw new MavenIdNotFoundException("Can't find pom at " + pomUrl, e); } } }
Maven { public String findMavenIdFrom(String pomUrl) throws MavenIdNotFoundException { try { Document document = documentLoader.loadFromUrl(pomUrl); return findMavenId(document); } catch (DocumentNotLoadedException e) { throw new MavenIdNotFoundException("Can't find pom at " + pomUrl, e); } }  }
Maven { public String findMavenIdFrom(String pomUrl) throws MavenIdNotFoundException { try { Document document = documentLoader.loadFromUrl(pomUrl); return findMavenId(document); } catch (DocumentNotLoadedException e) { throw new MavenIdNotFoundException("Can't find pom at " + pomUrl, e); } }  String findMavenIdFrom(String pomUrl); String findMavenIdFromContent(String pomContent); }
Maven { public String findMavenIdFrom(String pomUrl) throws MavenIdNotFoundException { try { Document document = documentLoader.loadFromUrl(pomUrl); return findMavenId(document); } catch (DocumentNotLoadedException e) { throw new MavenIdNotFoundException("Can't find pom at " + pomUrl, e); } }  String findMavenIdFrom(String pomUrl); String findMavenIdFromContent(String pomContent);  }