diff options
32 files changed, 1381 insertions, 1162 deletions
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..02580fb0 --- /dev/null +++ b/org.eclipse.m2e.core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Thu Dec 23 16:51:23 EST 2010 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMaven.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMaven.java index 651cf9a8..885e7268 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMaven.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMaven.java @@ -98,6 +98,11 @@ public interface IMaven { */ public void detachFromSession(MavenProject project) throws CoreException; + /** + * Returns MavenProject parent project or null if no such project. + * + * @TODO Currently returns null in case of resolution error, consider if it should throw CoreException instead + */ public MavenProject resolveParentProject(MavenExecutionRequest request, MavenProject project, IProgressMonitor monitor) throws CoreException; diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java index ee47c586..7343cd00 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java @@ -219,8 +219,12 @@ public class Messages extends NLS { public static String LifecycleMissing; + public static String LifecycleDuplicate; + public static String LifecycleMappingNotAvailable; + public static String PluginExecutionMappingDuplicate; + public static String ProjectConfiguratorNotAvailable; public static String LocalArchetypeCatalogDialog_btnBrowse; diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java index de5d27a1..012b2d84 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java @@ -73,11 +73,16 @@ import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutor; import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.model.ConfigurationContainer; +import org.apache.maven.model.InputLocation; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; import org.apache.maven.model.Profile; import org.apache.maven.model.Repository; +import org.apache.maven.model.building.DefaultModelBuildingRequest; import org.apache.maven.model.building.ModelBuildingRequest; +import org.apache.maven.model.building.ModelProblem; +import org.apache.maven.model.building.ModelProblemCollector; +import org.apache.maven.model.interpolation.ModelInterpolator; import org.apache.maven.model.io.ModelReader; import org.apache.maven.model.io.ModelWriter; import org.apache.maven.plugin.BuildPluginManager; @@ -1096,4 +1101,14 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener { return classLoader; } + public void interpolateModel(MavenProject project, Model model) + throws CoreException { + ModelBuildingRequest request = new DefaultModelBuildingRequest(); + request.setUserProperties(project.getProperties()); + ModelProblemCollector problems = new ModelProblemCollector() { + public void add(ModelProblem.Severity severity, String message, InputLocation location, Exception cause) { + } + }; + lookup(ModelInterpolator.class).interpolateModel(model, project.getBasedir(), request, problems); + } } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/DuplicateMappingException.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/DuplicateMappingException.java new file mode 100644 index 00000000..728b4dba --- /dev/null +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/DuplicateMappingException.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2010 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.m2e.core.internal.lifecycle; + +/** + * DuplicateMappingException + * + * @author igor + */ +class DuplicateMappingException extends RuntimeException { + +} diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/InvalidLifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/InvalidLifecycleMapping.java new file mode 100644 index 00000000..0efdbfad --- /dev/null +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/InvalidLifecycleMapping.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2010 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.core.internal.lifecycle; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.apache.maven.plugin.MojoExecution; + +import org.eclipse.m2e.core.project.configurator.AbstractBuildParticipant; +import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator; +import org.eclipse.m2e.core.project.configurator.ILifecycleMapping; +import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest; + + +/** + * Invlid lifecycle mapping provides additional information about lifecycle mapping problems. + * + * @author igor + */ +public class InvalidLifecycleMapping implements ILifecycleMapping { + + public static class ProblemInfo { + private final int line; + + private final String message; + + ProblemInfo(int line, String message) { + this.line = line; + this.message = message; + } + + public int getLine() { + return line; + } + + public String getMessage() { + return message; + } + } + + public static class MissingLifecycleExtensionPoint extends ProblemInfo { + private final String lifecycleId; + + MissingLifecycleExtensionPoint(int line, String message, String lifecycleId) { + super(line, message); + this.lifecycleId = lifecycleId; + } + + public String getLifecycleId() { + return lifecycleId; + } + } + + private List<ProblemInfo> problems = new ArrayList<ProblemInfo>(); + + public String getId() { + return "invalid"; + } + + public String getName() { + return "invalid"; + } + + public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) { + } + + public void unconfigure(ProjectConfigurationRequest request, IProgressMonitor monitor) { + } + + public List<AbstractBuildParticipant> getBuildParticipants(IProgressMonitor monitor) { + return Collections.emptyList(); + } + + public List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) { + return Collections.emptyList(); + } + + public Set<AbstractProjectConfigurator> getProjectConfiguratorsForMojoExecution(MojoExecution mojoExecution, + IProgressMonitor monitor) { + return Collections.emptySet(); + } + + public List<MojoExecution> getNotCoveredMojoExecutions(IProgressMonitor monitor) { + return Collections.emptyList(); + } + + public boolean isInterestingPhase(String phase) { + return false; + } + + /** + * Adds new generic lifecycle mapping problem + */ + public void addProblem(int line, String message) { + problems.add(new ProblemInfo(line, message)); + } + + public void addMissingLifecycleExtensionPoint(int line, String message, String lifecycleId) { + problems.add(new MissingLifecycleExtensionPoint(line, message, lifecycleId)); + } + + public List<ProblemInfo> getProblems() { + return problems; + } + + public boolean hasProblems() { + return !problems.isEmpty(); + } + +} diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/LifecycleMappingFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/LifecycleMappingFactory.java index b12e2844..ca1d5ca9 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/LifecycleMappingFactory.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/LifecycleMappingFactory.java @@ -18,23 +18,25 @@ import java.io.InputStream; import java.io.StringReader; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; -import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.spi.RegistryContributor; import org.eclipse.osgi.util.NLS; @@ -45,8 +47,15 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.execution.DefaultMavenExecutionRequest; +import org.apache.maven.execution.MavenExecutionRequest; +import org.apache.maven.lifecycle.MavenExecutionPlan; +import org.apache.maven.model.Build; +import org.apache.maven.model.BuildBase; +import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginManagement; +import org.apache.maven.model.Profile; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.project.MavenProject; @@ -55,10 +64,10 @@ import org.eclipse.m2e.core.core.IMavenConstants; import org.eclipse.m2e.core.core.MavenLogger; import org.eclipse.m2e.core.embedder.IMaven; import org.eclipse.m2e.core.internal.Messages; +import org.eclipse.m2e.core.internal.embedder.MavenImpl; import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata; import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource; import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionAction; -import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionFilter; import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionMetadata; import org.eclipse.m2e.core.internal.lifecycle.model.io.xpp3.LifecycleMappingMetadataSourceXpp3Reader; import org.eclipse.m2e.core.internal.project.IgnoreMojoProjectConfigurator; @@ -69,6 +78,7 @@ import org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping; import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator; import org.eclipse.m2e.core.project.configurator.ILifecycleMapping; import org.eclipse.m2e.core.project.configurator.LifecycleMappingConfigurationException; +import org.eclipse.m2e.core.project.configurator.MojoExecutionKey; import org.eclipse.m2e.core.project.configurator.NoopLifecycleMapping; @@ -88,7 +98,8 @@ public class LifecycleMappingFactory { public static final String EXTENSION_PROJECT_CONFIGURATORS = IMavenConstants.PLUGIN_ID + ".projectConfigurators"; //$NON-NLS-1$ - private static final String EXTENSION_LIFECYCLE_MAPPING_METADATA_SOURCE = IMavenConstants.PLUGIN_ID + ".lifecycleMappingMetadataSource"; //$NON-NLS-1$ + private static final String EXTENSION_LIFECYCLE_MAPPING_METADATA_SOURCE = IMavenConstants.PLUGIN_ID + + ".lifecycleMappingMetadataSource"; //$NON-NLS-1$ private static final String ELEMENT_LIFECYCLE_MAPPING = "lifecycleMapping"; //$NON-NLS-1$ @@ -100,10 +111,6 @@ public class LifecycleMappingFactory { private static final String ELEMENT_CONFIGURATOR = "configurator"; //$NON-NLS-1$ - private static final String ELEMENT_PLUGIN_EXECUTION = "pluginExecution"; //$NON-NLS-1$ - - private static final String ELEMENT_PLUGIN_EXECUTION_FILTER = "pluginExecutionFilter"; //$NON-NLS-1$ - private static final String ELEMENT_RUN_ON_INCREMENTAL = "runOnIncremental"; private static final String ATTR_GROUPID = "groupId"; @@ -114,91 +121,212 @@ public class LifecycleMappingFactory { private static final String LIFECYCLE_MAPPING_METADATA_CLASSIFIER = "lifecycle-mapping-metadata"; - private static ILifecycleMapping getLifecycleMapping(LifecycleMappingMetadataSource lifecycleMappingMetadataSource, - String packagingType) { - for(LifecycleMappingMetadata lifecycleMappingMetadata : lifecycleMappingMetadataSource.getLifecycleMappings()) { - if(packagingType.equals(lifecycleMappingMetadata.getPackagingType())) { - // Found it - ILifecycleMapping lifecycleMapping = getLifecycleMapping(lifecycleMappingMetadata.getLifecycleMappingId()); - if(lifecycleMapping == null) { - String message = NLS.bind(Messages.LifecycleMappingNotAvailable, - lifecycleMappingMetadata.getLifecycleMappingId()); - throw new LifecycleMappingConfigurationException(message); - } - if(lifecycleMapping instanceof AbstractCustomizableLifecycleMapping) { - AbstractCustomizableLifecycleMapping customizable = (AbstractCustomizableLifecycleMapping) lifecycleMapping; - for(PluginExecutionMetadata pluginExecutionMetadata : lifecycleMappingMetadata.getPluginExecutions()) { - customizable.addCustomPluginExecutionMetadata(pluginExecutionMetadata); - } - } + public static ILifecycleMapping getLifecycleMapping(MavenExecutionRequest templateRequest, + IMavenProjectFacade projectFacade, IProgressMonitor monitor) { + log.debug("Loading lifecycle mapping for {}.", projectFacade.toString()); //$NON-NLS-1$ - return lifecycleMapping; - } + String packagingType = projectFacade.getPackaging(); + if("pom".equals(packagingType)) { //$NON-NLS-1$ + log.debug("Using NoopLifecycleMapping lifecycle mapping for {}.", projectFacade.toString()); //$NON-NLS-1$ + return new NoopLifecycleMapping(); } - return null; + + try { + return getLifecycleMappingImpl(templateRequest, projectFacade, monitor); + } catch(CoreException ex) { + MavenLogger.log(ex); + InvalidLifecycleMapping lifecycleMapping = new InvalidLifecycleMapping(); + lifecycleMapping.addProblem(0, ex.getMessage()); // XXX that looses most of useful info + return lifecycleMapping; + } + } - public static ILifecycleMapping getLifecycleMapping(IMavenProjectFacade mavenProjectFacade) { - log.debug("Loading lifecycle mapping for {}.", mavenProjectFacade.toString()); //$NON-NLS-1$ + private static ILifecycleMapping getLifecycleMappingImpl(MavenExecutionRequest templateRequest, + IMavenProjectFacade projectFacade, IProgressMonitor monitor) throws CoreException { - MavenProject mavenProject = mavenProjectFacade.getMavenProject(); - String packagingType = mavenProjectFacade.getPackaging(); - if("pom".equals(packagingType)) { //$NON-NLS-1$ - log.debug("Using NoopLifecycleMapping lifecycle mapping for {}.", mavenProject.toString()); //$NON-NLS-1$ - return new NoopLifecycleMapping(); - } + MavenProject mavenProject = projectFacade.getMavenProject(monitor); + + InvalidLifecycleMapping invalidLifecycleMapping = new InvalidLifecycleMapping(); - ILifecycleMapping lifecycleMapping = null; + // List order + // 1. this pom embedded, this pom referenced, parent embedded, parent referenced, grand parent embeded... + // 2. sources contributed by eclipse extensions + // 3. default source, if present + List<MappingMetadataSource> metadataSources = new ArrayList<MappingMetadataSource>(); try { - // Try to find a lifecycle mapping for this packaging type in metadata sources embedded or referenced in/from pom - for(LifecycleMappingMetadataSource lifecycleMappingMetadataSource : mavenProjectFacade - .getLifecycleMappingMetadataSources()) { - lifecycleMapping = getLifecycleMapping(lifecycleMappingMetadataSource, packagingType); - if(lifecycleMapping != null) { + for(LifecycleMappingMetadataSource source : getPomMappingMetadataSources(mavenProject, templateRequest, monitor)) { + metadataSources.add(new SimpleMappingMetadataSource(source)); + } + } catch(CoreException e) { + invalidLifecycleMapping.addProblem(1, e.getMessage()); // XXX that looses most of useful info + } catch(LifecycleMappingConfigurationException e) { + invalidLifecycleMapping.addProblem(1, e.getMessage()); + } + metadataSources.add(new SimpleMappingMetadataSource(getBundleMetadataSources())); + LifecycleMappingMetadataSource defaultSource = getDefaultLifecycleMappingMetadataSource(); + if(defaultSource != null) { + metadataSources.add(new SimpleMappingMetadataSource(defaultSource)); + } + + if(invalidLifecycleMapping.hasProblems()) { + // all bets are off if we can't load metadata sources + return invalidLifecycleMapping; + } + + // + // PHASE 1. Look for lifecycle mapping for packaging type + // + + LifecycleMappingMetadata lifecycleMappingMetadata = null; + int metadataSourcePriority = -1; + + for(int i = 0; i < metadataSources.size(); i++ ) { + MappingMetadataSource source = metadataSources.get(i); + try { + lifecycleMappingMetadata = source.getLifecycleMappingMetadata(mavenProject.getPackaging()); + if(lifecycleMappingMetadata != null) { + metadataSourcePriority = i; break; } + } catch(DuplicateMappingException e) { + invalidLifecycleMapping.addProblem(1, NLS.bind(Messages.LifecycleDuplicate, mavenProject.getPackaging())); + break; } + } - if(lifecycleMapping == null) { - // Try to find an eclipse extension that declares a lifecycle mapping for this packaging type - lifecycleMapping = getLifecycleMappingForPackagingType(packagingType); + if(lifecycleMappingMetadata == null) { + log.debug("Could not find lifecycle mapping metadata for {}.", mavenProject.toString()); + + invalidLifecycleMapping.addProblem(1, NLS.bind(Messages.LifecycleMissing, mavenProject.getPackaging())); + return invalidLifecycleMapping; + } + + ILifecycleMapping lifecycleMapping = getLifecycleMapping(lifecycleMappingMetadata.getLifecycleMappingId()); + if(lifecycleMapping == null) { + invalidLifecycleMapping.addProblem(1, + NLS.bind(Messages.LifecycleMappingNotAvailable, lifecycleMappingMetadata.getLifecycleMappingId())); + return invalidLifecycleMapping; + } + + // + // PHASE 2. Bind project configurators to mojo executions. + // + + Map<MojoExecutionKey, List<PluginExecutionMetadata>> executionMapping = new LinkedHashMap<MojoExecutionKey, List<PluginExecutionMetadata>>(); + + // XXX the plan is to avoid resolving execution plan and use MavenProject directly for performance and reliability reason + IMaven maven = MavenPlugin.getDefault().getMaven(); + MavenExecutionRequest request = DefaultMavenExecutionRequest.copy(templateRequest); // TODO ain't pretty + request.setGoals(Arrays.asList("deploy")); + MavenExecutionPlan executionPlan = maven.calculateExecutionPlan(request, mavenProject, monitor); + + for(MojoExecution execution : executionPlan.getMojoExecutions()) { + List<PluginExecutionMetadata> executionMetadata = new ArrayList<PluginExecutionMetadata>(); + + for(int i = 0; i < metadataSources.size() && executionMetadata.isEmpty(); i++ ) { + try { + // execution mapping from lifecycleMapping has priority over generic execution mapping + // TODO instead of this ``if'' we could wrap lifecycleMappingMetadata into MappingMetadataSource + // and *insert* this wrapper before metadataSources[metadataSourcePriority] + if(metadataSourcePriority == i) { + add(executionMetadata, + SimpleMappingMetadataSource.getPluginExecution(execution, + lifecycleMappingMetadata.getPluginExecutions())); + if(!executionMetadata.isEmpty()) { + break; + } + } + MappingMetadataSource source = metadataSources.get(i); + add(executionMetadata, source.getPluginExecutionMetadata(execution)); + } catch(DuplicateMappingException e) { + invalidLifecycleMapping.addProblem(1, + NLS.bind(Messages.PluginExecutionMappingDuplicate, execution.toString())); + break; + } + } + + if(!executionMetadata.isEmpty()) { + executionMapping.put(new MojoExecutionKey(execution), executionMetadata); } + } - if(lifecycleMapping == null && useDefaultLifecycleMappingMetadataSource) { - // Try to find a lifecycle mapping for this packaging type in default metadata - LifecycleMappingMetadataSource lifecycleMappingMetadataSource = getDefaultLifecycleMappingMetadataSource(); - if(lifecycleMappingMetadataSource != null) { - lifecycleMapping = getLifecycleMapping(lifecycleMappingMetadataSource, packagingType); + // + // PHASE 3. Instantiate and configure ILifecycleMapping instance + // + + if(lifecycleMapping instanceof AbstractLifecycleMapping) { + ((AbstractLifecycleMapping) lifecycleMapping).initialize(projectFacade, monitor); + } + + if(lifecycleMapping instanceof AbstractCustomizableLifecycleMapping) { + Map<MojoExecutionKey, Set<AbstractProjectConfigurator>> projectConfiguratorsByMojoExecution = new LinkedHashMap<MojoExecutionKey, Set<AbstractProjectConfigurator>>(); + + for(Map.Entry<MojoExecutionKey, List<PluginExecutionMetadata>> entry : executionMapping.entrySet()) { + Set<AbstractProjectConfigurator> configurators = new LinkedHashSet<AbstractProjectConfigurator>(); + for(PluginExecutionMetadata pluginExecutionMetadata : entry.getValue()) { + try { + configurators.add(createProjectConfigurator(pluginExecutionMetadata)); + } catch(LifecycleMappingConfigurationException e) { + invalidLifecycleMapping.addProblem(1, e.getMessage()); + } } + projectConfiguratorsByMojoExecution.put(entry.getKey(), configurators); } - } catch(LifecycleMappingConfigurationException e) { - MavenPlugin - .getDefault() - .getMavenMarkerManager() - .addMarker(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, e.getMessage(), - 1 /*lineNumber*/, - IMarker.SEVERITY_ERROR); + + ((AbstractCustomizableLifecycleMapping) lifecycleMapping) + .setProjectConfiguratorsByMojoExecution(projectConfiguratorsByMojoExecution); } - if(lifecycleMapping == null) { - log.debug("Could not load lifecycle mapping for {}.", mavenProject.toString()); - } else { - log.debug("Using {} lifecycle mapping for {}.", lifecycleMapping.getId(), mavenProject.toString()); + return !invalidLifecycleMapping.hasProblems() ? lifecycleMapping : invalidLifecycleMapping; + } + + private static void add(List<PluginExecutionMetadata> executionMetadata, PluginExecutionMetadata pluginExecution) { + if(pluginExecution != null) { + executionMetadata.add(pluginExecution); } - return lifecycleMapping; } /** - * Returns default lifecycle mapping for specified packaging type or null if no such lifecycle mapping + * Returns lifecycle mapping metadata sources embedded or referenced by pom.xml in the following order + * <ol> + * <li>this pom.xml embedded</li> + * <li>this pom.xml referenced</li> + * <li>parent pom.xml embedded</li> + * <li>parent pom.xml referenced</li> + * <li>grand parent embedded</li> + * <li>and so on</li> + * </ol> + * Returns empty list if no metadata sources are embedded/referenced by pom.xml + * + * @throws CoreException if metadata sources cannot be resolved or read */ - private static ILifecycleMapping getLifecycleMappingForPackagingType(String packagingType) { - for(LifecycleMappingMetadataSource sources : getBundleMetadataSources()) { - ILifecycleMapping lifecycleMapping = getLifecycleMapping(sources, packagingType); - if(lifecycleMapping != null) { - return lifecycleMapping; + public static List<LifecycleMappingMetadataSource> getPomMappingMetadataSources(MavenProject mavenProject, + MavenExecutionRequest templateRequest, IProgressMonitor monitor) throws CoreException { + IMaven maven = MavenPlugin.getDefault().getMaven(); + + ArrayList<LifecycleMappingMetadataSource> sources = new ArrayList<LifecycleMappingMetadataSource>(); + + MavenProject project = mavenProject; + do { + if(monitor.isCanceled()) { + break; } - } - return null; + + LifecycleMappingMetadataSource embeddedSource = getEmbeddedMetadataSource(project); + if(embeddedSource != null) { + sources.add(embeddedSource); + } + + for(LifecycleMappingMetadataSource referencedSource : getReferencedMetadataSources(project, monitor)) { + sources.add(referencedSource); + } + + MavenExecutionRequest request = DefaultMavenExecutionRequest.copy(templateRequest); // TODO ain't nice + project = maven.resolveParentProject(request, project, monitor); + } while(project != null); + + return sources; } public static AbstractProjectConfigurator createProjectConfigurator(PluginExecutionMetadata pluginExecutionMetadata) { @@ -209,7 +337,7 @@ public class LifecycleMappingFactory { throw new LifecycleMappingConfigurationException("A configurator id must be specified"); } String configuratorId = child.getValue(); - AbstractProjectConfigurator projectConfigurator = createProjectConfigurator(configuratorId, true/*bare*/); + AbstractProjectConfigurator projectConfigurator = createProjectConfigurator(configuratorId); if(projectConfigurator == null) { String message = NLS.bind(Messages.ProjectConfiguratorNotAvailable, configuratorId); throw new LifecycleMappingConfigurationException(message); @@ -224,7 +352,7 @@ public class LifecycleMappingFactory { } else if(pluginExecutionAction == PluginExecutionAction.EXECUTE) { configurator = createMojoExecution(pluginExecutionMetadata); } else { - throw new IllegalStateException("An action must be specified."); + throw new LifecycleMappingConfigurationException("An action must be specified."); } MavenPlugin plugin = MavenPlugin.getDefault(); @@ -255,22 +383,9 @@ public class LifecycleMappingFactory { abstractLifecycleMapping.setId(mappingId); abstractLifecycleMapping.setName(element.getAttribute(ATTR_NAME)); } - if(mapping instanceof AbstractCustomizableLifecycleMapping) { - AbstractCustomizableLifecycleMapping customizable = (AbstractCustomizableLifecycleMapping) mapping; - for(IConfigurationElement pluginExecution : element.getChildren(ELEMENT_PLUGIN_EXECUTION)) { - String pluginExecutionXml = toXml(pluginExecution); - PluginExecutionMetadata pluginExecutionMetadata = new LifecycleMappingMetadataSourceXpp3Reader() - .readPluginExecutionMetadata(new StringReader(pluginExecutionXml)); - customizable.addEclipseExtensionPluginExecutionMetadata(pluginExecutionMetadata); - } - } return mapping; } catch(CoreException ex) { MavenLogger.log(ex); - } catch(IOException e) { - throw new LifecycleMappingConfigurationException("Cannot read lifecycle mapping metadata for " + mappingId, e); - } catch(XmlPullParserException e) { - throw new LifecycleMappingConfigurationException("Cannot parse lifecycle mapping metadata for " + mappingId, e); } return null; } @@ -284,18 +399,6 @@ public class LifecycleMappingFactory { return new MojoExecutionProjectConfigurator(pluginExecutionMetadata.getFilter(), runOnIncremental); } - private static PluginExecutionFilter createPluginExecutionFilter(IConfigurationElement configurationElement) { - String configurationElementXml = toXml(configurationElement); - try { - return new LifecycleMappingMetadataSourceXpp3Reader().readPluginExecutionFilter(new StringReader( - configurationElementXml)); - } catch(IOException e) { - throw new LifecycleMappingConfigurationException("Cannot read plugin execution filter", e); - } catch(XmlPullParserException e) { - throw new LifecycleMappingConfigurationException("Cannot parse plugin execution filter", e); - } - } - private static ILifecycleMapping getLifecycleMapping(String mappingId) { IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint configuratorsExtensionPoint = registry.getExtensionPoint(EXTENSION_LIFECYCLE_MAPPINGS); @@ -314,7 +417,7 @@ public class LifecycleMappingFactory { return null; } - private static AbstractProjectConfigurator createProjectConfigurator(String configuratorId, boolean bare) { + private static AbstractProjectConfigurator createProjectConfigurator(String configuratorId) { IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint configuratorsExtensionPoint = registry.getExtensionPoint(EXTENSION_PROJECT_CONFIGURATORS); if(configuratorsExtensionPoint != null) { @@ -334,13 +437,6 @@ public class LifecycleMappingFactory { configurator.setMarkerManager(plugin.getMavenMarkerManager()); configurator.setConsole(plugin.getConsole()); - if(!bare) { - for(IConfigurationElement pluginExecutionFilter : element - .getChildren(ELEMENT_PLUGIN_EXECUTION_FILTER)) { - configurator.addPluginExecutionFilter(createPluginExecutionFilter(pluginExecutionFilter)); - } - } - return configurator; } catch(CoreException ex) { MavenLogger.log(ex); @@ -353,151 +449,119 @@ public class LifecycleMappingFactory { return null; } - public static AbstractProjectConfigurator createProjectConfiguratorFromMetadataSources( - IMavenProjectFacade mavenProjectFacade, MojoExecution mojoExecution) { - try { - // First look in lifecycle metadata sources embedded or referenced in/from pom - for(LifecycleMappingMetadataSource lifecycleMappingMetadataSource : mavenProjectFacade - .getLifecycleMappingMetadataSources()) { - for(PluginExecutionMetadata pluginExecutionMetadata : lifecycleMappingMetadataSource.getPluginExecutions()) { - if(pluginExecutionMetadata.getFilter().match(mojoExecution)) { - AbstractProjectConfigurator projectConfigurator = createProjectConfigurator(pluginExecutionMetadata); - if(projectConfigurator != null) { - return projectConfigurator; - } + private static LifecycleMappingMetadataSource getEmbeddedMetadataSource(MavenProject mavenProject) + throws CoreException { + // TODO this does not merge configuration from profiles + PluginManagement pluginManagement = getPluginManagement(mavenProject); + Plugin explicitMetadataPlugin = pluginManagement.getPluginsAsMap().get("org.eclipse.m2e:lifecycle-mapping"); //$NON-NLS-1$ + if(explicitMetadataPlugin != null) { + Xpp3Dom configurationDom = (Xpp3Dom) explicitMetadataPlugin.getConfiguration(); + if(configurationDom != null) { + Xpp3Dom lifecycleMappingDom = configurationDom.getChild(0); + if(lifecycleMappingDom != null) { + try { + return new LifecycleMappingMetadataSourceXpp3Reader().read(new StringReader(lifecycleMappingDom + .toString())); + } catch(IOException e) { + throw new LifecycleMappingConfigurationException( + "Cannot read lifecycle mapping metadata for maven project " + mavenProject, e); + } catch(XmlPullParserException e) { + throw new LifecycleMappingConfigurationException( + "Cannot parse lifecycle mapping metadata for maven project " + mavenProject, e); + } catch(RuntimeException e) { + throw new LifecycleMappingConfigurationException( + "Cannot load lifecycle mapping metadata for maven project " + mavenProject, e); } } } - } catch(LifecycleMappingConfigurationException e) { - MavenPlugin - .getDefault() - .getMavenMarkerManager() - .addMarker(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, e.getMessage(), - 1 /*lineNumber*/, IMarker.SEVERITY_ERROR); } - return null; } - public static AbstractProjectConfigurator createProjectConfiguratorFor(IMavenProjectFacade mavenProjectFacade, - MojoExecution mojoExecution) { - try { - // Look in lifecycle mapping metadata contributed via eclipse extension point - for (LifecycleMappingMetadataSource metadataSource : getBundleMetadataSources()) { - for(PluginExecutionMetadata pluginExecutionMetadata : metadataSource.getPluginExecutions()) { - if(pluginExecutionMetadata.getFilter().match(mojoExecution)) { - AbstractProjectConfigurator projectConfigurator = createProjectConfigurator(pluginExecutionMetadata); - if(projectConfigurator != null) { - return projectConfigurator; - } - } - } + /** + * Returns metadata sources referenced by this project in the order they are specified in pom.xml. Returns empty list + * if no metadata sources are referenced in pom.xml. + * + * @param monitor + * @throws CoreException + */ + private static List<LifecycleMappingMetadataSource> getReferencedMetadataSources(MavenProject mavenProject, + IProgressMonitor monitor) throws CoreException { + List<LifecycleMappingMetadataSource> metadataSources = new ArrayList<LifecycleMappingMetadataSource>(); + + PluginManagement pluginManagement = getPluginManagement(mavenProject); + for (Plugin plugin : pluginManagement.getPlugins()) { + if (!LifecycleMappingMetadataSource.PLUGIN_KEY.equals(plugin.getKey())) { + continue; } - - // Look in default lifecycle metadata - if(useDefaultLifecycleMappingMetadataSource) { - LifecycleMappingMetadataSource lifecycleMappingMetadataSource = getDefaultLifecycleMappingMetadataSource(); - if(lifecycleMappingMetadataSource != null) { - for(PluginExecutionMetadata pluginExecutionMetadata : lifecycleMappingMetadataSource.getPluginExecutions()) { - if(pluginExecutionMetadata.getFilter().match(mojoExecution)) { - AbstractProjectConfigurator defaultProjectConfigurator = createProjectConfigurator(pluginExecutionMetadata); - if(defaultProjectConfigurator != null) { - return defaultProjectConfigurator; - } + Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration(); + if(configuration != null) { + Xpp3Dom sources = configuration.getChild(LifecycleMappingMetadataSource.ELEMENT_SOURCES); + if(sources != null) { + for(Xpp3Dom source : sources.getChildren(LifecycleMappingMetadataSource.ELEMENT_SOURCE)) { + String groupId = null; + Xpp3Dom child = source.getChild(ATTR_GROUPID); + if(child != null) { + groupId = child.getValue(); + } + String artifactId = null; + child = source.getChild(ATTR_ARTIFACTID); + if(child != null) { + artifactId = child.getValue(); } + String version = null; + child = source.getChild(ATTR_VERSION); + if(child != null) { + version = child.getValue(); + } + LifecycleMappingMetadataSource lifecycleMappingMetadataSource = LifecycleMappingFactory + .getLifecycleMappingMetadataSource(groupId, artifactId, version, + mavenProject.getRemoteArtifactRepositories(), monitor); + + metadataSources.add(lifecycleMappingMetadataSource); } } } - } catch(LifecycleMappingConfigurationException e) { - MavenPlugin - .getDefault() - .getMavenMarkerManager() - .addMarker(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, e.getMessage(), - 1 /*lineNumber*/, IMarker.SEVERITY_ERROR); } - return null; + return metadataSources; } - public static List<LifecycleMappingMetadataSource> getLifecycleMappingMetadataSources(MavenProject mavenProject) { - List<LifecycleMappingMetadataSource> lifecycleMappingMetadataSources = new ArrayList<LifecycleMappingMetadataSource>(); - - PluginManagement pluginManagement = mavenProject.getPluginManagement(); - if(pluginManagement != null) { - // First look for any lifecycle mapping metadata sources referenced from pom - Plugin metadataSourcesPlugin = pluginManagement.getPluginsAsMap().get(LifecycleMappingMetadataSource.PLUGIN_KEY); - if(metadataSourcesPlugin != null) { - Xpp3Dom configuration = (Xpp3Dom) metadataSourcesPlugin.getConfiguration(); - if(configuration != null) { - Xpp3Dom sources = configuration.getChild(LifecycleMappingMetadataSource.ELEMENT_SOURCES); - if(sources != null) { - for(Xpp3Dom source : sources.getChildren(LifecycleMappingMetadataSource.ELEMENT_SOURCE)) { - String groupId = null; - Xpp3Dom child = source.getChild(ATTR_GROUPID); - if(child != null) { - groupId = child.getValue(); - } - String artifactId = null; - child = source.getChild(ATTR_ARTIFACTID); - if(child != null) { - artifactId = child.getValue(); - } - String version = null; - child = source.getChild(ATTR_VERSION); - if(child != null) { - version = child.getValue(); - } - LifecycleMappingMetadataSource lifecycleMappingMetadataSource = LifecycleMappingFactory - .getLifecycleMappingMetadataSource(groupId, artifactId, version, - mavenProject.getRemoteArtifactRepositories()); - - // Does this metadata override any other metadata? - Iterator<LifecycleMappingMetadataSource> iter = lifecycleMappingMetadataSources.iterator(); - while(iter.hasNext()) { - LifecycleMappingMetadataSource otherLifecycleMappingMetadata = iter.next(); - if(otherLifecycleMappingMetadata.getGroupId().equals(lifecycleMappingMetadataSource.getGroupId()) - && otherLifecycleMappingMetadata.getArtifactId().equals( - lifecycleMappingMetadataSource.getArtifactId())) { - iter.remove(); - break; - } - } + private static PluginManagement getPluginManagement(MavenProject mavenProject) throws CoreException { + Model model = new Model(); - lifecycleMappingMetadataSources.add(0, lifecycleMappingMetadataSource); - } - } - } - } + Build build = new Build(); + model.setBuild(build); - // Look for lifecycle mapping metadata explicitly configured (i.e. embedded) in pom - Plugin explicitMetadataPlugin = pluginManagement.getPluginsAsMap().get("org.eclipse.m2e:lifecycle-mapping"); //$NON-NLS-1$ - if(explicitMetadataPlugin != null) { - Xpp3Dom configurationDom = (Xpp3Dom) explicitMetadataPlugin.getConfiguration(); - if(configurationDom != null) { - Xpp3Dom lifecycleMappingDom = configurationDom.getChild(0); - if(lifecycleMappingDom != null) { - try { - LifecycleMappingMetadataSource lifecycleMappingMetadataSource = new LifecycleMappingMetadataSourceXpp3Reader() - .read(new StringReader(lifecycleMappingDom.toString())); - if(lifecycleMappingMetadataSource != null) { - lifecycleMappingMetadataSources.add(0, lifecycleMappingMetadataSource); - } - } catch(IOException e) { - throw new LifecycleMappingConfigurationException( - "Cannot read lifecycle mapping metadata for maven project " + mavenProject, e); - } catch(XmlPullParserException e) { - throw new LifecycleMappingConfigurationException( - "Cannot parse lifecycle mapping metadata for maven project " + mavenProject, e); - } catch(RuntimeException e) { - throw new LifecycleMappingConfigurationException( - "Cannot load lifecycle mapping metadata for maven project " + mavenProject, e); - } - } + PluginManagement result = new PluginManagement(); + build.setPluginManagement(result); + + if(mavenProject == null) { + return null; + } + + addBuild(result, mavenProject.getOriginalModel().getBuild()); + + for(Profile profile : mavenProject.getActiveProfiles()) { + addBuild(result, profile.getBuild()); + } + + MavenImpl maven = (MavenImpl) MavenPlugin.getDefault().getMaven(); + maven.interpolateModel(mavenProject, model); + + return result; + } + + private static void addBuild(PluginManagement result, BuildBase build) { + if(build != null) { + PluginManagement pluginManagement = build.getPluginManagement(); + if(pluginManagement != null) { + List<Plugin> _plugins = pluginManagement.getPlugins(); + for(Plugin plugin : _plugins) { + result.addPlugin(plugin.clone()); } } } - - return lifecycleMappingMetadataSources; } private static LifecycleMappingMetadataSource defaultLifecycleMappingMetadataSource; @@ -532,12 +596,12 @@ public class LifecycleMappingFactory { // TODO: cache LifecycleMappingMetadataSource instances private static LifecycleMappingMetadataSource getLifecycleMappingMetadataSource(String groupId, String artifactId, - String version, - List<ArtifactRepository> repositories) { + String version, List<ArtifactRepository> repositories, IProgressMonitor monitor) { IMaven maven = MavenPlugin.getDefault().getMaven(); try { + // TODO this does not resolve workspace artifacts Artifact artifact = maven.resolve(groupId, artifactId, version, "xml", LIFECYCLE_MAPPING_METADATA_CLASSIFIER, - repositories, new NullProgressMonitor()); + repositories, monitor); File file = artifact.getFile(); if(file == null || !file.exists() || !file.canRead()) { @@ -548,8 +612,7 @@ public class LifecycleMappingFactory { } catch(IOException e) { throw new LifecycleMappingConfigurationException("Cannot read lifecycle mapping metadata for " + artifact, e); } catch(XmlPullParserException e) { - throw new LifecycleMappingConfigurationException("Cannot parse lifecycle mapping metadata for " + artifact, - e); + throw new LifecycleMappingConfigurationException("Cannot parse lifecycle mapping metadata for " + artifact, e); } catch(RuntimeException e) { throw new LifecycleMappingConfigurationException("Cannot load lifecycle mapping metadata for " + artifact, e); } @@ -573,36 +636,6 @@ public class LifecycleMappingFactory { } } - private static void toXml(IConfigurationElement configurationElement, StringBuilder output) { - output.append('<').append(configurationElement.getName()); - for(String attrName : configurationElement.getAttributeNames()) { - String attrValue = configurationElement.getAttribute(attrName); - if(attrValue != null) { - output.append(' ').append(attrName).append("=\"").append(attrValue).append('"'); - } - } - output.append('>'); - String configurationElementValue = configurationElement.getValue(); - if(configurationElementValue != null) { - output.append(configurationElementValue); - } - for(IConfigurationElement childElement : configurationElement.getChildren()) { - toXml(childElement, output); - } - output.append("</").append(configurationElement.getName()).append('>'); - } - - private static String toXml(IConfigurationElement configurationElement) { - if (configurationElement == null) { - return null; - } - - StringBuilder output = new StringBuilder(); - toXml(configurationElement, output); - return output.toString(); - } - - /** * Returns lifecycle mapping metadata sources provided by all installed bundles */ diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/MappingMetadataSource.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/MappingMetadataSource.java new file mode 100644 index 00000000..5dae4965 --- /dev/null +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/MappingMetadataSource.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2010 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.core.internal.lifecycle; + +import org.apache.maven.plugin.MojoExecution; + +import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata; +import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionMetadata; + + +/** + * MappingMetadataSource + * + * @author igor + */ +interface MappingMetadataSource { + public LifecycleMappingMetadata getLifecycleMappingMetadata(String packagingType) throws DuplicateMappingException; + + public PluginExecutionMetadata getPluginExecutionMetadata(MojoExecution execution) throws DuplicateMappingException; + +} diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/SimpleMappingMetadataSource.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/SimpleMappingMetadataSource.java new file mode 100644 index 00000000..54569062 --- /dev/null +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/SimpleMappingMetadataSource.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2010 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.core.internal.lifecycle; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.maven.plugin.MojoExecution; + +import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata; +import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource; +import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionMetadata; + + +/** + * SimpleMappingMetadataSource + * + * @author igor + */ +class SimpleMappingMetadataSource implements MappingMetadataSource { + + private final List<LifecycleMappingMetadataSource> sources = new ArrayList<LifecycleMappingMetadataSource>(); + + public SimpleMappingMetadataSource(LifecycleMappingMetadataSource source) { + this.sources.add(source); + } + + public SimpleMappingMetadataSource(List<LifecycleMappingMetadataSource> sources) { + this.sources.addAll(sources); + } + + public LifecycleMappingMetadata getLifecycleMappingMetadata(String packagingType) throws DuplicateMappingException { + if(packagingType == null) { + return null; + } + LifecycleMappingMetadata mapping = null; + for(LifecycleMappingMetadataSource source : sources) { + for(LifecycleMappingMetadata _mapping : source.getLifecycleMappings()) { + if(packagingType.equals(_mapping.getPackagingType())) { + if(mapping != null) { + throw new DuplicateMappingException(); + } + mapping = _mapping; + } + } + } + return mapping; + } + + public PluginExecutionMetadata getPluginExecutionMetadata(MojoExecution execution) throws DuplicateMappingException { + List<PluginExecutionMetadata> pluginExecutions = new ArrayList<PluginExecutionMetadata>(); + for(LifecycleMappingMetadataSource source : sources) { + pluginExecutions.addAll(source.getPluginExecutions()); + } + return getPluginExecution(execution, pluginExecutions); + } + + public static PluginExecutionMetadata getPluginExecution(MojoExecution execution, + List<PluginExecutionMetadata> pluginExecutions) throws DuplicateMappingException { + if(execution == null) { + return null; + } + PluginExecutionMetadata mapping = null; + for(PluginExecutionMetadata _mapping : pluginExecutions) { + if(_mapping.getFilter().match(execution)) { + if(mapping != null) { + throw new DuplicateMappingException(); + } + mapping = _mapping; + } + } + return mapping; + } + +} diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties index e0967ea4..8f0d8274 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties @@ -97,7 +97,9 @@ IndexedArtifactNode_no_pack=[No Packaging] IndexUpdaterJob_title=Updating indexes LifecycleConfigurationMojoExecutionNotCovered=Mojo execution not covered by lifecycle configuration: {0} (maven lifecycle phase: {1}) LifecycleMissing=Unknown or missing lifecycle mapping (project packaging type="{0}") +LifecycleDuplicate=Conflicting lifecycle mapping metadata (project packaging type="{0}"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration. LifecycleMappingNotAvailable=Lifecycle mapping "{0}" is not available. To enable full functionality, install the lifecycle mapping and run Maven->Update Project Configuration. +PluginExecutionMappingDuplicate=Conflicting lifecycle mapping (plugin execution "{0}"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration. ProjectConfiguratorNotAvailable=Project configurator "{0}" is not available. To enable full functionality, install the project configurator and run Maven->Update Project Configuration. LocalArchetypeCatalogDialog_btnBrowse=&Browse... LocalArchetypeCatalogDialog_dialog_title=Select Archetype catalog diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java index eb69c15a..a4b0be30 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java @@ -71,6 +71,8 @@ import org.eclipse.m2e.core.embedder.IMaven; import org.eclipse.m2e.core.embedder.IMavenConfiguration; import org.eclipse.m2e.core.embedder.MavenModelManager; import org.eclipse.m2e.core.internal.Messages; +import org.eclipse.m2e.core.internal.lifecycle.InvalidLifecycleMapping; +import org.eclipse.m2e.core.internal.project.registry.MavenProjectFacade; import org.eclipse.m2e.core.project.IMavenMarkerManager; import org.eclipse.m2e.core.project.IMavenProjectChangedListener; import org.eclipse.m2e.core.project.IMavenProjectFacade; @@ -321,17 +323,27 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager */ public boolean validateProjectConfiguration(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) { try { - mavenProjectFacade.setHasValidConfiguration(false); + ((MavenProjectFacade) mavenProjectFacade).setHasValidConfiguration(false); mavenMarkerManager.deleteMarkers(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID); ILifecycleMapping lifecycleMapping = getLifecycleMapping(mavenProjectFacade, monitor); - if(lifecycleMapping == null) { - IMarker marker = mavenMarkerManager.addMarker(mavenProjectFacade.getPom(), - IMavenConstants.MARKER_CONFIGURATION_ID, + if(lifecycleMapping instanceof InvalidLifecycleMapping) { + for (InvalidLifecycleMapping.ProblemInfo problem : ((InvalidLifecycleMapping)lifecycleMapping).getProblems()) { + IMarker marker = mavenMarkerManager.addMarker(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, + problem.getMessage(), problem.getLine(), IMarker.SEVERITY_ERROR); + // TODO do something with associated cause + if (problem instanceof InvalidLifecycleMapping.MissingLifecycleExtensionPoint) { + marker.setAttribute("lifecycleId", ((InvalidLifecycleMapping.MissingLifecycleExtensionPoint) problem).getLifecycleId()); + } + } + + // TODO decide if we want this marker in addition to more specific markers created above + IMarker marker = mavenMarkerManager.addMarker(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, NLS.bind(Messages.LifecycleMissing, mavenProjectFacade.getPackaging()), 1 /*lineNumber*/, IMarker.SEVERITY_ERROR); marker.setAttribute(IMavenConstants.MARKER_ATTR_PACKAGING, mavenProjectFacade.getPackaging()); marker.setAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, IMavenConstants.EDITOR_HINT_UNKNOWN_PACKAGING); + return false; } @@ -356,7 +368,7 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager } return false; } - mavenProjectFacade.setHasValidConfiguration(true); + ((MavenProjectFacade) mavenProjectFacade).setHasValidConfiguration(true); return true; } catch(CoreException e) { mavenMarkerManager.addErrorMarkers(mavenProjectFacade.getPom(), IMavenConstants.MARKER_CONFIGURATION_ID, e); diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectFacade.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectFacade.java index d7ec874b..86847f63 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectFacade.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectFacade.java @@ -361,17 +361,11 @@ public class MavenProjectFacade implements IMavenProjectFacade, Serializable { throw new IllegalArgumentException("Nested workspace module " + pom); //$NON-NLS-1$ } - lifecycleMapping = LifecycleMappingFactory.getLifecycleMapping(this); - if(lifecycleMapping != null) { - lifecycleMapping.initialize(this, monitor); - } + lifecycleMapping = manager.getLifecycleMapping(this, monitor); } return lifecycleMapping; } - /* (non-Javadoc) - * @see org.eclipse.m2e.core.project.IMavenProjectFacade#hasValidConfiguration() - */ public boolean hasValidConfiguration() { return hasValidConfiguration; } @@ -380,19 +374,14 @@ public class MavenProjectFacade implements IMavenProjectFacade, Serializable { this.hasValidConfiguration = hasValidConfiguration; } - private transient List<LifecycleMappingMetadataSource> lifecycleMappingMetadataSources; - - public List<LifecycleMappingMetadataSource> getLifecycleMappingMetadataSources() { - if(lifecycleMappingMetadataSources == null) { - lifecycleMappingMetadataSources = LifecycleMappingFactory.getLifecycleMappingMetadataSources(mavenProject); - } - return lifecycleMappingMetadataSources; - } - public String toString() { if(mavenProject == null) { return "Maven Project: null"; } return mavenProject.toString(); } + + public void setLifecycleMapping(ILifecycleMapping lifecycleMapping) { + this.lifecycleMapping = lifecycleMapping; + } } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java index 07210a1e..5cbccc02 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java @@ -69,6 +69,7 @@ import org.eclipse.m2e.core.embedder.IMavenConfiguration; import org.eclipse.m2e.core.internal.ExtensionReader; import org.eclipse.m2e.core.internal.Messages; import org.eclipse.m2e.core.internal.embedder.MavenImpl; +import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory; import org.eclipse.m2e.core.internal.project.DependencyResolutionContext; import org.eclipse.m2e.core.internal.project.IManagedCache; import org.eclipse.m2e.core.project.IMavenMarkerManager; @@ -78,6 +79,7 @@ import org.eclipse.m2e.core.project.MavenProjectChangedEvent; import org.eclipse.m2e.core.project.MavenUpdateRequest; import org.eclipse.m2e.core.project.ResolverConfiguration; import org.eclipse.m2e.core.project.configurator.ILifecycleMapping; +import org.eclipse.m2e.core.project.configurator.NoopLifecycleMapping; /** * This class keeps track of all maven projects present in the workspace and @@ -563,11 +565,22 @@ public class ProjectRegistryManager { MavenProjectFacade mavenProjectFacade = new MavenProjectFacade(ProjectRegistryManager.this, pom, mavenProject, resolverConfiguration); + ILifecycleMapping lifecycleMapping = getLifecycleMapping(mavenProjectFacade, state, monitor); + mavenProjectFacade.setLifecycleMapping(lifecycleMapping); + MavenPlugin.getDefault().getProjectConfigurationManager().validateProjectConfiguration(mavenProjectFacade, monitor); return mavenProjectFacade; } + private ILifecycleMapping getLifecycleMapping(MavenProjectFacade facade, IProjectRegistry state, + IProgressMonitor monitor) throws CoreException { + MavenExecutionRequest request = createExecutionRequest(state, facade.getPom(), facade.getResolverConfiguration(), + monitor); + ILifecycleMapping lifecycleMapping = LifecycleMappingFactory.getLifecycleMapping(request, facade, monitor); + return lifecycleMapping; + } + MavenExecutionPlan calculateExecutionPlan(MavenProjectFacade facade, IProgressMonitor monitor) throws CoreException { return calculateExecutionPlan(projectRegistry, facade, monitor); } @@ -751,4 +764,13 @@ public class ProjectRegistryManager { IMaven getMaven() { return maven; } + + ILifecycleMapping getLifecycleMapping(MavenProjectFacade facade, IProgressMonitor monitor) { + try { + return getLifecycleMapping(facade, projectRegistry, monitor); + } catch(CoreException ex) { + MavenLogger.log(ex); + } + return null; + } } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenMarkerManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenMarkerManager.java index 338142f3..7cce6aad 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenMarkerManager.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenMarkerManager.java @@ -18,26 +18,31 @@ import org.eclipse.core.runtime.CoreException; import org.apache.maven.execution.MavenExecutionResult; import org.apache.maven.project.MavenProject; + /** * IMavenMarkerManager - * + * * @author Fred Bricon + * @provisional This interface couples both marker management and error processing and will be refactored in a future + * version */ public interface IMavenMarkerManager { /** * Add markers to a pom file from a MavenExecutionResult. + * * @param pomFile the pom file to attach markers to. * @param result containing messages to be addedd as markers */ public void addMarkers(IResource pomFile, String type, MavenExecutionResult result); - + /** * Add a Maven marker to a resource + * * @param resource : the IResource to attach the marker to. * @param message : the marker's message. * @param lineNumber : the resource line to attach the marker to. - * @param severity : the severity of the marker. + * @param severity : the severity of the marker. */ public IMarker addMarker(IResource resource, String type, String message, int lineNumber, int severity); diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectFacade.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectFacade.java index ede733a1..944e9243 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectFacade.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectFacade.java @@ -27,7 +27,6 @@ import org.apache.maven.project.MavenProject; import org.eclipse.m2e.core.embedder.ArtifactKey; import org.eclipse.m2e.core.embedder.ArtifactRef; import org.eclipse.m2e.core.embedder.ArtifactRepositoryRef; -import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource; import org.eclipse.m2e.core.internal.project.ProjectConfigurationManager; import org.eclipse.m2e.core.project.configurator.ILifecycleMapping; @@ -160,7 +159,4 @@ public interface IMavenProjectFacade { */ boolean hasValidConfiguration(); - void setHasValidConfiguration(boolean hasValidConfiguration); - - List<LifecycleMappingMetadataSource> getLifecycleMappingMetadataSources(); } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractCustomizableLifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractCustomizableLifecycleMapping.java index b6e37362..aebbfeca 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractCustomizableLifecycleMapping.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractCustomizableLifecycleMapping.java @@ -18,17 +18,10 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; -import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.plugin.MojoExecution; -import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory; -import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionFilter; -import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionMetadata; -import org.eclipse.m2e.core.project.IMavenProjectFacade; - /** * Abstract base class for customizable lifecycle mappings @@ -37,148 +30,29 @@ import org.eclipse.m2e.core.project.IMavenProjectFacade; */ public abstract class AbstractCustomizableLifecycleMapping extends AbstractLifecycleMapping { - protected static class MojoExecutionKey { - private final MojoExecution execution; - - public MojoExecutionKey(MojoExecution execution) { - this.execution = execution; - } - - public MojoExecution getMojoExecution() { - return execution; - } - - public int hashCode() { - int hash = execution.getGroupId().hashCode(); - hash = 17 * hash + execution.getArtifactId().hashCode(); - hash = 17 * hash + execution.getVersion().hashCode(); - hash = 17 * execution.getGoal().hashCode(); - return hash; - } - - public boolean equals(Object obj) { - if(this == obj) { - return true; - } - if(!(obj instanceof MojoExecutionKey)) { - return false; - } - - MojoExecutionKey other = (MojoExecutionKey) obj; - - return execution.getGroupId().equals(other.execution.getGroupId()) - && execution.getArtifactId().equals(other.execution.getArtifactId()) - && execution.getVersion().equals(other.execution.getVersion()) - && execution.getGoal().equals(other.execution.getGoal()); - } - } - - protected static AbstractProjectConfigurator getProjectConfigurator( - List<PluginExecutionMetadata> pluginExecutionMetadataList, - MojoExecution mojoExecution) { - for(PluginExecutionMetadata pluginExecutionMetadata : pluginExecutionMetadataList) { - if(pluginExecutionMetadata.getFilter().match(mojoExecution)) { - return LifecycleMappingFactory.createProjectConfigurator(pluginExecutionMetadata); - } - } - - return null; - } - - protected Set<AbstractProjectConfigurator> allProjectConfigurators; - protected Map<MojoExecutionKey, Set<AbstractProjectConfigurator>> projectConfiguratorsByMojoExecution; - protected void loadProjectConfigurators(IProgressMonitor monitor) - throws CoreException { - allProjectConfigurators = new LinkedHashSet<AbstractProjectConfigurator>(); - projectConfiguratorsByMojoExecution = new LinkedHashMap<MojoExecutionKey, Set<AbstractProjectConfigurator>>(); - - MavenExecutionPlan executionPlan = getMavenProjectFacade().getExecutionPlan(monitor); - for(MojoExecution mojoExecution : executionPlan.getMojoExecutions()) { - MojoExecutionKey key = new MojoExecutionKey(mojoExecution); - Set<AbstractProjectConfigurator> projectConfiguratorsForMojoExecution = new LinkedHashSet<AbstractProjectConfigurator>(); - projectConfiguratorsByMojoExecution.put(key, projectConfiguratorsForMojoExecution); - - // Look in the plugin executions explicitly declared in the lifecycle mapping customization - AbstractProjectConfigurator projectConfigurator = getProjectConfigurator(customPluginExecutionMetadataList, - mojoExecution); - - // Look in the plugin executions declared in any lifecycle metadata sources (embedded or referenced) - if(projectConfigurator == null) { - projectConfigurator = LifecycleMappingFactory.createProjectConfiguratorFromMetadataSources( - getMavenProjectFacade(), mojoExecution); - } - - // Look in the plugin executions declared in the lifecycle metadata eclipse extension - if(projectConfigurator == null) { - projectConfigurator = getProjectConfigurator(eclipseExtensionPluginExecutionMetadataList, mojoExecution); - } - - // Look in the plugin executions declared in project configurator eclipse extensions and the default lifecycle metadata - if(projectConfigurator == null) { - projectConfigurator = LifecycleMappingFactory.createProjectConfiguratorFor(getMavenProjectFacade(), - mojoExecution); - } - - if(projectConfigurator == null) { - continue; - } - - // Re-use project configurators - boolean isNewProjectConfigurator = true; - for (AbstractProjectConfigurator otherProjectConfigurator : allProjectConfigurators) { - if (projectConfigurator.equals(otherProjectConfigurator)) { - isNewProjectConfigurator = false; - - for(PluginExecutionFilter filter : projectConfigurator.getPluginExecutionFilters()) { - otherProjectConfigurator.addPluginExecutionFilter(filter); - } - - projectConfiguratorsForMojoExecution.add(otherProjectConfigurator); - - break; - } - } - if(isNewProjectConfigurator) { - projectConfiguratorsForMojoExecution.add(projectConfigurator); - allProjectConfigurators.add(projectConfigurator); - } - } - } - @Override - public List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) throws CoreException { - List<AbstractProjectConfigurator> result = new ArrayList<AbstractProjectConfigurator>(); - result.addAll(allProjectConfigurators); - return result; - } - - protected List<PluginExecutionMetadata> eclipseExtensionPluginExecutionMetadataList = new ArrayList<PluginExecutionMetadata>(); - - protected List<PluginExecutionMetadata> customPluginExecutionMetadataList = new ArrayList<PluginExecutionMetadata>(); - - public void addEclipseExtensionPluginExecutionMetadata(PluginExecutionMetadata pluginExecutionMetadata) { - //TODO Detect conflicts - eclipseExtensionPluginExecutionMetadataList.add(pluginExecutionMetadata); - } - - public void addCustomPluginExecutionMetadata(PluginExecutionMetadata pluginExecutionMetadata) { - //TODO Detect conflicts - customPluginExecutionMetadataList.add(pluginExecutionMetadata); + public List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) { + Set<AbstractProjectConfigurator> allProjectConfigurators = new LinkedHashSet<AbstractProjectConfigurator>(); + for(Set<AbstractProjectConfigurator> projectConfigurators : projectConfiguratorsByMojoExecution.values()) { + allProjectConfigurators.addAll(projectConfigurators); + } + return new ArrayList<AbstractProjectConfigurator>(allProjectConfigurators); } - @Override - public void initialize(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) throws CoreException { - super.initialize(mavenProjectFacade, monitor); - loadProjectConfigurators(monitor); + public Set<AbstractProjectConfigurator> getProjectConfiguratorsForMojoExecution(MojoExecution mojoExecution, + IProgressMonitor monitor) { + return projectConfiguratorsByMojoExecution.get(new MojoExecutionKey(mojoExecution)); } - /* (non-Javadoc) - * @see org.eclipse.m2e.core.project.configurator.ILifecycleMapping#getProjectConfiguratorsForMojoExecution(org.apache.maven.plugin.MojoExecution, org.eclipse.core.runtime.IProgressMonitor) + /** + * @param projectConfiguratorsByMojoExecution2 */ - public Set<AbstractProjectConfigurator> getProjectConfiguratorsForMojoExecution(MojoExecution mojoExecution, - IProgressMonitor monitor) throws CoreException { - return projectConfiguratorsByMojoExecution.get(new MojoExecutionKey(mojoExecution)); + public void setProjectConfiguratorsByMojoExecution( + Map<MojoExecutionKey, Set<AbstractProjectConfigurator>> projectConfiguratorsByMojoExecution) { + this.projectConfiguratorsByMojoExecution = new LinkedHashMap<MojoExecutionKey, Set<AbstractProjectConfigurator>>( + projectConfiguratorsByMojoExecution); } + } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractLifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractLifecycleMapping.java index 063adcf7..6a3e9844 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractLifecycleMapping.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractLifecycleMapping.java @@ -208,9 +208,6 @@ public abstract class AbstractLifecycleMapping implements ILifecycleMapping { public abstract List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) throws CoreException; - /* (non-Javadoc) - * @see org.eclipse.m2e.core.project.configurator.ILifecycleMapping#initialize(org.eclipse.m2e.core.project.IMavenProjectFacade) - */ public void initialize(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) throws CoreException { setMavenProjectFacade(mavenProjectFacade); } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/CustomLifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/CustomLifecycleMapping.java index 51219270..225e963f 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/CustomLifecycleMapping.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/CustomLifecycleMapping.java @@ -11,60 +11,9 @@ package org.eclipse.m2e.core.project.configurator; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.Set; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; - -import org.apache.maven.lifecycle.MavenExecutionPlan; -import org.apache.maven.plugin.MojoExecution; - -import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionFilter; - - /** * @author igor */ public class CustomLifecycleMapping extends AbstractCustomizableLifecycleMapping { - protected void loadProjectConfigurators(IProgressMonitor monitor) throws CoreException { - allProjectConfigurators = new LinkedHashSet<AbstractProjectConfigurator>(); - projectConfiguratorsByMojoExecution = new LinkedHashMap<MojoExecutionKey, Set<AbstractProjectConfigurator>>(); - - MavenExecutionPlan executionPlan = getMavenProjectFacade().getExecutionPlan(monitor); - for(MojoExecution mojoExecution : executionPlan.getMojoExecutions()) { - MojoExecutionKey key = new MojoExecutionKey(mojoExecution); - Set<AbstractProjectConfigurator> projectConfiguratorsForMojoExecution = new LinkedHashSet<AbstractProjectConfigurator>(); - projectConfiguratorsByMojoExecution.put(key, projectConfiguratorsForMojoExecution); - - // Look only in the plugin executions explicitly declared in the lifecycle mapping customization - AbstractProjectConfigurator projectConfigurator = getProjectConfigurator(customPluginExecutionMetadataList, - mojoExecution); - if(projectConfigurator == null) { - continue; - } - - // Re-use project configurators - boolean isNewProjectConfigurator = true; - for(AbstractProjectConfigurator otherProjectConfigurator : allProjectConfigurators) { - if(projectConfigurator.equals(otherProjectConfigurator)) { - isNewProjectConfigurator = false; - - for(PluginExecutionFilter filter : projectConfigurator.getPluginExecutionFilters()) { - otherProjectConfigurator.addPluginExecutionFilter(filter); - } - - projectConfiguratorsForMojoExecution.add(otherProjectConfigurator); - - break; - } - } - if(isNewProjectConfigurator) { - projectConfiguratorsForMojoExecution.add(projectConfigurator); - allProjectConfigurators.add(projectConfigurator); - } - } - } } diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ILifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ILifecycleMapping.java index f92da605..18bfc56f 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ILifecycleMapping.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ILifecycleMapping.java @@ -19,20 +19,17 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.apache.maven.plugin.MojoExecution; -import org.eclipse.m2e.core.project.IMavenProjectFacade; - /** * LifecycleMapping * * @author igor + * @noimplement subclass AbstractLifecycleMapping instead */ public interface ILifecycleMapping { String getId(); String getName(); - void initialize(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) throws CoreException; - /** * Configure Eclipse workspace project according to Maven build project configuration. */ diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MojoExecutionKey.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MojoExecutionKey.java new file mode 100644 index 00000000..d7b67137 --- /dev/null +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MojoExecutionKey.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2010 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.core.project.configurator; + +import org.apache.maven.plugin.MojoExecution; + + +public class MojoExecutionKey { + private final MojoExecution execution; + + public MojoExecutionKey(MojoExecution execution) { + this.execution = execution; + } + + public MojoExecution getMojoExecution() { + return execution; + } + + public int hashCode() { + int hash = execution.getGroupId().hashCode(); + hash = 17 * hash + execution.getArtifactId().hashCode(); + hash = 17 * hash + execution.getVersion().hashCode(); + hash = 17 * execution.getGoal().hashCode(); + return hash; + } + + public boolean equals(Object obj) { + if(this == obj) { + return true; + } + if(!(obj instanceof MojoExecutionKey)) { + return false; + } + + MojoExecutionKey other = (MojoExecutionKey) obj; + + return execution.getGroupId().equals(other.execution.getGroupId()) + && execution.getArtifactId().equals(other.execution.getArtifactId()) + && execution.getVersion().equals(other.execution.getVersion()) + && execution.getGoal().equals(other.execution.getGoal()); + } +} diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/NoopLifecycleMapping.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/NoopLifecycleMapping.java index 7506f796..c67232c0 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/NoopLifecycleMapping.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/NoopLifecycleMapping.java @@ -11,12 +11,10 @@ package org.eclipse.m2e.core.project.configurator; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.apache.maven.plugin.MojoExecution; @@ -24,42 +22,44 @@ import org.apache.maven.plugin.MojoExecution; /** * NoopLifecycleMapping - * + * * @author igor */ -public class NoopLifecycleMapping extends AbstractLifecycleMapping { +public class NoopLifecycleMapping implements ILifecycleMapping { - public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException { - // do nothing + public String getId() { + return "noop"; } - public List<AbstractBuildParticipant> getBuildParticipants(IProgressMonitor monitor) - throws CoreException { - return new ArrayList<AbstractBuildParticipant>(); + public String getName() { + return "noop"; } - public List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) - throws CoreException { - return new ArrayList<AbstractProjectConfigurator>(); + public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) { } - public void unconfigure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException { - // do nothing + public void unconfigure(ProjectConfigurationRequest request, IProgressMonitor monitor) { } - - public List<String> getPotentialMojoExecutionsForBuildKind(int kind, IProgressMonitor progressMonitor) { + + public List<AbstractBuildParticipant> getBuildParticipants(IProgressMonitor monitor) { return Collections.emptyList(); } - public boolean isInterestingPhase(String phase) { - return false; + public List<AbstractProjectConfigurator> getProjectConfigurators(IProgressMonitor monitor) { + return Collections.emptyList(); } - /* (non-Javadoc) - * @see org.eclipse.m2e.core.project.configurator.ILifecycleMapping#getProjectConfiguratorsForMojoExecution(org.apache.maven.plugin.MojoExecution, org.eclipse.core.runtime.IProgressMonitor) - */ public Set<AbstractProjectConfigurator> getProjectConfiguratorsForMojoExecution(MojoExecution mojoExecution, - IProgressMonitor monitor) throws CoreException { - return null; + IProgressMonitor monitor) { + return Collections.emptySet(); } + + public List<MojoExecution> getNotCoveredMojoExecutions(IProgressMonitor monitor) { + return Collections.emptyList(); + } + + public boolean isInterestingPhase(String phase) { + return false; + } + } diff --git a/org.eclipse.m2e.discovery-directory/.settings/org.maven.ide.eclipse.prefs b/org.eclipse.m2e.discovery-directory/.settings/org.maven.ide.eclipse.prefs index cff648b8..3275b477 100644 --- a/org.eclipse.m2e.discovery-directory/.settings/org.maven.ide.eclipse.prefs +++ b/org.eclipse.m2e.discovery-directory/.settings/org.maven.ide.eclipse.prefs @@ -1,8 +1,8 @@ -#Thu Jan 06 13:50:06 EST 2011
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
+#Thu Jan 06 13:50:06 EST 2011 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 diff --git a/org.eclipse.m2e.discovery-directory/directory.xml b/org.eclipse.m2e.discovery-directory/directory.xml index 0ee96a64..f766cc7d 100644 --- a/org.eclipse.m2e.discovery-directory/directory.xml +++ b/org.eclipse.m2e.discovery-directory/directory.xml @@ -1,3 +1,3 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<directory xmlns="http://www.eclipse.org/mylyn/discovery/directory/">
+<?xml version="1.0" encoding="UTF-8"?> +<directory xmlns="http://www.eclipse.org/mylyn/discovery/directory/"> </directory>
\ No newline at end of file diff --git a/org.eclipse.m2e.discovery/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.discovery/.settings/org.eclipse.jdt.core.prefs index 6ff7e7c3..0c25e4ea 100644 --- a/org.eclipse.m2e.discovery/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.m2e.discovery/.settings/org.eclipse.jdt.core.prefs @@ -1,373 +1,373 @@ -#Fri Jan 07 11:00:06 EST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=2
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=1
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=120
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=2
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=120
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=2
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Fri Jan 07 11:00:06 EST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=2 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=1 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=2 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/org.eclipse.m2e.discovery/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.m2e.discovery/.settings/org.eclipse.m2e.core.prefs index 144f5a5d..3f6db1f9 100644 --- a/org.eclipse.m2e.discovery/.settings/org.eclipse.m2e.core.prefs +++ b/org.eclipse.m2e.discovery/.settings/org.eclipse.m2e.core.prefs @@ -1,5 +1,5 @@ -#Thu Jan 06 09:44:08 EST 2011
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
+#Thu Jan 06 09:44:08 EST 2011 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.m2e.discovery/plugin.xml b/org.eclipse.m2e.discovery/plugin.xml index 7f589c2e..b05b0cbf 100644 --- a/org.eclipse.m2e.discovery/plugin.xml +++ b/org.eclipse.m2e.discovery/plugin.xml @@ -1,37 +1,37 @@ -<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2011 Sonatype, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
--->
-<?eclipse version="3.4"?>
-<plugin>
- <extension point="org.eclipse.ui.menus">
- <menuContribution allPopups="false" locationURI="menu:help?after=additions">
- <command
- commandId="org.eclipse.m2e.discovery.ui"
- id="org.eclipse.m2e.discovery.ui"
- mnemonic="%Maven.discovery.mnemonic">
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.m2e.discovery.ui"
- name="%Maven.discovery">
- </command>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.m2e.internal.discovery.handlers.MavenDiscoveryHandler"
- commandId="org.eclipse.m2e.discovery.ui">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- class="org.eclipse.m2e.internal.discovery.markers.MavenDiscoveryMarkerResolutionGenerator"
- markerType="org.eclipse.m2e.core.maven2Problem.configuration">
- </markerResolutionGenerator>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?><!-- + Copyright (c) 2011 Sonatype, Inc. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html +--> +<?eclipse version="3.4"?> +<plugin> + <extension point="org.eclipse.ui.menus"> + <menuContribution allPopups="false" locationURI="menu:help?after=additions"> + <command + commandId="org.eclipse.m2e.discovery.ui" + id="org.eclipse.m2e.discovery.ui" + mnemonic="%Maven.discovery.mnemonic"> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.commands"> + <command id="org.eclipse.m2e.discovery.ui" + name="%Maven.discovery"> + </command> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.m2e.internal.discovery.handlers.MavenDiscoveryHandler" + commandId="org.eclipse.m2e.discovery.ui"> + </handler> + </extension> + <extension + point="org.eclipse.ui.ide.markerResolution"> + <markerResolutionGenerator + class="org.eclipse.m2e.internal.discovery.markers.MavenDiscoveryMarkerResolutionGenerator" + markerType="org.eclipse.m2e.core.maven2Problem.configuration"> + </markerResolutionGenerator> + </extension> +</plugin> diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java index 5dd2c3fd..3cd6d150 100644 --- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java +++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java @@ -1,36 +1,36 @@ -/*******************************************************************************
- * Copyright (c) 2011 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.m2e.internal.discovery.markers;
-
-import java.util.Arrays;
-import java.util.Collections;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.internal.discovery.MavenDiscovery;
-import org.eclipse.m2e.internal.discovery.Messages;
-import org.eclipse.ui.IMarkerResolution;
-
-
-class DiscoveryWizardProposal implements IMarkerResolution {
-
- static final DiscoveryWizardProposal PROPOSAL = new DiscoveryWizardProposal();
-
- public String getLabel() {
- return Messages.DiscoveryWizardProposal_Label;
- }
-
- public void run(IMarker marker) {
- String packaging = marker.getAttribute(IMavenConstants.MARKER_ATTR_PACKAGING, null);
- if (packaging != null)
- MavenDiscovery.launchWizard(Arrays.asList(new String[] {packaging}), Collections.EMPTY_LIST);
- }
+/******************************************************************************* + * Copyright (c) 2011 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.m2e.internal.discovery.markers; + +import java.util.Arrays; +import java.util.Collections; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.m2e.core.core.IMavenConstants; +import org.eclipse.m2e.internal.discovery.MavenDiscovery; +import org.eclipse.m2e.internal.discovery.Messages; +import org.eclipse.ui.IMarkerResolution; + + +class DiscoveryWizardProposal implements IMarkerResolution { + + static final DiscoveryWizardProposal PROPOSAL = new DiscoveryWizardProposal(); + + public String getLabel() { + return Messages.DiscoveryWizardProposal_Label; + } + + public void run(IMarker marker) { + String packaging = marker.getAttribute(IMavenConstants.MARKER_ATTR_PACKAGING, null); + if (packaging != null) + MavenDiscovery.launchWizard(Arrays.asList(new String[] {packaging}), Collections.EMPTY_LIST); + } }
\ No newline at end of file diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogPage.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogPage.java index c902dda0..71520de1 100644 --- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogPage.java +++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogPage.java @@ -1,37 +1,37 @@ -/*******************************************************************************
- * Copyright (c) 2011 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.internal.discovery.wizards;
-
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
-import org.eclipse.m2e.internal.discovery.Messages;
-import org.eclipse.swt.widgets.Composite;
-
-
-@SuppressWarnings("restriction")
-public class MavenCatalogPage extends CatalogPage {
-
- public MavenCatalogPage(Catalog catalog) {
- super(catalog);
- setTitle(Messages.MavenCatalogPage_Title);
- setDescription(Messages.MavenCatalogPage_Descripton);
- }
-
- protected CatalogViewer doCreateViewer(Composite parent) {
- MavenCatalogViewer viewer = new MavenCatalogViewer(getCatalog(), this, getContainer(), getWizard()
- .getConfiguration());
- viewer.setMinimumHeight(MINIMUM_HEIGHT);
- viewer.createControl(parent);
- return viewer;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.internal.discovery.wizards; + +import org.eclipse.equinox.internal.p2.discovery.Catalog; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; +import org.eclipse.m2e.internal.discovery.Messages; +import org.eclipse.swt.widgets.Composite; + + +@SuppressWarnings("restriction") +public class MavenCatalogPage extends CatalogPage { + + public MavenCatalogPage(Catalog catalog) { + super(catalog); + setTitle(Messages.MavenCatalogPage_Title); + setDescription(Messages.MavenCatalogPage_Descripton); + } + + protected CatalogViewer doCreateViewer(Composite parent) { + MavenCatalogViewer viewer = new MavenCatalogViewer(getCatalog(), this, getContainer(), getWizard() + .getConfiguration()); + viewer.setMinimumHeight(MINIMUM_HEIGHT); + viewer.createControl(parent); + return viewer; + } +} diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java index 2179cdab..5babbcc7 100644 --- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java +++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java @@ -1,114 +1,114 @@ -/*******************************************************************************
- * Copyright (c) 2011 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.internal.discovery.wizards;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory;
-import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata;
-import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource;
-import org.eclipse.m2e.internal.discovery.MavenDiscovery;
-import org.eclipse.m2e.internal.discovery.Messages;
-import org.eclipse.osgi.util.NLS;
-
-
-@SuppressWarnings("restriction")
-public class MavenCatalogViewer extends CatalogViewer {
-
- private static final String PATH = "lifecycle/"; //$NON-NLS-1$
-
- private static final String EXT = ".xml"; //$NON-NLS-1$
-
- private static final String ID = "org.eclipse.m2e.discovery"; //$NON-NLS-1$
-
- public MavenCatalogViewer(Catalog catalog, IShellProvider shellProvider, IRunnableContext context,
- CatalogConfiguration configuration) {
- super(catalog, shellProvider, context, configuration);
- }
-
- @Override
- protected void postDiscovery() {
- super.postDiscovery();
-
- final MavenCatalogConfiguration config = (MavenCatalogConfiguration) getConfiguration();
- final Collection<String> selectedPackagingTypes = config.getSelectedPackagingTypes();
-
- shellProvider.getShell().getDisplay().syncExec(new Runnable() {
- @SuppressWarnings("synthetic-access")
- public void run() {
- Map<String, Set<CatalogItem>> map = new HashMap<String, Set<CatalogItem>>();
-
- for(String packagingType : selectedPackagingTypes) {
- map.put(packagingType, new HashSet<CatalogItem>());
- for(CatalogItem ci : getCatalog().getItems()) {
- LifecycleMappingMetadataSource src = getLifecycleMappingMetadataSource(ci);
- if(src != null && hasPackaging(src, packagingType)) {
- Set<CatalogItem> items = map.get(packagingType);
- items.add(ci);
- }
- }
- }
-
- // Select relevant CatalogItems
- // TODO Make selection smarter
- for(Entry<String, Set<CatalogItem>> type : map.entrySet()) {
- if(type.getValue().isEmpty()) {
- MavenLogger.log(NLS.bind(Messages.MavenCatalogViewer_Missing_packaging_type, type.getKey()));
- }
- for(CatalogItem ci : type.getValue()) {
- modifySelection(ci, true);
- ci.addTag(MavenDiscovery.APPLICABLE_TAG);
- }
- }
- }
- });
- }
-
- private static LifecycleMappingMetadataSource getLifecycleMappingMetadataSource(CatalogItem ci) {
- try {
- return LifecycleMappingFactory.createLifecycleMappingMetadataSource(getLifecycleMappingMetadataSourceURL(ci));
- } catch(Exception e) {
- MavenLogger.log(new Status(IStatus.WARNING, ID, NLS.bind(Messages.MavenCatalogViewer_Error_loading_lifecycle,
- ci.getId()), e));
- return null;
- }
- }
-
- private static URL getLifecycleMappingMetadataSourceURL(CatalogItem ci) {
- return ci.getSource().getResource(PATH + ci.getId() + EXT);
- }
-
- private static boolean hasPackaging(LifecycleMappingMetadataSource lifecycleMappingMetadataSource,
- String packagingType) {
- for(LifecycleMappingMetadata lifecycleMappingMetadata : lifecycleMappingMetadataSource.getLifecycleMappings()) {
- if(packagingType.equals(lifecycleMappingMetadata.getPackagingType())) {
- return true;
- }
- }
- return false;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.internal.discovery.wizards; + +import java.net.URL; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.equinox.internal.p2.discovery.Catalog; +import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; +import org.eclipse.jface.operation.IRunnableContext; +import org.eclipse.jface.window.IShellProvider; +import org.eclipse.m2e.core.core.MavenLogger; +import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory; +import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata; +import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource; +import org.eclipse.m2e.internal.discovery.MavenDiscovery; +import org.eclipse.m2e.internal.discovery.Messages; +import org.eclipse.osgi.util.NLS; + + +@SuppressWarnings("restriction") +public class MavenCatalogViewer extends CatalogViewer { + + private static final String PATH = "lifecycle/"; //$NON-NLS-1$ + + private static final String EXT = ".xml"; //$NON-NLS-1$ + + private static final String ID = "org.eclipse.m2e.discovery"; //$NON-NLS-1$ + + public MavenCatalogViewer(Catalog catalog, IShellProvider shellProvider, IRunnableContext context, + CatalogConfiguration configuration) { + super(catalog, shellProvider, context, configuration); + } + + @Override + protected void postDiscovery() { + super.postDiscovery(); + + final MavenCatalogConfiguration config = (MavenCatalogConfiguration) getConfiguration(); + final Collection<String> selectedPackagingTypes = config.getSelectedPackagingTypes(); + + shellProvider.getShell().getDisplay().syncExec(new Runnable() { + @SuppressWarnings("synthetic-access") + public void run() { + Map<String, Set<CatalogItem>> map = new HashMap<String, Set<CatalogItem>>(); + + for(String packagingType : selectedPackagingTypes) { + map.put(packagingType, new HashSet<CatalogItem>()); + for(CatalogItem ci : getCatalog().getItems()) { + LifecycleMappingMetadataSource src = getLifecycleMappingMetadataSource(ci); + if(src != null && hasPackaging(src, packagingType)) { + Set<CatalogItem> items = map.get(packagingType); + items.add(ci); + } + } + } + + // Select relevant CatalogItems + // TODO Make selection smarter + for(Entry<String, Set<CatalogItem>> type : map.entrySet()) { + if(type.getValue().isEmpty()) { + MavenLogger.log(NLS.bind(Messages.MavenCatalogViewer_Missing_packaging_type, type.getKey())); + } + for(CatalogItem ci : type.getValue()) { + modifySelection(ci, true); + ci.addTag(MavenDiscovery.APPLICABLE_TAG); + } + } + } + }); + } + + private static LifecycleMappingMetadataSource getLifecycleMappingMetadataSource(CatalogItem ci) { + try { + return LifecycleMappingFactory.createLifecycleMappingMetadataSource(getLifecycleMappingMetadataSourceURL(ci)); + } catch(Exception e) { + MavenLogger.log(new Status(IStatus.WARNING, ID, NLS.bind(Messages.MavenCatalogViewer_Error_loading_lifecycle, + ci.getId()), e)); + return null; + } + } + + private static URL getLifecycleMappingMetadataSourceURL(CatalogItem ci) { + return ci.getSource().getResource(PATH + ci.getId() + EXT); + } + + private static boolean hasPackaging(LifecycleMappingMetadataSource lifecycleMappingMetadataSource, + String packagingType) { + for(LifecycleMappingMetadata lifecycleMappingMetadata : lifecycleMappingMetadataSource.getLifecycleMappings()) { + if(packagingType.equals(lifecycleMappingMetadata.getPackagingType())) { + return true; + } + } + return false; + } +} diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java index 346e0ba2..af47c742 100644 --- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java +++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java @@ -1,34 +1,34 @@ -/*******************************************************************************
- * Copyright (c) 2011 Sonatype, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.internal.discovery.wizards;
-
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
-import org.eclipse.m2e.internal.discovery.MavenDiscoveryIcons;
-import org.eclipse.m2e.internal.discovery.Messages;
-
-
-@SuppressWarnings("restriction")
-public class MavenDiscoveryWizard extends DiscoveryWizard {
-
- public MavenDiscoveryWizard(Catalog catalog, MavenCatalogConfiguration configuration) {
- super(catalog, configuration);
- setWindowTitle(Messages.MavenDiscoveryWizard_Title);
- setDefaultPageImageDescriptor(MavenDiscoveryIcons.WIZARD_BANNER);
- }
-
- @Override
- protected CatalogPage doCreateCatalogPage() {
- return new MavenCatalogPage(getCatalog());
- }
-}
+/******************************************************************************* + * Copyright (c) 2011 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.m2e.internal.discovery.wizards; + +import org.eclipse.equinox.internal.p2.discovery.Catalog; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage; +import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard; +import org.eclipse.m2e.internal.discovery.MavenDiscoveryIcons; +import org.eclipse.m2e.internal.discovery.Messages; + + +@SuppressWarnings("restriction") +public class MavenDiscoveryWizard extends DiscoveryWizard { + + public MavenDiscoveryWizard(Catalog catalog, MavenCatalogConfiguration configuration) { + super(catalog, configuration); + setWindowTitle(Messages.MavenDiscoveryWizard_Title); + setDefaultPageImageDescriptor(MavenDiscoveryIcons.WIZARD_BANNER); + } + + @Override + protected CatalogPage doCreateCatalogPage() { + return new MavenCatalogPage(getCatalog()); + } +} diff --git a/org.eclipse.m2e.parent/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.m2e.parent/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..fc9add0b --- /dev/null +++ b/org.eclipse.m2e.parent/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Thu Dec 23 16:53:18 EST 2010 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java index 0789eeae..d12c697c 100644 --- a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java +++ b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java @@ -199,7 +199,7 @@ public abstract class AbstractMavenProjectTestCase extends TestCase { private void deleteMember(String name, final IProject project, IProgressMonitor monitor) throws CoreException { IResource member = project.findMember(name); - if(member.exists()) { + if(member != null && member.exists()) { member.delete(true, monitor); } } |