@Test public void testGetParent() { final List<String> trail = new ArrayList<String>(); trail.add("commons-fileupload:commons-fileupload:jar:1.2.1"); trail.add("commons-codec:commons-codec:jar:1.2.1"); trail.add("commons-lang:commons-lang:jar:1.2.1"); final MvnPluginReport m = new MvnPluginReport(); final LibraryId parent = m.getParent(trail); assertEquals(new LibraryId("commons-codec", "commons-codec", "1.2.1"), parent); }
protected final LibraryId getParent(List<String> _trail) { LibraryId parent = null; if (_trail == null || _trail.size() < 2) { getLog().warn("Invalid dependency trail [" + _trail + "]"); } else if (_trail.size() == 2) { ; } else { parent = this.parseGAPV(_trail.get(_trail.size() - 2)); } return parent; }
AbstractVulasMojo extends AbstractMojo { protected final LibraryId getParent(List<String> _trail) { LibraryId parent = null; if (_trail == null || _trail.size() < 2) { getLog().warn("Invalid dependency trail [" + _trail + "]"); } else if (_trail.size() == 2) { ; } else { parent = this.parseGAPV(_trail.get(_trail.size() - 2)); } return parent; } }
AbstractVulasMojo extends AbstractMojo { protected final LibraryId getParent(List<String> _trail) { LibraryId parent = null; if (_trail == null || _trail.size() < 2) { getLog().warn("Invalid dependency trail [" + _trail + "]"); } else if (_trail.size() == 2) { ; } else { parent = this.parseGAPV(_trail.get(_trail.size() - 2)); } return parent; }  }
AbstractVulasMojo extends AbstractMojo { protected final LibraryId getParent(List<String> _trail) { LibraryId parent = null; if (_trail == null || _trail.size() < 2) { getLog().warn("Invalid dependency trail [" + _trail + "]"); } else if (_trail.size() == 2) { ; } else { parent = this.parseGAPV(_trail.get(_trail.size() - 2)); } return parent; }  final void prepareConfiguration(); void execute(); }
AbstractVulasMojo extends AbstractMojo { protected final LibraryId getParent(List<String> _trail) { LibraryId parent = null; if (_trail == null || _trail.size() < 2) { getLog().warn("Invalid dependency trail [" + _trail + "]"); } else if (_trail.size() == 2) { ; } else { parent = this.parseGAPV(_trail.get(_trail.size() - 2)); } return parent; }  final void prepareConfiguration(); void execute();  }