public class ProfileManager extends java.lang.Object implements IProfileManager
| Constructor and Description |
|---|
ProfileManager() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<org.apache.maven.model.Profile> |
collectAvailableProfiles(java.util.List<org.apache.maven.model.Model> models,
org.eclipse.core.runtime.IProgressMonitor monitor) |
private java.lang.String |
findSource(org.apache.maven.model.Profile profile,
java.util.List<org.apache.maven.model.Model> modelHierarchy) |
private java.lang.String |
getAsString(java.util.List<java.lang.String> profiles) |
java.util.Map<org.apache.maven.model.Profile,java.lang.Boolean> |
getAvailableSettingsProfiles()
Returns an unmodifiable
Map of all available Profiles converted from the
org.apache.maven.profiles.Profiles as defined in settings.xml.The value of each Entry indicates if the profile is active. |
protected java.util.List<org.apache.maven.model.Model> |
getModelHierarchy(java.util.List<org.apache.maven.model.Model> models,
org.apache.maven.model.Model projectModel,
org.eclipse.core.runtime.IProgressMonitor monitor) |
java.util.List<ProfileData> |
getProfileDatas(IMavenProjectFacade facade,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a List of
ProfileData for the given mavenProjectFacade |
private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> |
getProjectRepositories(org.apache.maven.model.Model projectModel) |
private org.apache.maven.repository.RepositorySystem |
getRepositorySystem() |
private boolean |
isActive(org.apache.maven.settings.Profile p,
java.util.List<java.lang.String> activeProfiles) |
private boolean |
isActive(java.lang.String profileId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> profilesMap) |
private org.apache.maven.model.Model |
resolvePomModel(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories,
org.eclipse.core.runtime.IProgressMonitor monitor) |
private java.util.List<java.lang.String> |
toList(java.lang.String profilesAsText) |
void |
updateActiveProfiles(IMavenProjectFacade mavenProjectFacade,
java.util.List<java.lang.String> profiles,
boolean isOffline,
boolean isForceUpdate,
org.eclipse.core.runtime.IProgressMonitor monitor)
Update the profiles of the resolver configuration of a
IMavenProjectFacade synchronously. |
public void updateActiveProfiles(IMavenProjectFacade mavenProjectFacade, java.util.List<java.lang.String> profiles, boolean isOffline, boolean isForceUpdate, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
IProfileManagerIMavenProjectFacade synchronously.updateActiveProfiles in interface IProfileManagermavenProjectFacade - a facade of the maven projectprofiles - the profile ids to use in the project's resolver configurationisOffline - indicates if the maven request must be executed offlineisForceUpdate - indicates if a check for updated releases and snapshots on remote repositories must be forced.monitor - a progress monitororg.eclipse.core.runtime.CoreExceptionprivate java.lang.String getAsString(java.util.List<java.lang.String> profiles)
public java.util.Map<org.apache.maven.model.Profile,java.lang.Boolean> getAvailableSettingsProfiles()
throws org.eclipse.core.runtime.CoreException
IProfileManagerMap of all available Profiles converted from the
org.apache.maven.profiles.Profiles as defined in settings.xml.Entry indicates if the profile is active.getAvailableSettingsProfiles in interface IProfileManagerMap of all the available profiles for a given project.org.eclipse.core.runtime.CoreExceptionprivate boolean isActive(org.apache.maven.settings.Profile p,
java.util.List<java.lang.String> activeProfiles)
public java.util.List<ProfileData> getProfileDatas(IMavenProjectFacade facade, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
IProfileManagerProfileData for the given mavenProjectFacadegetProfileDatas in interface IProfileManagerfacade - a facade of the maven projectmonitor - a progress monitorProfileData for the given mavenProjectFacade.org.eclipse.core.runtime.CoreExceptionprivate boolean isActive(java.lang.String profileId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> profilesMap)
private java.util.List<java.lang.String> toList(java.lang.String profilesAsText)
private java.lang.String findSource(org.apache.maven.model.Profile profile,
java.util.List<org.apache.maven.model.Model> modelHierarchy)
protected java.util.List<org.apache.maven.model.Profile> collectAvailableProfiles(java.util.List<org.apache.maven.model.Model> models,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected java.util.List<org.apache.maven.model.Model> getModelHierarchy(java.util.List<org.apache.maven.model.Model> models,
org.apache.maven.model.Model projectModel,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprivate java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getProjectRepositories(org.apache.maven.model.Model projectModel)
private org.apache.maven.repository.RepositorySystem getRepositorySystem()
private org.apache.maven.model.Model resolvePomModel(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException