MavenModel (Model model, List<String> sources, List<String> testSources) { MavenModel result = new MavenModel(); result.setMavenId(new MavenId(model.getGroupId(), model.getArtifactId(), model.getVersion())); Parent parent = model.getParent(); if (parent != null) { result.setParent(new MavenParent(new MavenId(parent.getGroupId(), parent.getArtifactId(), parent.getVersion()), parent.getRelativePath())); } result.setPackaging(model.getPackaging()); result.setName(model.getName()); result.setProperties(model.getProperties() == null ? new Properties() : model.getProperties()); result.setPlugins(convertPlugins(model)); result.setRemoteRepositories(convertRepositories(model.getRepositories())); result.setProfiles(convertProfiles(model.getProfiles())); result.setModules(model.getModules()); convertBuild(result.getBuild(), model.getBuild(), sources, testSources); return result; }