assert tokens.length >= 2;
return new BasicPomInfo(tokens[0], tokens[1]);
}
private static FileObject findMvnDir(Model model, BasicPomInfo basicPomInfo, String groupId)throws MvnModelInputException {
MvnModelFactory factory = new MvnModelFactory();
for (String module : model.getModules()) {
FileObject moduleFile = FileUtil.toFileObject(new File(model.getProjectDirectory(), module));
Model m = factory.createModel(moduleFile);
String tmpGroupId = m.getGroupId() == null ? groupId : m.getGroupId();
if (tmpGroupId.equals(basicPomInfo.getGroupId()) && m.getArtifactId().equals(basicPomInfo.getArtifactId())) {
return moduleFile;
} else {
FileObject o = findMvnDir(m, basicPomInfo, tmpGroupId);