profile.setId( profileXmlProfile.getId() );
private static void extractProfiles(Set<String> profileIds, File file) { extractProfilesFromModelLineage(file, profileIds); File basedir = FileUtil.normalizeFile(file.getParentFile()); FileObject fileObject = FileUtil.toFileObject(basedir); //read from profiles.xml Iterator it2 = MavenSettingsSingleton.createProfilesModel(fileObject).getProfiles().iterator(); while (it2.hasNext()) { org.apache.maven.profiles.Profile prof = (org.apache.maven.profiles.Profile) it2.next(); profileIds.add(prof.getId()); } }
while (it.hasNext()) { org.apache.maven.profiles.Profile profile = (org.apache.maven.profiles.Profile) it.next(); if (PROFILE_PRIVATE.equals(profile.getId())) { privateProfile = profile; break;
/** * Method updateProfile. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateProfile(Profile value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); updateActivation( value.getActivation(), "activation", innerCount, root); findAndReplaceProperties(innerCount, root, "properties", value.getProperties()); iterateRepository(innerCount, root, value.getRepositories(),"repositories","repository"); iterateRepository(innerCount, root, value.getPluginRepositories(),"pluginRepositories","pluginRepository"); } //-- void updateProfile(Profile, String, Counter, Element)
/** * Method updateProfile * * @param value * @param element * @param counter * @param xmlTag */ protected void updateProfile(Profile value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); updateActivation( value.getActivation(), "activation", innerCount, root); findAndReplaceProperties(innerCount, root, "properties", value.getProperties()); iterateRepository(innerCount, root, value.getRepositories(),"repositories","repository"); iterateRepository(innerCount, root, value.getPluginRepositories(),"pluginRepositories","pluginRepository"); } //-- void updateProfile(Profile, String, Counter, Element)