Author: fbricon
Date: 2011-12-06 10:35:54 -0500 (Tue, 06 Dec 2011)
New Revision: 37001
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/profiles/ProfileManager.java
Log:
JBIDE-10170 : fix activation detection on profiles from settings.xml
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/profiles/ProfileManager.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/profiles/ProfileManager.java 2011-12-06
15:06:07 UTC (rev 37000)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/profiles/ProfileManager.java 2011-12-06
15:35:54 UTC (rev 37001)
@@ -37,8 +37,6 @@
public class ProfileManager implements IProfileManager {
- private static final String ARTIFACT_SEPARATOR = ":"; //$NON-NLS-1$
-
public void updateActiveProfiles(final IMavenProjectFacade mavenProjectFacade,
final List<String> profiles,
final boolean isOffline,
@@ -90,7 +88,7 @@
for (org.apache.maven.settings.Profile sp : settings.getProfiles()) {
Profile p = SettingsUtils.convertFromSettingsProfile(sp);
- boolean isAutomaticallyActivated = isActive2(p, activeProfiles);
+ boolean isAutomaticallyActivated = isActive(sp, activeProfiles);
settingsProfiles.put(p, isAutomaticallyActivated);
}
return Collections.unmodifiableMap(settingsProfiles);
@@ -105,7 +103,10 @@
return false;
}
- private boolean isActive2(Profile p, List<String> activeProfiles) {
+ private boolean isActive(org.apache.maven.settings.Profile p, List<String>
activeProfiles) {
+ if (p.getActivation() != null && p.getActivation().isActiveByDefault()){
+ return true;
+ }
for (String activeProfile : activeProfiles) {
if (activeProfile.equals(p.getId())) {
return true;
Show replies by date