Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.m2e.archetype.common/.classpath16
-rw-r--r--org.eclipse.m2e.archetype.common/.gitignore1
-rw-r--r--org.eclipse.m2e.archetype.common/.project34
-rw-r--r--org.eclipse.m2e.archetype.common/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.archetype.common/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.archetype.common/META-INF/MANIFEST.MF46
-rw-r--r--org.eclipse.m2e.archetype.common/META-INF/plexus/.gitignore0
-rw-r--r--org.eclipse.m2e.archetype.common/OSGI-INF/l10n/bundle.properties3
-rw-r--r--org.eclipse.m2e.archetype.common/build.properties14
-rw-r--r--org.eclipse.m2e.archetype.common/jars/archetype-common-2.0-alpha-4.jarbin0 -> 235251 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/commons-collections-3.2.jarbin0 -> 571259 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/commons-io-1.3.2.jarbin0 -> 87776 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/commons-lang-2.1.jarbin0 -> 207723 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/dom4j-1.6.1.jarbin0 -> 313898 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/jchardet-1.0.jarbin0 -> 26605 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/jdom-1.0.jarbin0 -> 153253 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/oro-2.0.8.jarbin0 -> 65261 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/plexus-velocity-1.1.3.jarbin0 -> 7914 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/jars/velocity-1.5.jarbin0 -> 392124 bytes
-rw-r--r--org.eclipse.m2e.archetype.common/pom.xml90
-rw-r--r--org.eclipse.m2e.core/.classpath7
-rw-r--r--org.eclipse.m2e.core/.fbprefs146
-rw-r--r--org.eclipse.m2e.core/.gitignore2
-rw-r--r--org.eclipse.m2e.core/.options29
-rw-r--r--org.eclipse.m2e.core/.project34
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.jdt.core.prefs359
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.jdt.ui.prefs14
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.mylar.tasklist.prefs4
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--org.eclipse.m2e.core/.settings/org.eclipse.pde.prefs23
-rw-r--r--org.eclipse.m2e.core/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.core/META-INF/MANIFEST.MF54
-rw-r--r--org.eclipse.m2e.core/about.html28
-rw-r--r--org.eclipse.m2e.core/about.ini17
-rw-r--r--org.eclipse.m2e.core/build.properties25
-rw-r--r--org.eclipse.m2e.core/icons/add_index.gifbin0 -> 379 bytes
-rw-r--r--org.eclipse.m2e.core/icons/clear.gifbin0 -> 163 bytes
-rw-r--r--org.eclipse.m2e.core/icons/clear_disabled.gifbin0 -> 159 bytes
-rw-r--r--org.eclipse.m2e.core/icons/close.gifbin0 -> 163 bytes
-rw-r--r--org.eclipse.m2e.core/icons/collapseall.gifbin0 -> 157 bytes
-rw-r--r--org.eclipse.m2e.core/icons/copy.gifbin0 -> 607 bytes
-rw-r--r--org.eclipse.m2e.core/icons/debug.gifbin0 -> 581 bytes
-rw-r--r--org.eclipse.m2e.core/icons/import_jar.gifbin0 -> 580 bytes
-rw-r--r--org.eclipse.m2e.core/icons/import_m2_project.gifbin0 -> 247 bytes
-rw-r--r--org.eclipse.m2e.core/icons/import_project.pngbin0 -> 6452 bytes
-rw-r--r--org.eclipse.m2e.core/icons/jar_obj.gifbin0 -> 587 bytes
-rw-r--r--org.eclipse.m2e.core/icons/jar_src_version.gifbin0 -> 323 bytes
-rw-r--r--org.eclipse.m2e.core/icons/jar_version.gifbin0 -> 133 bytes
-rw-r--r--org.eclipse.m2e.core/icons/java_obj.gifbin0 -> 573 bytes
-rw-r--r--org.eclipse.m2e.core/icons/java_src_obj.gifbin0 -> 589 bytes
-rw-r--r--org.eclipse.m2e.core/icons/lock_ovr.gifbin0 -> 310 bytes
-rw-r--r--org.eclipse.m2e.core/icons/m2.gifbin0 -> 222 bytes
-rw-r--r--org.eclipse.m2e.core/icons/m2eclipse48.gifbin0 -> 1795 bytes
-rw-r--r--org.eclipse.m2e.core/icons/main_tab.gifbin0 -> 359 bytes
-rw-r--r--org.eclipse.m2e.core/icons/maven_index.gifbin0 -> 362 bytes
-rw-r--r--org.eclipse.m2e.core/icons/maven_indexes.gifbin0 -> 258 bytes
-rw-r--r--org.eclipse.m2e.core/icons/mjar.gifbin0 -> 258 bytes
-rw-r--r--org.eclipse.m2e.core/icons/mlabel.gifbin0 -> 76 bytes
-rw-r--r--org.eclipse.m2e.core/icons/new_m2_pom.gifbin0 -> 254 bytes
-rw-r--r--org.eclipse.m2e.core/icons/new_m2_project.gifbin0 -> 274 bytes
-rw-r--r--org.eclipse.m2e.core/icons/new_m2_project_wizard.gifbin0 -> 2051 bytes
-rw-r--r--org.eclipse.m2e.core/icons/open_pom.gifbin0 -> 234 bytes
-rw-r--r--org.eclipse.m2e.core/icons/pom_obj.gifbin0 -> 249 bytes
-rw-r--r--org.eclipse.m2e.core/icons/rebuild_index.gifbin0 -> 230 bytes
-rw-r--r--org.eclipse.m2e.core/icons/refresh.gifbin0 -> 327 bytes
-rw-r--r--org.eclipse.m2e.core/icons/stderr.gifbin0 -> 242 bytes
-rw-r--r--org.eclipse.m2e.core/icons/stdout.gifbin0 -> 337 bytes
-rw-r--r--org.eclipse.m2e.core/icons/update_dependencies.gifbin0 -> 244 bytes
-rw-r--r--org.eclipse.m2e.core/icons/update_index.gifbin0 -> 350 bytes
-rw-r--r--org.eclipse.m2e.core/icons/update_source_folders.gifbin0 -> 251 bytes
-rw-r--r--org.eclipse.m2e.core/icons/web.gifbin0 -> 996 bytes
-rw-r--r--org.eclipse.m2e.core/intro/css/overview.css9
-rw-r--r--org.eclipse.m2e.core/intro/css/whatsnew.css9
-rw-r--r--org.eclipse.m2e.core/intro/overview.xml17
-rw-r--r--org.eclipse.m2e.core/intro/whatsnew.xml16
-rw-r--r--org.eclipse.m2e.core/m2eclipse.gifbin0 -> 1694 bytes
-rw-r--r--org.eclipse.m2e.core/plugin.properties111
-rw-r--r--org.eclipse.m2e.core/plugin.xml617
-rw-r--r--org.eclipse.m2e.core/pom.xml38
-rw-r--r--org.eclipse.m2e.core/schema/archetypes.exsd141
-rw-r--r--org.eclipse.m2e.core/schema/indexes.exsd153
-rw-r--r--org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd122
-rw-r--r--org.eclipse.m2e.core/schema/lifecycleMappings.exsd200
-rw-r--r--org.eclipse.m2e.core/schema/m2menu.exsd122
-rw-r--r--org.eclipse.m2e.core/schema/mavenComponentContributors.exsd102
-rw-r--r--org.eclipse.m2e.core/schema/mavenProjectChangedListeners.exsd102
-rw-r--r--org.eclipse.m2e.core/schema/projectConfigurators.exsd191
-rw-r--r--org.eclipse.m2e.core/schema/scmHandlers.exsd130
-rw-r--r--org.eclipse.m2e.core/schema/scmHandlersUi.exsd104
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java222
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java564
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/NoSuchComponentException.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AbstractMavenMenuCreator.java99
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java75
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java65
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java161
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java91
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java81
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java141
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java58
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java136
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java31
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java63
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenMenuAction.java157
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java52
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java61
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java404
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java230
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java114
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java360
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java160
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogFactory.java185
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogsWriter.java167
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeManager.java117
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/AbstractEclipseBuildContext.java141
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ChangedFileOutputStream.java104
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseBuildContext.java75
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseIncrementalBuildContext.java142
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ResourceDeltaScanner.java96
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java27
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConstants.java87
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java41
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenLogger.java59
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/Messages.java55
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/AbstractMavenConfigurationChangeListener.java22
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ArtifactKey.java148
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ArtifactRef.java73
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ArtifactRepositoryRef.java69
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ILocalRepositoryListener.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMaven.java224
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfiguration.java66
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfigurationChangeListener.java25
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenLauncherConfiguration.java39
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ISettingsChangeListener.java26
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenConfigurationChangeEvent.java47
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java581
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntime.java44
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenRuntimeManager.java165
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/NearestVersionConflictResolver.java257
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ProjectUpdater.java25
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IIndex.java134
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IMutableIndex.java37
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexListener.java33
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexManager.java53
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifact.java151
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java104
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/MatchTyped.java27
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/MatchTypedStringSearchExpression.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/SearchExpression.java25
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/SourcedSearchExpression.java23
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/StringSearchExpression.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/UserInputSearchExpression.java23
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/ExtensionReader.java130
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java1024
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/actions/DefaultMavenMenuCreator.java139
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/InternalBuildParticipant.java76
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilder.java302
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenNature.java87
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/ResourceScanner.java91
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/ConsoleDocument.java95
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/console/MavenConsoleImpl.java404
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/content/PomFileContentDescriber.java96
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/content/PomHandler.java166
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/content/TextContentDescriber.java89
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/content/XMLContentDescriber.java128
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/AbstractTransferListenerAdapter.java107
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java59
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSession.java18
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java153
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/DefaultMavenComponentContributor.java38
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseBuildContext.java25
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseClassRealmManagerDelegate.java88
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLocalRepositoryMaintainer.java56
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java135
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLoggerManager.java62
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ExtensionModule.java53
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/IMavenComponentContributor.java27
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenConfigurationImpl.java107
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenEmbeddedRuntime.java198
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExternalRuntime.java239
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java1098
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenWorkspaceRuntime.java141
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/WagonTransferListenerAdapter.java118
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/ArtifactScanningMonitor.java67
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/AsyncFetcher.java283
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/CompositeIndex.java118
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/EquinoxLock.java35
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/EquinoxLocker.java41
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexUpdaterJob.java90
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexedArtifactGroup.java57
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexesExtensionReader.java84
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/IndexingTransferListener.java34
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndex.java180
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/NexusIndexManager.java1312
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecycle/LifecycleMappingFactory.java238
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties498
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceConstants.java88
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceInitializer.java67
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java66
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/DependencyResolutionContext.java75
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseMavenMetadataCache.java91
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/IManagedCache.java31
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/IgnoreMojoProjectConfiguration.java33
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/MavenMarkerManager.java713
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/MavenProjectImportResult.java37
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/MissingLifecycleMapping.java87
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/MojoExecutionProjectConfigurator.java93
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/MojoExecutionUtils.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java716
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/WorkspaceStateWriter.java87
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/AbstractMavenDependencyResolver.java58
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/BasicProjectRegistry.java151
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/Capability.java39
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java98
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipsePluginDependenciesResolver.java66
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java159
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ILifecycleMapping2.java25
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/IProjectRegistry.java34
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenCapability.java86
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectFacade.java382
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenRequiredCapability.java101
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MutableProjectRegistry.java245
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistry.java117
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java854
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryReader.java216
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java233
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/RequiredCapability.java50
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/StaleMutableProjectRegistryException.java23
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/VersionlessKey.java65
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/repository/IRepositoryDiscoverer.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/repository/IRepositoryIndexer.java46
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/repository/RepositoryInfo.java175
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/repository/RepositoryRegistry.java323
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/repository/RepositoryRegistryUpdateJob.java65
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/jobs/IBackgroundProcessingQueue.java31
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/messages.properties152
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/AbstractProjectScanner.java55
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenMarkerManager.java54
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectChangedListener.java21
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectFacade.java163
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectImportResult.java32
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectVisitor.java41
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IMavenProjectVisitor2.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/IProjectConfigurationManager.java66
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/LocalProjectScanner.java187
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectChangedEvent.java69
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectInfo.java198
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectManager.java166
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectPomScanner.java219
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectScmInfo.java108
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenProjectUtils.java98
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/MavenUpdateRequest.java124
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ProjectImportConfiguration.java142
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/ResolverConfiguration.java56
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractBuildParticipant.java68
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractLifecycleMapping.java219
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/AbstractProjectConfigurator.java243
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/CustomizableLifecycleMapping.java40
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/DefaultLifecycleMapping.java121
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ILifecycleMapping.java56
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MavenProjectConfigurator.java120
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MavenResourcesProjectConfigurator.java20
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/MojoExecutionBuildParticipant.java61
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/NoopLifecycleMapping.java55
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/PluginExecutionFilter.java81
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/project/configurator/ProjectConfigurationRequest.java72
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/repository/IRepository.java98
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/repository/IRepositoryRegistry.java70
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/MavenCheckoutOperation.java129
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandler.java131
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandlerFactory.java152
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmHandlerUi.java80
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmTag.java53
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/scm/ScmUrl.java100
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/AbstractMavenDialog.java124
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/AddDependencyDialog.java617
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/EditDependencyDialog.java217
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/InputHistory.java232
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenGoalSelectionDialog.java359
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenMessageDialog.java87
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenPropertyDialog.java192
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/dialogs/MavenRepositorySearchDialog.java184
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenAdapterFactory.java67
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsoleFactory.java32
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenConsolePageParticipant.java108
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenShowConsoleAction.java83
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/MavenVersionDecorator.java112
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/components/TextComboBoxCellEditor.java103
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractLifecyclePropertyPage.java57
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/AbstractPropertyPageExtensionPoint.java67
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPage.java60
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ILifecyclePropertyPageExtensionPoint.java55
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java143
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTable.java107
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableContentProvider.java61
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/lifecycle/ProjectConfiguratorsTableLabelProvider.java96
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/CustomizableLifecycleMappingPropertyPage.java58
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/EmptyLifecycleMappingPropertyPage.java27
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/GoalsFieldEditor.java196
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java230
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java320
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenGoalSelectionAdapter.java73
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java677
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java104
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java97
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java167
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java413
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/MissingLifecycleMappingPropertyPage.java40
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/ProblemReportingPreferencePage.java57
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java284
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/preferences/SimpleLifecycleMappingPropertyPage.java62
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchPage.java141
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResult.java76
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/search/MavenSearchResultPage.java80
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java596
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewContentProvider.java86
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java97
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java86
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java77
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/CustomRepositoriesNode.java35
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/GlobalRepositoriesNode.java36
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IArtifactNode.java22
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IMavenRepositoryNode.java28
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactFileNode.java91
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactGroupNode.java101
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/IndexedArtifactNode.java92
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java38
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryRootNode.java55
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/ProjectRepositoriesNode.java66
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/RepositoryNode.java56
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/ui/internal/views/nodes/WorkspaceRepositoryNode.java32
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EErrorDialog.java218
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/M2EUtils.java108
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/ProposalUtil.java156
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/Util.java119
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ArtifactInfo.java78
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/CComboContentAdapter.java96
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/ControlDecoration.java1088
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/IndexSearchEngine.java185
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectEvent.java77
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/MenuDetectListener.java43
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/Packaging.java47
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchEngine.java49
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/util/search/SearchException.java29
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/AbstractMavenWizardPage.java218
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/CustomArchetypeDialog.java252
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenArtifactComponent.java270
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutLocationPage.java424
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenCheckoutWizard.java180
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenDependenciesWizardPage.java291
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizard.java113
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenImportWizardPage.java525
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileArtifactWizardPage.java390
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileRepositoryWizardPage.java149
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenInstallFileWizard.java151
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenLocationComponent.java193
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenMaterializePomWizard.java241
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizard.java305
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenModuleWizardParentPage.java310
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenParentComponent.java223
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomSelectionComponent.java580
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizard.java174
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenPomWizardPage.java223
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectCheckoutJob.java256
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectSelectionDialog.java192
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizard.java358
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypePage.java953
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArchetypeParametersPage.java617
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardArtifactPage.java364
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/MavenProjectWizardLocationPage.java321
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportPage.java627
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ProjectsImportWizard.java48
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/ResolverConfigurationComponent.java156
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WidthGroup.java53
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/wizards/WorkingSetGroup.java271
-rw-r--r--org.eclipse.m2e.editor.xml/.classpath7
-rw-r--r--org.eclipse.m2e.editor.xml/.gitignore1
-rw-r--r--org.eclipse.m2e.editor.xml/.project34
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.eclipse.jdt.core.prefs268
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.eclipse.jdt.ui.prefs10
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.eclipse.pde.prefs22
-rw-r--r--org.eclipse.m2e.editor.xml/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF27
-rw-r--r--org.eclipse.m2e.editor.xml/OSGI-INF/l10n/bundle.properties66
-rw-r--r--org.eclipse.m2e.editor.xml/about.html28
-rw-r--r--org.eclipse.m2e.editor.xml/build.properties20
-rw-r--r--org.eclipse.m2e.editor.xml/icons/build_obj.gifbin0 -> 115 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/close.gifbin0 -> 163 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/element_obj.gifbin0 -> 82 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/exclude_obj.gifbin0 -> 215 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/execution_obj.gifbin0 -> 318 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/filter_obj.gifbin0 -> 219 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/goal_obj.gifbin0 -> 374 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/include_obj.gifbin0 -> 229 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/jar_obj.gifbin0 -> 587 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/jars_obj.gifbin0 -> 261 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/open_pom.gifbin0 -> 234 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/parameter_obj.gifbin0 -> 204 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/person_obj.gifbin0 -> 214 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/plugin_obj.gifbin0 -> 328 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/plugins_obj.gifbin0 -> 214 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/profile_obj.gifbin0 -> 369 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/profiles_obj.gifbin0 -> 236 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/project_obj.gifbin0 -> 233 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/properties_obj.gifbin0 -> 578 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/property_obj.gifbin0 -> 204 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/report2_obj.gifbin0 -> 356 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/report_obj.gifbin0 -> 581 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/repository_obj.gifbin0 -> 362 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/resource_obj.gifbin0 -> 564 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/resources_obj.gifbin0 -> 236 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/role_obj.gifbin0 -> 129 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/sample.gifbin0 -> 983 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/icons/template_obj.gifbin0 -> 359 bytes
-rw-r--r--org.eclipse.m2e.editor.xml/plugin.xml403
-rw-r--r--org.eclipse.m2e.editor.xml/pom.xml24
-rw-r--r--org.eclipse.m2e.editor.xml/schema/.gitignore0
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java340
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java110
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MavenMarkerResolutionGenerator.java65
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java107
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java99
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java579
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentOutlineConfiguration.java358
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java729
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomModelHandler.java133
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java678
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomStructuredTextViewConfiguration.java65
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java764
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextType.java32
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java105
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTextHover.java148
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java75
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/Messages.java156
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/POMMarkerAnnotationModel.java34
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/POMMarkerAnnotationModelFactory.java34
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/messages.properties66
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/preferences/PomTemplatesPreferencePage.java43
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/template/.gitignore0
-rw-r--r--org.eclipse.m2e.editor/.classpath7
-rw-r--r--org.eclipse.m2e.editor/.gitignore2
-rw-r--r--org.eclipse.m2e.editor/.project34
-rw-r--r--org.eclipse.m2e.editor/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.m2e.editor/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.m2e.editor/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.editor/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.editor/.settings/org.eclipse.pde.prefs22
-rw-r--r--org.eclipse.m2e.editor/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.editor/META-INF/MANIFEST.MF28
-rw-r--r--org.eclipse.m2e.editor/OSGI-INF/l10n/bundle.properties8
-rw-r--r--org.eclipse.m2e.editor/about.html28
-rw-r--r--org.eclipse.m2e.editor/build.properties21
-rw-r--r--org.eclipse.m2e.editor/icons/advanced_tabs.gifbin0 -> 252 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/clear.gifbin0 -> 163 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/clear_disabled.gifbin0 -> 159 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/collapseall.gifbin0 -> 157 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/copy.gifbin0 -> 607 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/cut.gifbin0 -> 212 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/editor-pom.gifbin0 -> 249 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/effective_pom.gifbin0 -> 254 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/element_obj.gifbin0 -> 82 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/exclude_obj.gifbin0 -> 215 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/execution_obj.gifbin0 -> 318 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/expandall.gifbin0 -> 164 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/filter.gifbin0 -> 219 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/filter_obj.gifbin0 -> 219 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/goal_obj.gifbin0 -> 374 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/group.gifbin0 -> 216 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/hierarchy.gifbin0 -> 201 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/include_obj.gifbin0 -> 229 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/inherited_obj.gifbin0 -> 563 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/jar_obj.gifbin0 -> 587 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/new_jar.gifbin0 -> 269 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/new_plugin.gifbin0 -> 238 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/new_project.gifbin0 -> 274 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/parent_pom.gifbin0 -> 255 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/paste.gifbin0 -> 605 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/person_obj.gifbin0 -> 214 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/plugin_obj.gifbin0 -> 328 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/profile_obj.gifbin0 -> 369 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/project_obj.gifbin0 -> 233 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/property_obj.gifbin0 -> 204 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/refresh.gifbin0 -> 327 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/report2_obj.gifbin0 -> 356 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/report_obj.gifbin0 -> 581 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/repository_obj.gifbin0 -> 362 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/resource_obj.gifbin0 -> 564 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/role_obj.gifbin0 -> 129 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/scope.gifbin0 -> 199 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/scope_obj.gifbin0 -> 199 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/select_jar.gifbin0 -> 243 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/select_maven.gifbin0 -> 234 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/select_plugin.gifbin0 -> 234 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/show_group.gifbin0 -> 572 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/show_group2.gifbin0 -> 218 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/show_inherited_dependencies.gifbin0 -> 200 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/sort.gifbin0 -> 153 bytes
-rw-r--r--org.eclipse.m2e.editor/icons/web.gifbin0 -> 996 bytes
-rw-r--r--org.eclipse.m2e.editor/plugin.xml45
-rw-r--r--org.eclipse.m2e.editor/pom.xml24
-rw-r--r--org.eclipse.m2e.editor/schema/configurationEditorContribution.exsd123
-rw-r--r--org.eclipse.m2e.editor/schema/org.eclipse.m2e.editor.lifecycleMappingEditorContribution.exsd112
-rw-r--r--org.eclipse.m2e.editor/schema/pageFactories.exsd114
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java137
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorPlugin.java45
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/BuildComposite.java705
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComparator.java80
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java954
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java323
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java249
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ListEditorComposite.java263
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ListEditorContentProvider.java57
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ManageDependencyLabelProvider.java14
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ParentGatherer.java64
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java1377
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java885
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java1287
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/SectionExpansionAdapter.java44
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/StringLabelProvider.java39
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamComposite.java630
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/TeamLabelProvider.java65
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java527
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/Messages.java30
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/messages.properties7
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java578
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/PomEditorMenuCreator.java35
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/actions/ShowDependencyHierarchyAction.java81
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties276
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/DefaultPluginConfigurationEditor.java80
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/IPluginConfigurationExtension.java23
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java73
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java604
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependenciesPage.java119
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java1063
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java252
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/IPomFileChangedListener.java18
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/Matcher.java23
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java1214
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorContributor.java92
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java620
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPageFactory.java23
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ModulesLabelProvider.java45
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/NotificationCommandStack.java130
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java1442
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PluginsPage.java150
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PomEditorPreferencePage.java49
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ProfilesPage.java933
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertiesSection.java178
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/PropertyPairLabelProvider.java40
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ReportingPage.java110
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/RepositoriesPage.java119
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ScopeArtifactFilter.java85
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/SearchControl.java106
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/SearchMatcher.java37
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/TeamPage.java76
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/ValueProvider.java84
-rw-r--r--org.eclipse.m2e.feature/.gitignore1
-rw-r--r--org.eclipse.m2e.feature/.project23
-rw-r--r--org.eclipse.m2e.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.feature/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.feature/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.feature/build.properties18
-rw-r--r--org.eclipse.m2e.feature/epl-v10.html328
-rw-r--r--org.eclipse.m2e.feature/feature.properties170
-rw-r--r--org.eclipse.m2e.feature/feature.xml103
-rw-r--r--org.eclipse.m2e.feature/license.html113
-rw-r--r--org.eclipse.m2e.feature/p2.inf13
-rw-r--r--org.eclipse.m2e.feature/pom.xml24
-rw-r--r--org.eclipse.m2e.jdt/.classpath7
-rw-r--r--org.eclipse.m2e.jdt/.gitignore2
-rw-r--r--org.eclipse.m2e.jdt/.options11
-rw-r--r--org.eclipse.m2e.jdt/.project34
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.jdt.core.prefs360
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.jdt.ui.prefs14
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.eclipse.pde.prefs23
-rw-r--r--org.eclipse.m2e.jdt/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.jdt/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.m2e.jdt/about.html28
-rw-r--r--org.eclipse.m2e.jdt/build.properties19
-rw-r--r--org.eclipse.m2e.jdt/icons/javadoc.gifbin0 -> 323 bytes
-rw-r--r--org.eclipse.m2e.jdt/icons/m2.gifbin0 -> 222 bytes
-rw-r--r--org.eclipse.m2e.jdt/plugin.properties26
-rw-r--r--org.eclipse.m2e.jdt/plugin.xml196
-rw-r--r--org.eclipse.m2e.jdt/pom.xml24
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/BuildPathManager.java923
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/DownloadSourcesActionDelegate.java68
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/DownloadSourcesJob.java270
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathDescriptor.java113
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java115
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathManagerDelegate.java29
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IJavaProjectConfigurator.java39
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java137
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java481
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java167
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java290
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DefaultClasspathManagerDelegate.java134
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/JDTCompilationParticipant.java68
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/JarLifecycleMapping.java18
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/JavaElementsAdapterFactory.java114
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/JavaProjectConfigurator.java21
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/MavenClasspathContainer.java50
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/MavenClasspathContainerInitializer.java90
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/MavenClasspathContainerSaveHelper.java199
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/MavenClasspathVariableInitializer.java33
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/MavenJdtImages.java69
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/Messages.java120
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/DownloadSourcesAction.java78
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/actions/OpenJavaDocAction.java141
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/launch/MavenLaunchConfigurationListener.java76
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/launch/MavenRuntimeClasspathProvider.java359
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/launch/MavenSourcePathProvider.java51
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/messages.properties45
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ui/MavenClasspathContainerPage.java92
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ui/MavenJdtMenuCreator.java110
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/ui/internal/filter/MavenModuleFilter.java70
-rw-r--r--org.eclipse.m2e.launching/.classpath7
-rw-r--r--org.eclipse.m2e.launching/.gitignore1
-rw-r--r--org.eclipse.m2e.launching/.project34
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs338
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs10
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.pde.prefs22
-rw-r--r--org.eclipse.m2e.launching/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.launching/META-INF/MANIFEST.MF32
-rw-r--r--org.eclipse.m2e.launching/about.html28
-rw-r--r--org.eclipse.m2e.launching/build.properties22
-rw-r--r--org.eclipse.m2e.launching/icons/m2.gifbin0 -> 222 bytes
-rw-r--r--org.eclipse.m2e.launching/org.eclipse.m2e.cliresolver.jarbin0 -> 4914 bytes
-rw-r--r--org.eclipse.m2e.launching/org.eclipse.m2e.cliresolver30.jarbin0 -> 5614 bytes
-rw-r--r--org.eclipse.m2e.launching/plugin.properties32
-rw-r--r--org.eclipse.m2e.launching/plugin.xml220
-rw-r--r--org.eclipse.m2e.launching/pom.xml24
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java374
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java46
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java281
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java117
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java349
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java27
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java112
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java94
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourceLocator.java28
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java185
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java79
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties26
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenBuilderConfigurationTabGroup.java34
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenJRETab.java147
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java34
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java785
-rw-r--r--org.eclipse.m2e.maven.indexer/.classpath10
-rw-r--r--org.eclipse.m2e.maven.indexer/.gitignore1
-rw-r--r--org.eclipse.m2e.maven.indexer/.project34
-rw-r--r--org.eclipse.m2e.maven.indexer/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--org.eclipse.m2e.maven.indexer/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.maven.indexer/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.maven.indexer/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.maven.indexer/META-INF/MANIFEST.MF45
-rw-r--r--org.eclipse.m2e.maven.indexer/META-INF/plexus/.gitignore0
-rw-r--r--org.eclipse.m2e.maven.indexer/OSGI-INF/l10n/bundle.properties3
-rw-r--r--org.eclipse.m2e.maven.indexer/build.properties17
-rw-r--r--org.eclipse.m2e.maven.indexer/jars/indexer-artifact-3.1.0-SNAPSHOT.jarbin0 -> 26750 bytes
-rw-r--r--org.eclipse.m2e.maven.indexer/jars/indexer-core-3.1.0-SNAPSHOT.jarbin0 -> 199520 bytes
-rw-r--r--org.eclipse.m2e.maven.indexer/jars/lucene-core-2.4.1.jarbin0 -> 822794 bytes
-rw-r--r--org.eclipse.m2e.maven.indexer/jars/lucene-highlighter-2.4.1.jarbin0 -> 91156 bytes
-rw-r--r--org.eclipse.m2e.maven.indexer/pom.xml118
-rw-r--r--org.eclipse.m2e.maven.runtime/.classpath51
-rw-r--r--org.eclipse.m2e.maven.runtime/.gitignore1
-rw-r--r--org.eclipse.m2e.maven.runtime/.project34
-rw-r--r--org.eclipse.m2e.maven.runtime/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--org.eclipse.m2e.maven.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.maven.runtime/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.maven.runtime/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.maven.runtime/META-INF/MANIFEST.MF239
-rw-r--r--org.eclipse.m2e.maven.runtime/META-INF/plexus/.gitignore0
-rw-r--r--org.eclipse.m2e.maven.runtime/build.properties13
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-api-1.7.jarbin0 -> 74176 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-connector-http-1.7.0.jarbin0 -> 48495 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-connector-wagon-1.7.jarbin0 -> 24876 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-impl-1.7.jarbin0 -> 106275 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-spi-1.7.jarbin0 -> 13549 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/aether-util-1.7.jarbin0 -> 107949 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/asm-3.2.jarbin0 -> 43398 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/async-http-client-1.3.4.jarbin0 -> 205005 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/commons-cli-1.2.jarbin0 -> 41123 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-binders-1.4.2.jarbin0 -> 28985 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-converters-1.4.2.jarbin0 -> 4455 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-inject-1.4.2.jarbin0 -> 6667 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-locators-1.4.2.jarbin0 -> 33573 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-reflect-1.4.2.jarbin0 -> 35995 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-bean-scanners-1.4.2.jarbin0 -> 8853 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-binders-1.4.2.jarbin0 -> 24846 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-converters-1.4.2.jarbin0 -> 8365 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-locators-1.4.2.jarbin0 -> 11032 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-metadata-1.4.2.jarbin0 -> 13433 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-scanners-1.4.2.jarbin0 -> 18338 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/guice-plexus-shim-1.4.2.jarbin0 -> 113809 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/javax.inject-1.jarbin0 -> 2497 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-aether-provider-3.0.jarbin0 -> 51189 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-artifact-3.0.jarbin0 -> 51908 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-compat-3.0.jarbin0 -> 284889 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-core-3.0.jarbin0 -> 527040 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-embedder-3.0.jarbin0 -> 39561 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-model-3.0.jarbin0 -> 164685 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-model-builder-3.0.jarbin0 -> 147974 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-plugin-api-3.0.jarbin0 -> 48920 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-repository-metadata-3.0.jarbin0 -> 30082 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-settings-3.0.jarbin0 -> 46667 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/maven-settings-builder-3.0.jarbin0 -> 37780 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/netty-3.2.3.Final.jarbin0 -> 786229 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-build-api-0.0.6.jarbin0 -> 8074 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-cipher-1.4.jarbin0 -> 13494 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-classworlds-2.3.jarbin0 -> 46830 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-component-annotations-1.5.5.jarbin0 -> 4211 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-interpolation-1.14.jarbin0 -> 61072 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-sec-dispatcher-1.3.jarbin0 -> 28555 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/plexus-utils-2.0.4.jarbin0 -> 222137 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/sisu-guice-2.1.7-noaop.jarbin0 -> 471737 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/wagon-ahc-1.0.0.jarbin0 -> 25335 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/wagon-file-1.0-beta-6.jarbin0 -> 11040 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/jars/wagon-provider-api-1.0-beta-6.jarbin0 -> 53184 bytes
-rw-r--r--org.eclipse.m2e.maven.runtime/pom.xml24
-rw-r--r--org.eclipse.m2e.maven.runtime/update-jars-pom.xml218
-rw-r--r--org.eclipse.m2e.model.edit/.classpath8
-rw-r--r--org.eclipse.m2e.model.edit/.gitignore2
-rw-r--r--org.eclipse.m2e.model.edit/.project34
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.eclipse.jdt.core.prefs337
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.eclipse.jdt.ui.prefs10
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.eclipse.pde.prefs22
-rw-r--r--org.eclipse.m2e.model.edit/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.model.edit/META-INF/MANIFEST.MF25
-rw-r--r--org.eclipse.m2e.model.edit/OSGI-INF/l10n/bundle.properties3
-rw-r--r--org.eclipse.m2e.model.edit/about.html28
-rw-r--r--org.eclipse.m2e.model.edit/build.properties28
-rw-r--r--org.eclipse.m2e.model.edit/icons/full/obj16/PropertyPair.gifbin0 -> 129 bytes
-rw-r--r--org.eclipse.m2e.model.edit/plugin.properties348
-rw-r--r--org.eclipse.m2e.model.edit/plugin.xml42
-rw-r--r--org.eclipse.m2e.model.edit/pom.xml35
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Activation.java326
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/ActivationFile.java100
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/ActivationOS.java158
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/ActivationProperty.java98
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Build.java257
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/BuildBase.java371
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/CiManagement.java144
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Configuration.java57
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Contributor.java305
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Dependency.java429
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/DependencyManagement.java91
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/DeploymentRepository.java265
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Developer.java330
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/DistributionManagement.java382
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/DocumentRoot.java134
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Exclusion.java91
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Extension.java121
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/IssueManagement.java96
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/License.java161
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/MailingList.java246
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Model.java1448
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Notifier.java429
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Organization.java88
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Parent.java160
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Plugin.java370
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/PluginExecution.java205
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/PluginManagement.java60
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/PomFactory.java393
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/PomPackage.java6917
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Prerequisites.java94
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Profile.java620
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/PropertyElement.java93
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Relocation.java152
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/ReportPlugin.java266
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/ReportSet.java176
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Reporting.java179
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Repository.java320
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/RepositoryPolicy.java165
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Resource.java217
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Scm.java191
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/Site.java127
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ActivationFileImpl.java232
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ActivationImpl.java738
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ActivationOSImpl.java346
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ActivationPropertyImpl.java233
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/BuildBaseImpl.java691
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/BuildImpl.java506
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/CiManagementImpl.java315
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ConfigurationImpl.java242
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ContributorImpl.java609
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DependencyImpl.java737
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DependencyManagementImpl.java189
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DeploymentRepositoryImpl.java487
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DeveloperImpl.java665
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DistributionManagementImpl.java894
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/DocumentRootImpl.java317
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ExclusionImpl.java233
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ExtensionImpl.java290
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/IssueManagementImpl.java232
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/LicenseImpl.java348
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/MailingListImpl.java472
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ModelImpl.java2791
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/NotifierImpl.java747
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/OrganizationImpl.java232
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ParentImpl.java349
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PluginExecutionImpl.java444
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PluginImpl.java695
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PluginManagementImpl.java165
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PomFactoryImpl.java562
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PomPackageImpl.java4597
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PrerequisitesImpl.java214
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ProfileImpl.java1233
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/PropertyElementImpl.java232
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/RelocationImpl.java347
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ReportPluginImpl.java540
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ReportSetImpl.java383
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ReportingImpl.java361
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/RepositoryImpl.java698
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/RepositoryPolicyImpl.java337
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ResourceImpl.java411
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/ScmImpl.java385
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/impl/SiteImpl.java285
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ActivationFileItemProvider.java180
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ActivationItemProvider.java236
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ActivationOSItemProvider.java220
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ActivationPropertyItemProvider.java180
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/BuildBaseItemProvider.java297
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/BuildItemProvider.java293
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/CiManagementItemProvider.java227
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ConfigurationItemProvider.java124
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ContributorItemProvider.java313
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DependencyItemProvider.java347
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DependencyManagementItemProvider.java179
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DeploymentRepositoryItemProvider.java241
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DeveloperItemProvider.java327
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DistributionManagementItemProvider.java274
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/DocumentRootItemProvider.java178
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ExclusionItemProvider.java178
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ExtensionItemProvider.java197
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/IssueManagementItemProvider.java180
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/LicenseItemProvider.java218
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/MailingListItemProvider.java288
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ModelItemProvider.java495
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/NotifierItemProvider.java304
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/OrganizationItemProvider.java182
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ParentItemProvider.java215
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PluginExecutionItemProvider.java262
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PluginItemProvider.java303
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PluginManagementItemProvider.java179
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PomEditPlugin.java94
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PomItemProviderAdapterFactory.java1243
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PrerequisitesItemProvider.java160
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ProfileItemProvider.java305
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/PropertyElementItemProvider.java180
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/RelocationItemProvider.java226
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ReportPluginItemProvider.java285
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ReportSetItemProvider.java242
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ReportingItemProvider.java224
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/RepositoryItemProvider.java294
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/RepositoryPolicyItemProvider.java202
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ResourceItemProvider.java247
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/ScmItemProvider.java215
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/provider/SiteItemProvider.java196
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/ConfigurationAdapter.java61
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/ListAdapter.java230
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/ModelObjectAdapter.java326
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/PropertiesAdapter.java235
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/SSESyncResource.java284
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/TranslatorAdapter.java371
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/translators/ValueUpdateAdapter.java158
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/util/PomAdapterFactory.java904
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/util/PomResourceFactoryImpl.java45
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/util/PomResourceImpl.java47
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/util/PomSwitch.java1060
-rw-r--r--org.eclipse.m2e.model.edit/src/main/java/org/eclipse/m2e/model/edit/pom/util/PomXMLProcessor.java64
-rw-r--r--org.eclipse.m2e.model.edit/src/main/templates/Header.javajetinc7
-rw-r--r--org.eclipse.m2e.model.edit/src/main/templates/emf-merge.xml237
-rw-r--r--org.eclipse.m2e.model.edit/src/main/templates/model/Class.javajet2010
-rw-r--r--org.eclipse.m2e.model.edit/src/main/xsd/org/eclipse/m2e/model/pom/pom.ecore2262
-rw-r--r--org.eclipse.m2e.model.edit/src/main/xsd/org/eclipse/m2e/model/pom/pom.genmodel291
-rw-r--r--org.eclipse.m2e.model.edit/src/main/xsd/org/eclipse/m2e/model/pom/pom.xsd1971
-rw-r--r--org.eclipse.m2e.model.edit/src/main/xsd/org/eclipse/m2e/model/pom/pom.xsd2ecore768
-rw-r--r--org.eclipse.m2e.model.edit/src/main/xsd/org/eclipse/m2e/model/pom/readme.txt9
-rw-r--r--org.eclipse.m2e.model.edit/xsd/archetype-1.0.0.xsd123
-rw-r--r--org.eclipse.m2e.model.edit/xsd/archetype-catalog-1.0.0.xsd94
-rw-r--r--org.eclipse.m2e.model.edit/xsd/archetype-descriptor-1.0.0.xsd189
-rw-r--r--org.eclipse.m2e.model.edit/xsd/maven-v4_0_0.xsd2217
-rw-r--r--org.eclipse.m2e.model.edit/xsd/profiles-v1_0_0.xsd322
-rw-r--r--org.eclipse.m2e.model.edit/xsd/settings-v1_0_0.xsd715
-rw-r--r--org.eclipse.m2e.parent/.classpath5
-rw-r--r--org.eclipse.m2e.parent/.gitignore1
-rw-r--r--org.eclipse.m2e.parent/.project17
-rw-r--r--org.eclipse.m2e.parent/.settings/org.eclipse.jdt.core.prefs262
-rw-r--r--org.eclipse.m2e.parent/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.parent/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.parent/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.parent/pom.xml454
-rw-r--r--org.eclipse.m2e.parent/run.sh4
-rw-r--r--org.eclipse.m2e.refactoring/.classpath7
-rw-r--r--org.eclipse.m2e.refactoring/.gitignore1
-rw-r--r--org.eclipse.m2e.refactoring/.project34
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.eclipse.jdt.core.prefs337
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.eclipse.jdt.ui.prefs10
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.eclipse.pde.prefs22
-rw-r--r--org.eclipse.m2e.refactoring/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.refactoring/META-INF/MANIFEST.MF26
-rw-r--r--org.eclipse.m2e.refactoring/OSGI-INF/l10n/bundle.properties8
-rw-r--r--org.eclipse.m2e.refactoring/about.html28
-rw-r--r--org.eclipse.m2e.refactoring/build.properties18
-rw-r--r--org.eclipse.m2e.refactoring/icons/exclude.gifbin0 -> 215 bytes
-rw-r--r--org.eclipse.m2e.refactoring/icons/m2.gifbin0 -> 222 bytes
-rw-r--r--org.eclipse.m2e.refactoring/plugin.xml80
-rw-r--r--org.eclipse.m2e.refactoring/pom.xml24
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java321
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/ChangeCreator.java187
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/Messages.java68
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/PomRefactoringException.java28
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/PomVisitor.java33
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/RefactoringModelResources.java194
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java112
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeRefactoring.java195
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/MavenExcludeWizard.java32
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/Activator.java63
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/RefactoringImages.java62
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/RefactoringMavenMenuCreator.java36
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java166
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/messages.properties20
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/MavenRenameWizard.java40
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/MavenRenameWizardPage.java159
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameArtifactAction.java79
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java332
-rw-r--r--org.eclipse.m2e.sdk.feature/.gitignore1
-rw-r--r--org.eclipse.m2e.sdk.feature/.project23
-rw-r--r--org.eclipse.m2e.sdk.feature/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.sdk.feature/build.properties15
-rw-r--r--org.eclipse.m2e.sdk.feature/epl-v10.html328
-rw-r--r--org.eclipse.m2e.sdk.feature/feature.properties170
-rw-r--r--org.eclipse.m2e.sdk.feature/feature.xml34
-rw-r--r--org.eclipse.m2e.sdk.feature/license.html113
-rw-r--r--org.eclipse.m2e.sdk.feature/pom.xml24
-rw-r--r--org.eclipse.m2e.site/.gitignore1
-rw-r--r--org.eclipse.m2e.site/.project29
-rw-r--r--org.eclipse.m2e.site/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.m2e.site/build.properties11
-rw-r--r--org.eclipse.m2e.site/category.xml10
-rw-r--r--org.eclipse.m2e.site/feature.xml16
-rw-r--r--org.eclipse.m2e.site/pom.xml107
-rw-r--r--org.eclipse.m2e.site/src/main/assembly/assembly.xml15
-rw-r--r--target-platform/.project23
-rw-r--r--target-platform/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--target-platform/m2e-e34.target33
-rw-r--r--target-platform/m2e-e35.target31
-rw-r--r--target-platform/m2e-e36.target33
-rw-r--r--target-platform/m2e-e37.target33
-rw-r--r--target-platform/pom.xml55
966 files changed, 154921 insertions, 0 deletions
diff --git a/org.eclipse.m2e.archetype.common/.classpath b/org.eclipse.m2e.archetype.common/.classpath
new file mode 100644
index 00000000..0afc3528
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.classpath
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry exported="true" kind="lib" path="jars/jchardet-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/jdom-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/commons-io-1.3.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/plexus-velocity-1.1.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/commons-collections-3.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/archetype-common-2.0-alpha-4.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/commons-lang-2.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/oro-2.0.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="jars/velocity-1.5.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.archetype.common/.gitignore b/org.eclipse.m2e.archetype.common/.gitignore
new file mode 100644
index 00000000..ea8c4bf7
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/org.eclipse.m2e.archetype.common/.project b/org.eclipse.m2e.archetype.common/.project
new file mode 100644
index 00000000..cf2cd51b
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.archetype.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.archetype.common/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..a413c41a
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Feb 04 10:56:12 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 00000000..cbc5af3c
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Aug 28 19:39:02 EDT 2008
+eclipse.preferences.version=1
+project.repository.kind=jira
+project.repository.url=http\://jira.codehaus.org
diff --git a/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 00000000..44987de8
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 28 19:39:02 EDT 2008
+commit.comment.template=${task.key}\: ${task.description}
+eclipse.preferences.version=1
diff --git a/org.eclipse.m2e.archetype.common/.settings/org.maven.ide.eclipse.prefs b/org.eclipse.m2e.archetype.common/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..58e131a1
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 16 11:32:17 EST 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/org.eclipse.m2e.archetype.common/META-INF/MANIFEST.MF b/org.eclipse.m2e.archetype.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..57289d99
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/META-INF/MANIFEST.MF
@@ -0,0 +1,46 @@
+Manifest-Version: 1.0
+Export-Package: META-INF.plexus,
+ org.apache.maven.archetype,
+ org.apache.maven.archetype.catalog,
+ org.apache.maven.archetype.catalog.io.xpp3,
+ org.apache.maven.archetype.common,
+ org.apache.maven.archetype.common.io.xpp3,
+ org.apache.maven.archetype.common.util,
+ org.apache.maven.archetype.creator,
+ org.apache.maven.archetype.creator.olddescriptor,
+ org.apache.maven.archetype.downloader,
+ org.apache.maven.archetype.exception,
+ org.apache.maven.archetype.generator,
+ org.apache.maven.archetype.metadata,
+ org.apache.maven.archetype.metadata.io.xpp3,
+ org.apache.maven.archetype.model,
+ org.apache.maven.archetype.model.io.xpp3,
+ org.apache.maven.archetype.old,
+ org.apache.maven.archetype.old.descriptor,
+ org.apache.maven.archetype.registry,
+ org.apache.maven.archetype.registry.io.xpp3,
+ org.apache.maven.archetype.repositorycrawler,
+ org.apache.maven.archetype.source,
+ org.codehaus.plexus.velocity
+Bundle-ClassPath: jars/jchardet-1.0.jar,
+ jars/dom4j-1.6.1.jar,
+ jars/jdom-1.0.jar,
+ jars/commons-io-1.3.2.jar,
+ jars/plexus-velocity-1.1.3.jar,
+ jars/commons-collections-3.2.jar,
+ jars/archetype-common-2.0-alpha-4.jar,
+ jars/commons-lang-2.1.jar,
+ jars/oro-2.0.8.jar,
+ jars/velocity-1.5.jar
+Bundle-Name: %Bundle-Name
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ JavaSE-1.6
+Require-Bundle: org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)"
+Bundle-Vendor: %Bundle-Vendor
+MavenArtifact-BaseVersion: 2.0.1.20090526-1230
+Bundle-Version: 0.13.0.qualifier
+MavenArtifact-GroupId: org.eclipse.m2e
+MavenArtifact-ArtifactId: org.eclipse.m2e.archetype.common
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.m2e.archetype.common;singleton:=true
+
diff --git a/org.eclipse.m2e.archetype.common/META-INF/plexus/.gitignore b/org.eclipse.m2e.archetype.common/META-INF/plexus/.gitignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/META-INF/plexus/.gitignore
diff --git a/org.eclipse.m2e.archetype.common/OSGI-INF/l10n/bundle.properties b/org.eclipse.m2e.archetype.common/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000..716b225f
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.m2e.archetype_common
+Bundle-Vendor = Eclipse m2e
+Bundle-Name = Maven Archetype Common Bundle \ No newline at end of file
diff --git a/org.eclipse.m2e.archetype.common/build.properties b/org.eclipse.m2e.archetype.common/build.properties
new file mode 100644
index 00000000..13994ad1
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/build.properties
@@ -0,0 +1,14 @@
+#
+# Copyright (c) 2008-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
+#
+
+bin.includes = META-INF/,\
+ jars/,\
+ OSGI-INF/l10n/bundle.properties
diff --git a/org.eclipse.m2e.archetype.common/jars/archetype-common-2.0-alpha-4.jar b/org.eclipse.m2e.archetype.common/jars/archetype-common-2.0-alpha-4.jar
new file mode 100644
index 00000000..32dfddb1
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/archetype-common-2.0-alpha-4.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/commons-collections-3.2.jar b/org.eclipse.m2e.archetype.common/jars/commons-collections-3.2.jar
new file mode 100644
index 00000000..75580be2
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/commons-collections-3.2.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/commons-io-1.3.2.jar b/org.eclipse.m2e.archetype.common/jars/commons-io-1.3.2.jar
new file mode 100644
index 00000000..865c9e41
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/commons-io-1.3.2.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/commons-lang-2.1.jar b/org.eclipse.m2e.archetype.common/jars/commons-lang-2.1.jar
new file mode 100644
index 00000000..87b80ab5
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/commons-lang-2.1.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/dom4j-1.6.1.jar b/org.eclipse.m2e.archetype.common/jars/dom4j-1.6.1.jar
new file mode 100644
index 00000000..c8c4dbb9
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/dom4j-1.6.1.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/jchardet-1.0.jar b/org.eclipse.m2e.archetype.common/jars/jchardet-1.0.jar
new file mode 100644
index 00000000..c362d03c
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/jchardet-1.0.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/jdom-1.0.jar b/org.eclipse.m2e.archetype.common/jars/jdom-1.0.jar
new file mode 100644
index 00000000..288e64cb
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/jdom-1.0.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/oro-2.0.8.jar b/org.eclipse.m2e.archetype.common/jars/oro-2.0.8.jar
new file mode 100644
index 00000000..23488d26
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/oro-2.0.8.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/plexus-velocity-1.1.3.jar b/org.eclipse.m2e.archetype.common/jars/plexus-velocity-1.1.3.jar
new file mode 100644
index 00000000..36bac039
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/plexus-velocity-1.1.3.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/jars/velocity-1.5.jar b/org.eclipse.m2e.archetype.common/jars/velocity-1.5.jar
new file mode 100644
index 00000000..7c7f2c43
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/jars/velocity-1.5.jar
Binary files differ
diff --git a/org.eclipse.m2e.archetype.common/pom.xml b/org.eclipse.m2e.archetype.common/pom.xml
new file mode 100644
index 00000000..1d4afbd2
--- /dev/null
+++ b/org.eclipse.m2e.archetype.common/pom.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2008 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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.parent</artifactId>
+ <version>0.13.0-SNAPSHOT</version>
+ <relativePath>../org.eclipse.m2e.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.m2e.archetype.common</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Maven Archetype Common Bundle</name>
+
+ <profiles>
+ <profile>
+ <id>update-dependencies</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-common</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>jars</directory>
+ <followSymlinks>false</followSymlinks>
+ <includes>
+ <include>**/*.jar</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>META-INF</directory>
+ <followSymlinks>false</followSymlinks>
+ <includes>
+ <include>**/MANIFEST.MF</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-packaging-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>generate-bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <packageSources>false</packageSources>
+ <exportPackages>
+ org.apache.maven.archetype.*
+ </exportPackages>
+ <manifestAttributes>
+ <Bundle-RequiredExecutionEnvironment>J2SE-1.5, JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
+ </manifestAttributes>
+ <requireBundles>
+ <requireBundle>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.maven.runtime</artifactId>
+ <version>${maven_embedder.version}</version>
+ </requireBundle>
+ </requireBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/org.eclipse.m2e.core/.classpath b/org.eclipse.m2e.core/.classpath
new file mode 100644
index 00000000..798048dd
--- /dev/null
+++ b/org.eclipse.m2e.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.m2e.core/.fbprefs b/org.eclipse.m2e.core/.fbprefs
new file mode 100644
index 00000000..58a8e910
--- /dev/null
+++ b/org.eclipse.m2e.core/.fbprefs
@@ -0,0 +1,146 @@
+#FindBugs User Preferences
+#Sat Jul 05 12:32:13 EDT 2008
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBCPMethodReturnCheck=BCPMethodReturnCheck|false
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCalledMethods=CalledMethods|true
+detectorCheckCalls=CheckCalls|false
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|true
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqStringTest=EqStringTest|false
+detectorFieldItemSummary=FieldItemSummary|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast=FindBadCast|false
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadEqualsImplementation=FindBadEqualsImplementation|false
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindBugsSummaryStats=FindBugsSummaryStats|true
+detectorFindCircularDependencies=FindCircularDependencies|true
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindFloatMath=FindFloatMath|false
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|false
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|false
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInefficientMemberAccess=InefficientMemberAccess|true
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|true
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorLockedFields=LockedFields|false
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMethods=Methods|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNoteAnnotationRetention=NoteAnnotationRetention|true
+detectorNoteCheckReturnValue=NoteCheckReturnValue|true
+detectorNoteCheckReturnValueAnnotations=NoteCheckReturnValueAnnotations|true
+detectorNoteDirectlyRelevantTypeQualifiers=NoteDirectlyRelevantTypeQualifiers|true
+detectorNoteJCIPAnnotation=NoteJCIPAnnotation|true
+detectorNoteNonNullAnnotations=NoteNonNullAnnotations|true
+detectorNoteNonnullReturnValues=NoteNonnullReturnValues|true
+detectorNoteSuppressedWarnings=NoteSuppressedWarnings|true
+detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|true
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorReflectiveClasses=ReflectiveClasses|true
+detectorResolveAllReferences=ResolveAllReferences|false
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorTestASM=TestASM|false
+detectorTestDataflowAnalysis=TestDataflowAnalysis|false
+detectorTestingGround=TestingGround|false
+detectorTrainFieldStoreTypes=TrainFieldStoreTypes|true
+detectorTrainNonNullAnnotations=TrainNonNullAnnotations|true
+detectorTrainUnconditionalDerefParams=TrainUnconditionalDerefParams|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUseObjectEquals=UseObjectEquals|true
+detectorUselessSubclassMethod=UselessSubclassMethod|true
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=3
+effort=max
+filter_settings=Low|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
+filter_settings_neg=|
diff --git a/org.eclipse.m2e.core/.gitignore b/org.eclipse.m2e.core/.gitignore
new file mode 100644
index 00000000..4dc00917
--- /dev/null
+++ b/org.eclipse.m2e.core/.gitignore
@@ -0,0 +1,2 @@
+/target
+/bin
diff --git a/org.eclipse.m2e.core/.options b/org.eclipse.m2e.core/.options
new file mode 100644
index 00000000..9c79ceb9
--- /dev/null
+++ b/org.eclipse.m2e.core/.options
@@ -0,0 +1,29 @@
+# Debugging options for the org.eclipse.m2e plugin.
+
+# Turn on debugging for the org.eclipse.m2e plugin.
+org.eclipse.m2e/debug=false
+
+# Plugin initialization
+org.eclipse.m2e/debug/initialization=false
+
+# Maven builder
+org.eclipse.m2e/debug/builder=false
+
+# Maven project facade
+org.eclipse.m2e/debug/projectManager=false
+
+
+# legacy options
+
+# plugin
+org.eclipse.m2e/plugin=false
+
+# launcher activity
+org.eclipse.m2e/launcher=false
+
+# actions activity
+org.eclipse.m2e/actions=false
+
+# console activity
+org.eclipse.m2e/console=false
+
diff --git a/org.eclipse.m2e.core/.project b/org.eclipse.m2e.core/.project
new file mode 100644
index 00000000..efc103df
--- /dev/null
+++ b/org.eclipse.m2e.core/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2e.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..f11a2c0a
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,359 @@
+#Thu Feb 04 10:56:12 EST 2010
+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.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.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.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.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.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+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.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=error
+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=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+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_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=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_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.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..fb3a058c
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,14 @@
+#Tue Nov 30 18:50:43 EST 2010
+eclipse.preferences.version=1
+formatter_profile=_m2 plugin
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;org.w3c;org.xml;org.apache;com;junit;org.eclipse;org.codehaus;org.apache.lucene;org.apache.maven;org.sonatype;org.eclipse.m2e;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=false
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************&\#13;\n * Copyright (c) 2010 Sonatype, Inc.&\#13;\n * All rights reserved. This program and the accompanying materials&\#13;\n * are made available under the terms of the Eclipse Public License v1.0&\#13;\n * which accompanies this distribution, and is available at&\#13;\n * http\://www.eclipse.org/legal/epl-v10.html&\#13;\n *&\#13;\n * Contributors\:&\#13;\n * Sonatype, Inc. - initial API and implementation&\#13;\n *******************************************************************************/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${type_name}\n *\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nMavenLogger.log(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method ${enclosing_method}\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nMavenLogger.log(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.mylar.tasklist.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.mylar.tasklist.prefs
new file mode 100644
index 00000000..7bf437fe
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.mylar.tasklist.prefs
@@ -0,0 +1,4 @@
+#Wed Nov 29 23:26:43 EST 2006
+eclipse.preferences.version=1
+project.repository.kind=jira
+project.repository.url=http\://jira.codehaus.org
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 00000000..221818e3
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Aug 28 19:38:53 EDT 2008
+eclipse.preferences.version=1
+project.repository.kind=jira
+project.repository.url=http\://jira.codehaus.org
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 00000000..a6f9c61e
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Sat Nov 17 11:49:52 EST 2007
+commit.comment.template=${task.key}\: ${task.description}
+eclipse.preferences.version=1
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.pde.core.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 00000000..da324b13
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Fri Oct 26 19:41:18 EDT 2007
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.m2e.core/.settings/org.eclipse.pde.prefs b/org.eclipse.m2e.core/.settings/org.eclipse.pde.prefs
new file mode 100644
index 00000000..94ae750a
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,23 @@
+#Sat Jul 05 10:00:23 EDT 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=2
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/org.eclipse.m2e.core/.settings/org.maven.ide.eclipse.prefs b/org.eclipse.m2e.core/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..ac87b894
--- /dev/null
+++ b/org.eclipse.m2e.core/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 16 11:32:18 EST 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/org.eclipse.m2e.core/META-INF/MANIFEST.MF b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..09f4a8fc
--- /dev/null
+++ b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
@@ -0,0 +1,54 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.m2e.core;singleton:=true
+Bundle-Version: 0.13.0.qualifier
+Bundle-Activator: org.eclipse.m2e.core.MavenPlugin
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.core.variables,
+ org.eclipse.core.expressions,
+ org.eclipse.core.filesystem,
+ org.eclipse.search,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.console,
+ org.eclipse.ui.forms,
+ org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)",
+ org.eclipse.m2e.archetype.common;bundle-version="[0.13.0,0.14.0)",
+ org.eclipse.m2e.maven.indexer;bundle-version="[0.13.0,0.14.0)",
+ org.eclipse.m2e.model.edit;bundle-version="[0.13.0,0.14.0)",
+ com.ibm.icu;bundle-version="4.0.1"
+Eclipse-LazyStart: true
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ JavaSE-1.6
+Export-Package: org.eclipse.m2e.core,
+ org.eclipse.m2e.core.actions,
+ org.eclipse.m2e.core.archetype,
+ org.eclipse.m2e.core.builder;x-internal:=true,
+ org.eclipse.m2e.core.core,
+ org.eclipse.m2e.core.embedder,
+ org.eclipse.m2e.core.index,
+ org.eclipse.m2e.core.internal;x-friends:="org.eclipse.m2e.core.tests,org.eclipse.m2e.jdt",
+ org.eclipse.m2e.core.internal.embedder;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.internal.index;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.internal.preferences;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.internal.project;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.internal.project.registry;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.internal.repository;x-friends:="org.eclipse.m2e.core.tests",
+ org.eclipse.m2e.core.jobs,
+ org.eclipse.m2e.core.project,
+ org.eclipse.m2e.core.project.configurator,
+ org.eclipse.m2e.core.repository,
+ org.eclipse.m2e.core.scm,
+ org.eclipse.m2e.core.ui.dialogs,
+ org.eclipse.m2e.core.ui.internal.preferences;x-internal:=true,
+ org.eclipse.m2e.core.util,
+ org.eclipse.m2e.core.util.search,
+ org.eclipse.m2e.core.wizards
+MavenArtifact-GroupId: org.eclipse.m2e
+MavenArtifact-ArtifactId: org.eclipse.m2e.core
diff --git a/org.eclipse.m2e.core/about.html b/org.eclipse.m2e.core/about.html
new file mode 100644
index 00000000..70e4b67c
--- /dev/null
+++ b/org.eclipse.m2e.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 29, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/org.eclipse.m2e.core/about.ini b/org.eclipse.m2e.core/about.ini
new file mode 100644
index 00000000..3a6b91f9
--- /dev/null
+++ b/org.eclipse.m2e.core/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=m2eclipse.gif
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# welcomePage=$nl$/welcome.xml
diff --git a/org.eclipse.m2e.core/build.properties b/org.eclipse.m2e.core/build.properties
new file mode 100644
index 00000000..b41d4080
--- /dev/null
+++ b/org.eclipse.m2e.core/build.properties
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2008-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
+#
+
+bin.includes = plugin.xml,\
+ META-INF/,\
+ about.ini,\
+ plugin.properties,\
+ .options,\
+ icons/,\
+ m2eclipse.gif,\
+ .,\
+ intro/,\
+ schema/,\
+ about.html
+jars.compile.order = .
+output.. = target/classes
+source.. = src/
diff --git a/org.eclipse.m2e.core/icons/add_index.gif b/org.eclipse.m2e.core/icons/add_index.gif
new file mode 100644
index 00000000..33f47317
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/add_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/clear.gif b/org.eclipse.m2e.core/icons/clear.gif
new file mode 100644
index 00000000..2cd9c544
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/clear.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/clear_disabled.gif b/org.eclipse.m2e.core/icons/clear_disabled.gif
new file mode 100644
index 00000000..559e4629
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/clear_disabled.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/close.gif b/org.eclipse.m2e.core/icons/close.gif
new file mode 100644
index 00000000..2cd9c544
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/close.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/collapseall.gif b/org.eclipse.m2e.core/icons/collapseall.gif
new file mode 100644
index 00000000..a2d80a90
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/collapseall.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/copy.gif b/org.eclipse.m2e.core/icons/copy.gif
new file mode 100644
index 00000000..6d0dd17d
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/copy.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/debug.gif b/org.eclipse.m2e.core/icons/debug.gif
new file mode 100644
index 00000000..518e8660
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/debug.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_jar.gif b/org.eclipse.m2e.core/icons/import_jar.gif
new file mode 100644
index 00000000..da5afb91
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/import_jar.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_m2_project.gif b/org.eclipse.m2e.core/icons/import_m2_project.gif
new file mode 100644
index 00000000..4edf66db
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/import_m2_project.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/import_project.png b/org.eclipse.m2e.core/icons/import_project.png
new file mode 100644
index 00000000..3a5f3ac6
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/import_project.png
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_obj.gif b/org.eclipse.m2e.core/icons/jar_obj.gif
new file mode 100644
index 00000000..2fa1d777
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/jar_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_src_version.gif b/org.eclipse.m2e.core/icons/jar_src_version.gif
new file mode 100644
index 00000000..26c73738
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/jar_src_version.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/jar_version.gif b/org.eclipse.m2e.core/icons/jar_version.gif
new file mode 100644
index 00000000..908dda8b
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/jar_version.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/java_obj.gif b/org.eclipse.m2e.core/icons/java_obj.gif
new file mode 100644
index 00000000..9a1797d2
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/java_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/java_src_obj.gif b/org.eclipse.m2e.core/icons/java_src_obj.gif
new file mode 100644
index 00000000..307954d2
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/java_src_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/lock_ovr.gif b/org.eclipse.m2e.core/icons/lock_ovr.gif
new file mode 100644
index 00000000..c1facbbe
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/lock_ovr.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/m2.gif b/org.eclipse.m2e.core/icons/m2.gif
new file mode 100644
index 00000000..4b0c0589
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/m2.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/m2eclipse48.gif b/org.eclipse.m2e.core/icons/m2eclipse48.gif
new file mode 100644
index 00000000..84090bc0
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/m2eclipse48.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/main_tab.gif b/org.eclipse.m2e.core/icons/main_tab.gif
new file mode 100644
index 00000000..9b9f79a6
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/main_tab.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/maven_index.gif b/org.eclipse.m2e.core/icons/maven_index.gif
new file mode 100644
index 00000000..6645b64a
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/maven_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/maven_indexes.gif b/org.eclipse.m2e.core/icons/maven_indexes.gif
new file mode 100644
index 00000000..c288bfae
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/maven_indexes.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/mjar.gif b/org.eclipse.m2e.core/icons/mjar.gif
new file mode 100644
index 00000000..d6b14677
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/mjar.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/mlabel.gif b/org.eclipse.m2e.core/icons/mlabel.gif
new file mode 100644
index 00000000..b801751b
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/mlabel.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_pom.gif b/org.eclipse.m2e.core/icons/new_m2_pom.gif
new file mode 100644
index 00000000..05bab80d
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/new_m2_pom.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_project.gif b/org.eclipse.m2e.core/icons/new_m2_project.gif
new file mode 100644
index 00000000..ba5c27b8
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/new_m2_project.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/new_m2_project_wizard.gif b/org.eclipse.m2e.core/icons/new_m2_project_wizard.gif
new file mode 100644
index 00000000..8f18a52b
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/new_m2_project_wizard.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/open_pom.gif b/org.eclipse.m2e.core/icons/open_pom.gif
new file mode 100644
index 00000000..e74037b4
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/open_pom.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/pom_obj.gif b/org.eclipse.m2e.core/icons/pom_obj.gif
new file mode 100644
index 00000000..aa4c32cd
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/pom_obj.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/rebuild_index.gif b/org.eclipse.m2e.core/icons/rebuild_index.gif
new file mode 100644
index 00000000..164abc7b
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/rebuild_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/refresh.gif b/org.eclipse.m2e.core/icons/refresh.gif
new file mode 100644
index 00000000..3ca04d06
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/refresh.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/stderr.gif b/org.eclipse.m2e.core/icons/stderr.gif
new file mode 100644
index 00000000..27e7c9dd
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/stderr.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/stdout.gif b/org.eclipse.m2e.core/icons/stdout.gif
new file mode 100644
index 00000000..43d51bc0
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/stdout.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_dependencies.gif b/org.eclipse.m2e.core/icons/update_dependencies.gif
new file mode 100644
index 00000000..f760cd32
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/update_dependencies.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_index.gif b/org.eclipse.m2e.core/icons/update_index.gif
new file mode 100644
index 00000000..0bdecce8
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/update_index.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/update_source_folders.gif b/org.eclipse.m2e.core/icons/update_source_folders.gif
new file mode 100644
index 00000000..75663483
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/update_source_folders.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/icons/web.gif b/org.eclipse.m2e.core/icons/web.gif
new file mode 100644
index 00000000..09f609d6
--- /dev/null
+++ b/org.eclipse.m2e.core/icons/web.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/intro/css/overview.css b/org.eclipse.m2e.core/intro/css/overview.css
new file mode 100644
index 00000000..66df774c
--- /dev/null
+++ b/org.eclipse.m2e.core/intro/css/overview.css
@@ -0,0 +1,9 @@
+
+a#m2eclipse-overview img {
+ background-image: url(../../icons/m2eclipse48.gif);
+}
+
+a#m2eclipse-overview:hover img {
+ background-image: url(../../icons/m2eclipse48.gif);
+}
+
diff --git a/org.eclipse.m2e.core/intro/css/whatsnew.css b/org.eclipse.m2e.core/intro/css/whatsnew.css
new file mode 100644
index 00000000..d4c06d3d
--- /dev/null
+++ b/org.eclipse.m2e.core/intro/css/whatsnew.css
@@ -0,0 +1,9 @@
+
+a#m2eclipse-noteworthy img {
+ background-image: url(../../icons/m2eclipse48.gif);
+}
+
+a#m2eclipse-noteworthy:hover img {
+ background-image: url(../../icons/m2eclipse48.gif);
+}
+
diff --git a/org.eclipse.m2e.core/intro/overview.xml b/org.eclipse.m2e.core/intro/overview.xml
new file mode 100644
index 00000000..7ef3072c
--- /dev/null
+++ b/org.eclipse.m2e.core/intro/overview.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<introContent>
+ <extensionContent id="org.eclipse.m2e" name="Maven Integration for Eclipse"
+ style="css/overview.css" path="overview/@">
+ <group id="content-group" style-id="content-group">
+ <link id="m2eclipse-overview" style-id="content-link"
+ label="Maven Integration for Eclipse"
+ url="http://www.sonatype.com/book/reference/eclipse.html">
+ <text>See an overview of the features provided by Maven Integration for Eclipse (m2eclipse).</text>
+ </link>
+ <!--
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.m2e.book&amp;class=org.eclipse.m2e.actions.ShowOwerviewAction&amp;id=org.eclipse.m2e.actions.owerview.action">
+ url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.m2e.book/book/"
+ -->
+ </group>
+ </extensionContent>
+</introContent>
diff --git a/org.eclipse.m2e.core/intro/whatsnew.xml b/org.eclipse.m2e.core/intro/whatsnew.xml
new file mode 100644
index 00000000..a19dc9f0
--- /dev/null
+++ b/org.eclipse.m2e.core/intro/whatsnew.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<introContent>
+ <extensionContent id="org.eclipse.m2e" name="Maven Integration for Eclipse"
+ style="css/whatsnew.css" path="whatsnew/@">
+ <group id="content-group" style-id="content-group">
+ <link id="m2eclipse-noteworthy" style-id="content-link"
+ label="Maven Integration for Eclipse"
+ url="http://m2eclipse.sonatype.org/new-and-noteworthy.html">
+ <text>
+ See some of the more interesting or significant changes in the
+ Maven Integration for Eclipse.
+ </text>
+ </link>
+ </group>
+ </extensionContent>
+</introContent>
diff --git a/org.eclipse.m2e.core/m2eclipse.gif b/org.eclipse.m2e.core/m2eclipse.gif
new file mode 100644
index 00000000..585a2aba
--- /dev/null
+++ b/org.eclipse.m2e.core/m2eclipse.gif
Binary files differ
diff --git a/org.eclipse.m2e.core/plugin.properties b/org.eclipse.m2e.core/plugin.properties
new file mode 100644
index 00000000..2f0a8819
--- /dev/null
+++ b/org.eclipse.m2e.core/plugin.properties
@@ -0,0 +1,111 @@
+#
+# Copyright (c) 2007, 2008 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
+#
+
+m2.builder.name=Maven Project Builder
+m2.nature.name=Maven Nature
+
+m2.decorator.name=Maven Decorator
+m2.decorator.description=Adds an icon decoration to \
+ projects with Maven dependency management enabled.
+
+m2.decorator.version.name=Maven Version Decorator
+m2.decorator.version.description=Shows version for managed projects.
+
+m2.popup.project.label=Maven
+m2.popup.project.enable.label=Enable Maven Support
+m2.popup.project.disable.label=Disable Maven Support
+m2.popup.project.includeModules.label=Enable Nested Modules
+m2.popup.project.workspaceResolution.label=Enable Workspace Resolution
+m2.popup.project.add-dependency.label=Add Dependency
+m2.popup.project.update-sources.label=Update Source Folders
+
+m2.shortcut.open.pom=Open Maven POM
+
+m2.marker.problem.name=Maven Problem
+m2.marker.problem.pomloading.name=Maven pom Loading Problem
+m2.marker.problem.configuration.name=Maven Configuration Problem
+m2.marker.problem.dependency.name=Maven Dependency Problem
+m2.marker.problem.build.name=Maven Build Problem
+m2.marker.hint.name=Maven Problem
+
+m2.preferences.page.name=Maven
+
+m2.wizard.name=Maven
+m2.wizard.pom.name=Maven POM file
+m2.wizard.project.name=Maven Project
+
+m2.wizard.project.description=Create a Maven Project
+
+m2.wizard.import.name=Existing Maven Projects
+m2.wizard.import.description=Import Existing Maven Projects
+
+m2.wizard.materialize.name=Materialize Maven Projects
+m2.wizard.materialize.description=Materialize Maven Projects
+
+m2.wizard.module.name=Maven Module
+m2.wizard.module.description=Create a Maven module
+
+m2.editor.pom.name=Maven POM Editor
+
+m2.shortcut.addDependency=Add Maven Dependency
+m2.shortcut.addPlugin=Add Maven Plugin
+Bundle-Vendor = Sonatype, Inc.
+Bundle-Name = Maven Integration for Eclipse
+content-type.name = Maven POM XML
+checkoutaction.label = Check out as Maven Project...
+openpomaction.label = Open POM
+openpomaction.label2 = Open POM
+openpomaction.label3 = Open POM
+openpomaction.label4 = Open POM
+openprojectaction.label = Open Project Page
+openprojectaction.label2 = Open Project Page
+openprojectaction.label3 = Open Project Page
+openprojectaction.label4 = Open Project Page
+command.opentype.description = Open Maven Type
+command.adddependency.description = Add Maven Dependency
+command.addplugin.description = Add Maven Plugin
+keyword.label = maven
+page.installations.name = Installations
+page.usersettings.name = User Settings
+page.reporting.name = Problem Reporting
+page.archetypes.name = Archetypes
+wizard.checkout.name = Checkout Maven Projects from SCM
+wizard.checkout.description = Check out Maven Project from SVN
+category.general.name = General
+wizard.checkout2.name = Check out Maven Projects from SCM
+wizard.checkout2.description = Checkout Maven Project from SCM
+wizard.install.name = Install or deploy an artifact to a Maven repository
+wizard.install.description = Install or Deploy an artifact (archive) into a Maven repository
+consoleFactory.label = Maven Console
+actionSet.navigation.label = Maven Navigation
+action.openpom.label = Open Maven POM...
+action.openpom.tooltip = Open Maven POM
+action.updatedeps.label = Update All Maven Dependencies
+action.updatedeps.tooltip = Refresh Maven Models
+actionSet.maven.label = Maven
+action.adddep.label = Add Maven Dependency
+action.adddep.tooltip = Add Maven Dependency
+action.addplugin.label = Add Maven Plugin
+action.add.plugin.tooltip = Add Maven Plugin
+category.maven.name = Maven
+view.repos.name = Maven Repositories
+page.maven.name = Maven
+page.mappings.name = Lifecycle Mapping
+lifecycleMapping.custom.name = Customizable Lifecycle Mapping
+lifecycleMapping.empty.name = Empty Lifecycle Mapping
+extension-point.indexes.name = Maven Indexes
+extension-point.scmhandlers.name = SCM Handlers
+extension-point.scmhandlersui.name = SCM Handlers UI
+extension-point.archetypes.name = Maven Archetypes
+extension-point.configurators.name = Project Configurators
+extension-point.m2menu.name = m2 menu items
+extension-point.lifecyclemappings.name = Maven Lifecycle Mappings
+extension-point.mapping.proppage.name = Maven Lifecycle Mapping Property Page
+extension-point.mappingdefault.name = Default Maven Lifecycle Mappings
+extension-point.component.name = Maven Core Component Contributor
+extension-point.changed.name = mavenProjectChangedListeners \ No newline at end of file
diff --git a/org.eclipse.m2e.core/plugin.xml b/org.eclipse.m2e.core/plugin.xml
new file mode 100644
index 00000000..b49be2c6
--- /dev/null
+++ b/org.eclipse.m2e.core/plugin.xml
@@ -0,0 +1,617 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2007, 2008 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.0"?>
+<plugin>
+ <extension-point id="indexes" name="%extension-point.indexes.name" schema="schema/indexes.exsd"/>
+ <extension-point id="scmHandlers" name="%extension-point.scmhandlers.name" schema="schema/scmHandlers.exsd"/>
+ <extension-point id="scmHandlersUi" name="%extension-point.scmhandlersui.name" schema="schema/scmHandlersUi.exsd"/>
+ <extension-point id="archetypeCatalogs" name="%extension-point.archetypes.name" schema="schema/archetypes.exsd"/>
+ <extension-point id="projectConfigurators" name="%extension-point.configurators.name" schema="schema/projectConfigurators.exsd"/>
+ <extension-point id="m2menu" name="%extension-point.m2menu.name" schema="schema/m2menu.exsd"/>
+ <extension-point id="lifecycleMappings" name="%extension-point.lifecyclemappings.name" schema="schema/lifecycleMappings.exsd"/>
+ <extension-point id="lifecycleMappingPropertyPage" name = "%extension-point.mapping.proppage.name" schema = "schema/lifecycleMappingPropertyPage.exsd"/>
+ <extension-point id="mavenComponentContributors" name="%extension-point.component.name" schema="schema/mavenComponentContributors.exsd"/>
+ <extension-point id="mavenProjectChangedListeners" name="%extension-point.changed.name" schema="schema/mavenProjectChangedListeners.exsd"/>
+ <extension point="org.eclipse.ui.intro.configExtension">
+ <configExtension configId="org.eclipse.ui.intro.universalConfig"
+ content="intro/overview.xml"/>
+ <configExtension configId="org.eclipse.ui.intro.universalConfig"
+ content="intro/whatsnew.xml"/>
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.contentTypes">
+ <content-type id="pomFile" name="%content-type.name"
+ base-type="org.eclipse.core.runtime.xml"
+ priority="normal"
+ default-charset="UTF-8"
+ file-names="pom.xml"
+ file-extensions="pom,xml">
+ <describer class="org.eclipse.m2e.core.internal.content.PomFileContentDescriber"/>
+ </content-type>
+ </extension>
+
+ <extension point="org.eclipse.core.resources.builders"
+ id="maven2Builder"
+ name="%m2.builder.name">
+ <builder hasNature="true" isConfigurable="false">
+ <run class="org.eclipse.m2e.core.internal.builder.MavenBuilder"/>
+ </builder>
+ </extension>
+ <extension point="org.eclipse.core.resources.natures"
+ id="maven2Nature"
+ name="%m2.nature.name">
+ <runtime>
+ <run class="org.eclipse.m2e.core.internal.builder.MavenNature"/>
+ </runtime>
+ <builder id="org.eclipse.m2e.core.maven2Builder"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.decorators">
+ <decorator
+ adaptable="true"
+ icon="icons/mlabel.gif"
+ id="org.eclipse.m2e.core.maven2decorator"
+ label="%m2.decorator.name"
+ lightweight="true"
+ location="TOP_LEFT"
+ state="true">
+ <description>%m2.decorator.description</description>
+ <enablement>
+ <or>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ <!--objectState name="name" value="pom.xml"/-->
+ <objectState name="label" value="Maven Dependencies"/>
+ </or>
+ </enablement>
+ </decorator>
+
+ <decorator id="org.eclipse.m2e.core.mavenVersionDecorator"
+ adaptable="true"
+ label="%m2.decorator.version.name"
+ lightweight="false"
+ class="org.eclipse.m2e.core.ui.internal.MavenVersionDecorator"
+ state="false">
+ <description>%m2.decorator.version.description</description>
+ <enablement>
+ <or>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ <!--objectState name="name" value="pom.xml"/-->
+ </or>
+ </enablement>
+ </decorator>
+
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory adaptableType="org.eclipse.core.runtime.IAdaptable"
+ class="org.eclipse.m2e.core.ui.internal.MavenAdapterFactory">
+ <adapter type="org.eclipse.ui.IActionFilter"/>
+ </factory>
+ <factory adaptableType="org.eclipse.core.resources.IResource"
+ class="org.eclipse.m2e.core.internal.project.ArtifactKeyAdapterFactory">
+ <adapter type="org.eclipse.m2e.core.embedder.ArtifactKey"/>
+ </factory>
+ </extension>
+
+ <!--
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet id="org.eclipse.m2e.core.actionSet" label="Maven" visible="true">
+ <action id="org.eclipse.m2e.core.mainProjectMenu.action"
+ class="org.eclipse.m2e.core.actions.MavenMenuAction"
+ label="Maven"
+ menubarPath="project/additions"
+ style="pulldown"
+ icon="icons/m2.gif">
+ <enablement>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectClass name="org.eclipse.core.resources.IProject"/>
+ </and>
+ </enablement>
+ </action>
+ </actionSet>
+ </extension>
+ -->
+
+ <extension point="org.eclipse.ui.popupMenus">
+ <objectContribution id="org.eclipse.m2e.core.projectMenu"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.core.projectMenu.action"
+ class="org.eclipse.m2e.core.actions.MavenMenuAction"
+ label="%m2.popup.project.label"
+ style="pulldown"
+ menubarPath="additions"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </and>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.projectMenu"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <action id="org.eclipse.m2e.core.projectMenu.action"
+ class="org.eclipse.m2e.core.actions.MavenMenuAction"
+ label="%m2.popup.project.label"
+ style="pulldown"
+ menubarPath="additions"
+ enablesFor="+"/>
+ <visibility>
+ <and>
+ <objectState name="open" value="true"/>
+ <not>
+ <objectState name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </not>
+ </and>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.fileMenu"
+ objectClass="org.eclipse.core.resources.IFile"
+ adaptable="true">
+ <action id="org.eclipse.m2e.core.fileMenu.action"
+ class="org.eclipse.m2e.core.actions.MavenMenuAction"
+ label="%m2.popup.project.label"
+ style="pulldown"
+ menubarPath="additions"
+ enablesFor="1"/>
+ <visibility>
+ <objectState name="name" value="pom.xml"/>
+ </visibility>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.workingSetMenu" adaptable="true"
+ objectClass="org.eclipse.ui.IWorkingSet">
+ <action id="org.eclipse.m2e.core.workingSetMenu.action"
+ class="org.eclipse.m2e.core.actions.MavenMenuAction"
+ label="%m2.popup.project.label"
+ style="pulldown"
+ menubarPath="additions"
+ enablesFor="+"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.scmUrl"
+ objectClass="org.eclipse.m2e.core.scm.ScmUrl"
+ adaptable="true">
+ <action id="org.eclipse.m2e.core.ui.checkoutAsMaven"
+ label="%checkoutaction.label"
+ class="org.eclipse.m2e.core.actions.CheckoutAsMavenAction"
+ menubarPath="checkoutGroup"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.openPomArtifact"
+ objectClass="org.apache.maven.artifact.Artifact"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifact"
+ class="org.eclipse.m2e.core.actions.OpenPomAction"
+ label="%openpomaction.label"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openPomDependencyNode"
+ objectClass="org.apache.maven.shared.dependency.tree.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependency"
+ class="org.eclipse.m2e.core.actions.OpenPomAction"
+ label="%openpomaction.label2"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openAetherPomDependencyNode"
+ objectClass="org.sonatype.aether.graph.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependency"
+ class="org.eclipse.m2e.core.actions.OpenPomAction"
+ label="%openpomaction.label3"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openPomDependency"
+ objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependency"
+ class="org.eclipse.m2e.core.actions.OpenPomAction"
+ label="%openpomaction.label4"
+ enablesFor="1"/>
+ </objectContribution>
+
+ <objectContribution id="org.eclipse.m2e.core.openProjectPageArtifact"
+ objectClass="org.apache.maven.artifact.Artifact"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
+ class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openProjectPageDependencyNode"
+ objectClass="org.apache.maven.shared.dependency.tree.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependencyUrl"
+ class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label2"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openAetherProjectPageDependencyNode"
+ objectClass="org.sonatype.aether.graph.DependencyNode"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomDependencyUrl"
+ class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label3"
+ enablesFor="1"/>
+ </objectContribution>
+ <objectContribution id="org.eclipse.m2e.core.openopenProjectPageDependency"
+ objectClass="org.eclipse.m2e.model.edit.pom.Dependency"
+ adaptable="false">
+ <action id="org.eclipse.m2e.core.ui.openPomArtifactUrl"
+ class="org.eclipse.m2e.core.actions.OpenUrlAction:org.eclipse.m2e.core.openProjectPage"
+ label="%openprojectaction.label4"
+ enablesFor="1"/>
+ </objectContribution>
+
+ </extension>
+
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ id="org.eclipse.m2e.core.MavenPropertyTester"
+ class="org.eclipse.m2e.core.actions.MavenPropertyTester"
+ namespace="org.eclipse.m2e"
+ properties="launchable"
+ type="org.eclipse.core.runtime.IAdaptable"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.m2e.core.ui.command.openPom"
+ categoryId="org.eclipse.ui.category.navigate"
+ name="%m2.shortcut.open.pom"/>
+ <command
+ categoryId="org.eclipse.ui.category.edit"
+ description="%command.adddependency.description"
+ id="org.eclipse.m2e.core.ui.command.addDependency"
+ name="%m2.shortcut.addDependency">
+ </command>
+ <command
+ categoryId="org.eclipse.ui.category.edit"
+ description="%command.addplugin.description"
+ id="org.eclipse.m2e.core.ui.command.addPlugin"
+ name="%m2.shortcut.addPlugin">
+ </command>
+ </extension>
+
+ <extension point="org.eclipse.core.resources.markers"
+ id="maven2Problem"
+ name="%m2.marker.problem.name">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension point="org.eclipse.core.resources.markers"
+ id="maven2Problem.configuration"
+ name="%m2.marker.problem.configuration.name">
+ <super type="org.eclipse.m2e.core.maven2Problem"/>
+ <persistent value="true"/>
+ </extension>
+ <extension point="org.eclipse.core.resources.markers"
+ id="maven2Problem.pomloading"
+ name="%m2.marker.problem.pomloading.name">
+ <super type="org.eclipse.m2e.core.maven2Problem"/>
+ <persistent value="true"/>
+ </extension>
+ <extension point="org.eclipse.core.resources.markers"
+ id="maven2Problem.dependency"
+ name="%m2.marker.problem.dependency.name">
+ <super type="org.eclipse.m2e.core.maven2Problem"/>
+ <persistent value="true"/>
+ </extension>
+ <extension point="org.eclipse.core.resources.markers"
+ id="maven2Problem.build"
+ name="%m2.marker.problem.build.name">
+ <super type="org.eclipse.m2e.core.maven2Problem"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.keywords">
+ <keyword id="org.eclipse.m2e.core.maven" label="%keyword.label"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.preferencePages">
+ <page id="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenPreferencePage"
+ name="%m2.preferences.page.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenInstallationsPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenInstallationsPreferencePage"
+ name="%page.installations.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenSettingsPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenSettingsPreferencePage"
+ name="%page.usersettings.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.ProblemReportingPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.ProblemReportingPreferencePage"
+ name="%page.reporting.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ <page id="org.eclipse.m2e.core.preferences.MavenArchetypesPreferencePage"
+ category="org.eclipse.m2e.core.preferences.Maven2PreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenArchetypesPreferencePage"
+ name="%page.archetypes.name">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.m2e.core.internal.preferences.MavenPreferenceInitializer"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2PomWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.wizards.MavenPomWizard"
+ icon="icons/new_m2_pom.gif"
+ name="%m2.wizard.pom.name">
+ <selection class="org.eclipse.core.resources.IProject"/>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ProjectWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.wizards.MavenProjectWizard"
+ icon="icons/new_m2_project.gif"
+ name="%m2.wizard.project.name"
+ project="true">
+ <description>%m2.wizard.project.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ModuleWizard"
+ category="org.eclipse.m2e"
+ class="org.eclipse.m2e.core.wizards.MavenModuleWizard"
+ icon="icons/new_m2_project.gif"
+ name="%m2.wizard.module.name"
+ project="true">
+ <description>%m2.wizard.module.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ name="%wizard.checkout.name"
+ class="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ category="org.eclipse.m2e"
+ icon="icons/import_m2_project.gif" project="true">
+ <description>%wizard.checkout.description</description>
+ <!--
+ <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
+ -->
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.importWizards">
+ <category id="org.eclipse.ui.Basic" name="%category.general.name"/>
+ <category id="org.eclipse.m2e" name="%m2.wizard.name"/>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenPomCheckoutWizard"
+ class="org.eclipse.m2e.core.wizards.MavenMaterializePomWizard"
+ category="org.eclipse.m2e"
+ name="%m2.wizard.materialize.name"
+ icon="icons/import_m2_project.gif">
+ <description>%m2.wizard.materialize.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ class="org.eclipse.m2e.core.wizards.MavenCheckoutWizard"
+ category="org.eclipse.m2e"
+ name="%wizard.checkout2.name"
+ icon="icons/import_m2_project.gif">
+ <description>%wizard.checkout2.description</description>
+ <!--
+ <selection class="org.tigris.subversion.subclipse.core.ISVNRemoteFolder"/>
+ -->
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.MavenInstallFileWizard"
+ class="org.eclipse.m2e.core.wizards.MavenInstallFileWizard"
+ category="org.eclipse.m2e"
+ icon="icons/import_jar.gif"
+ name="%wizard.install.name">
+ <selection class="org.eclipse.core.resources.IFile" name="*.jar"/>
+ <description>%wizard.install.description</description>
+ </wizard>
+
+ <wizard id="org.eclipse.m2e.core.wizards.Maven2ImportWizard"
+ class="org.eclipse.m2e.core.wizards.MavenImportWizard"
+ icon="icons/import_m2_project.gif"
+ category="org.eclipse.m2e"
+ name="%m2.wizard.import.name">
+ <description>%m2.wizard.import.description</description>
+ </wizard>
+
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consoleFactories">
+ <consoleFactory label="%consoleFactory.label" icon="icons/m2.gif"
+ class="org.eclipse.m2e.core.ui.internal.MavenConsoleFactory"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.m2e.core.ui.internal.MavenConsolePageParticipant"
+ id="org.eclipse.m2e.core.launch.console.Maven2ConsolePageParticipant">
+ <enablement>
+ <instanceof value="org.eclipse.m2e.core.internal.console.MavenConsoleImpl"/>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet id="org.eclipse.m2e.core.ui.navigation"
+ label="%actionSet.navigation.label" visible="true">
+ <action
+ class="org.eclipse.m2e.core.actions.OpenPomAction:artifact"
+ definitionId="org.eclipse.m2e.core.ui.command.openPom"
+ icon="icons/open_pom.gif"
+ id="org.eclipse.m2e.core.ui.open.pom"
+ label="%action.openpom.label"
+ menubarPath="navigate/open.ext"
+ style="push"
+ tooltip="%action.openpom.tooltip"/>
+ <action
+ class="org.eclipse.m2e.core.actions.RefreshMavenModelsAction"
+ icon="icons/update_dependencies.gif"
+ id="org.eclipse.m2e.core.actions.RefreshModels"
+ label="%action.updatedeps.label"
+ menubarPath="project/additions"
+ tooltip="%action.updatedeps.tooltip">
+ </action>
+ </actionSet>
+
+ <actionSet
+ id="org.eclipse.m2e.core.actions.maven"
+ label="%actionSet.maven.label"
+ visible="true">
+ <action
+ class="org.eclipse.m2e.core.actions.AddDependencyAction"
+ definitionId="org.eclipse.m2e.core.ui.command.addDependency"
+ icon="icons/open_pom.gif"
+ id="org.eclipse.m2e.core.actions.add.dependency"
+ label="%action.adddep.label"
+ menubarPath="navigate/open.ext"
+ style="push"
+ tooltip="%action.adddep.tooltip">
+ </action>
+ <action
+ class="org.eclipse.m2e.core.actions.AddPluginAction"
+ definitionId="org.eclipse.m2e.core.ui.command.addPlugin"
+ id="org.eclipse.m2e.core.actions.add.plugin"
+ label="%action.addplugin.label"
+ style="push"
+ tooltip="%action.add.plugin.tooltip">
+ </action>
+ </actionSet>
+ </extension>
+
+ <extension point="org.eclipse.ui.views">
+ <category id="org.eclipse.m2e.core.views.repositories"
+ name="%category.maven.name"/>
+ <view id="org.eclipse.m2e.core.views.MavenRepositoryView"
+ category="org.eclipse.m2e.core.views.repositories"
+ class="org.eclipse.m2e.core.ui.internal.views.MavenRepositoryView"
+ icon="icons/maven_indexes.gif"
+ name="%view.repos.name"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page id="org.eclipse.m2e.core.MavenProjectPreferencePage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectPreferencePage"
+ name="%page.maven.name"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </page>
+ <page id="org.eclipse.m2e.core.MavenProjectLifecycleMappingPage"
+ class="org.eclipse.m2e.core.ui.internal.preferences.MavenProjectLifecycleMappingPage"
+ name="%page.mappings.name"
+ category="org.eclipse.m2e.core.MavenProjectPreferencePage"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <filter name="nature" value="org.eclipse.m2e.core.maven2Nature"/>
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.m2e.core.lifecycleMappingPropertyPage">
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.EmptyLifecycleMappingPropertyPage"
+ id = "emptyPropertyPage"
+ lifecycleMappingId = "NULL"
+ name = "Empty Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.CustomizableLifecycleMappingPropertyPage"
+ id = "customizablePropertyPage"
+ lifecycleMappingId = "customizable"
+ name = "Customizable Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ <lifecycleMappingPropertyPage
+ class="org.eclipse.m2e.core.ui.internal.preferences.MissingLifecycleMappingPropertyPage"
+ id="missingLifecycleMappingPropertyPage"
+ lifecycleMappingId="MISSING"
+ name="Missing Lifecycle Mapping">
+ </lifecycleMappingPropertyPage>
+ </extension>
+
+ <extension
+ point="org.eclipse.m2e.core.lifecycleMappings">
+ <lifecycleMapping
+ class="org.eclipse.m2e.core.project.configurator.CustomizableLifecycleMapping"
+ id="customizable"
+ name="%lifecycleMapping.custom.name">
+ </lifecycleMapping>
+ <lifecycleMapping
+ class="org.eclipse.m2e.core.project.configurator.NoopLifecycleMapping"
+ id="NULL"
+ name="%lifecycleMapping.empty.name">
+ </lifecycleMapping>
+ </extension>
+ <extension
+ point="org.eclipse.m2e.core.mavenComponentContributors">
+ <configurator
+ class="org.eclipse.m2e.core.internal.embedder.DefaultMavenComponentContributor">
+ </configurator>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.m2e.core.ui.command.addDependency"
+ contextId="org.eclipse.core.runtime.xml"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+Shift+D">
+ </key>
+ <key
+ commandId="org.eclipse.m2e.core.ui.command.addPlugin"
+ contextId="org.eclipse.core.runtime.xml"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+Shift+P">
+ </key>
+ </extension>
+
+ <!--
+ <extension point="org.eclipse.search.searchPages">
+ <page id="org.eclipse.m2e.core.MavenSearchPage"
+ class="org.eclipse.m2e.core.ui.internal.search.MavenSearchPage"
+ enabled="true"
+ label="Maven Search"/>
+ </extension>
+ <extension point="org.eclipse.search.searchResultViewPages">
+ <viewPage id="org.eclipse.m2e.core.MavenSearchResultPage"
+ class="org.eclipse.m2e.core.ui.internal.search.MavenSearchResultPage"
+ searchResultClass="org.eclipse.m2e.core.ui.internal.search.MavenSearchResult"/>
+ </extension>
+ -->
+
+ <extension
+ point="org.eclipse.m2e.core.projectConfigurators">
+ <configurator
+ class="org.eclipse.m2e.core.project.configurator.MavenResourcesProjectConfigurator"
+ id="org.eclipse.m2e.core.project.configurator.MavenResourcesProjectConfigurator"
+ name="Maven Resources Project Configurator">
+ <mojo
+ artifactId="maven-resources-plugin"
+ goals="resources,testResources"
+ groupId="org.apache.maven.plugins"
+ versionRange="[2.4,)">
+ </mojo>
+ </configurator>
+ </extension>
+</plugin>
diff --git a/org.eclipse.m2e.core/pom.xml b/org.eclipse.m2e.core/pom.xml
new file mode 100644
index 00000000..fd4cc320
--- /dev/null
+++ b/org.eclipse.m2e.core/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2008 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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.parent</artifactId>
+ <version>0.13.0-SNAPSHOT</version>
+ <relativePath>../org.eclipse.m2e.parent</relativePath>
+ </parent>
+
+
+ <artifactId>org.eclipse.m2e.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Maven Integration for Eclipse Plug-in</name>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/src</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+</project>
diff --git a/org.eclipse.m2e.core/schema/archetypes.exsd b/org.eclipse.m2e.core/schema/archetypes.exsd
new file mode 100644
index 00000000..09d46cff
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/archetypes.exsd
@@ -0,0 +1,141 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="archetypeCatalogs" name="Maven Archetype Catalogs"/>
+ </appinfo>
+ <documentation>
+ Maven Archetype Catalogs
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <choice>
+ <element ref="local"/>
+ <element ref="remote"/>
+ </choice>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="local">
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ archetype catalog file name inside plugin
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ archetype catalog description to show in the UI
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="remote">
+ <complexType>
+ <attribute name="url" type="string" use="required">
+ <annotation>
+ <documentation>
+ location url for remote archetype catalog
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ archetype catalog description to show in the UI
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.9.3
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/indexes.exsd b/org.eclipse.m2e.core/schema/indexes.exsd
new file mode 100644
index 00000000..c660c669
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/indexes.exsd
@@ -0,0 +1,153 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.m2e" id="indexes" name="Maven Indexes"/>
+ </appInfo>
+ <documentation>
+ Maven Indexes
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="index" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="index">
+ <annotation>
+ <appInfo>
+ <meta.element deprecated="true"/>
+ </appInfo>
+ <documentation>
+ This extension point is provided for backward compatibility with m2e 0.9.8 and earlier. It will be either removed completely or replaced with more flexible &quot;repositories&quot; extension point in a future m2e version.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="indexId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="archive" type="string">
+ <annotation>
+ <documentation>
+ This attribute is ignored. m2e 0.9.9 does not suppot packaged nexus indexes.
+ </documentation>
+ <appInfo>
+ <meta.attribute deprecated="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="repositoryUrl" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="updateUrl" type="string">
+ <annotation>
+ <documentation>
+ This attribute is ignored. m2e 0.9.9 does not support nexus index repository paths.
+ </documentation>
+ <appInfo>
+ <meta.attribute deprecated="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="isShort" type="boolean">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.0.13
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd b/org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd
new file mode 100644
index 00000000..83c13887
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/lifecycleMappingPropertyPage.exsd
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.m2e" id="lifecycleMappingPropertyPage" name="Maven Lifecycle Mapping Property Page"/>
+ </appInfo>
+ <documentation>
+ Maven Lifecycle Mapping Property Page. This extension point connects a lifecycle mapping strategy (as defined in the lifecycleMapping extension point) with an appropriate project property page.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="lifecycleMappingPropertyPage" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="lifecycleMappingPropertyPage">
+ <complexType>
+ <attribute name="lifecycleMappingId" type="string" use="required">
+ <annotation>
+ <documentation>
+ Id of the lifecycle mapping strategy associated with this property page.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ Id of the property page.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Name of the property page.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the class that defines the lifecycle property page. Must implement ILifecyclePropertyPage
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.lifecycle.ILifecyclePropertyPage"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.9.9
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ Example attribute settings: (Note: the lifecycleMappingId must be the id of the extension point defined by lifecycleMapping)
+ class="org.eclipse.m2e.ui.internal.preferences.CustomizableLifecycleMappingPropertyPage"
+ id = "customizablePropertyPage"
+ lifecycleMappingId = "customizable"
+ name = "Customizable Lifecycle Mapping"
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2007 - 2009 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/lifecycleMappings.exsd b/org.eclipse.m2e.core/schema/lifecycleMappings.exsd
new file mode 100644
index 00000000..8b880ad6
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/lifecycleMappings.exsd
@@ -0,0 +1,200 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="lifecycleMappings" name="Maven Lifecycle Mappings"/>
+ </appinfo>
+ <documentation>
+ Maven Lifecycle Mappings
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="lifecycleMapping" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="lifecycleMapping">
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <element ref="mojo"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique lifecycle mapping id
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.project.configurator.AbstractLifecycleMapping:org.eclipse.m2e.project.configurator.IExtensionLifecycleMapping"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Human readable lifecycle mapping name
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="packaging-type" type="string">
+ <annotation>
+ <documentation>
+ Packaging type this lifecycle mapping applies to. If not specified, lifecycle mapping can only be enabled explicitly in pom.xml.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="mojo">
+ <complexType>
+ <choice>
+ <element ref="configurator"/>
+ <element ref="execute"/>
+ <element ref="ignore"/>
+ </choice>
+ <attribute name="groupId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="artifactId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="versionRange" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="goals" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="ignore" type="string">
+ </element>
+
+ <element name="execute" type="string">
+ </element>
+
+ <element name="configurator">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.m2e.core.projectConfigurators/configurator/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.9.8
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/m2menu.exsd b/org.eclipse.m2e.core/schema/m2menu.exsd
new file mode 100644
index 00000000..98135235
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/m2menu.exsd
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="m2menu" name="m2 menu item"/>
+ </appinfo>
+ <documentation>
+ Extension point used to add additional entries to the Maven popup menu
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ <documentation>
+ Extension point can be used to contribute additional actions to the Maven popup menu
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="factory" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="factory">
+ <annotation>
+ <documentation>
+ A menu factory used to add actions to the Maven popup menu
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A menu factory class name
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.actions.AbstractMavenMenuCreator:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.9.6
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ See
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/mavenComponentContributors.exsd b/org.eclipse.m2e.core/schema/mavenComponentContributors.exsd
new file mode 100644
index 00000000..27a308fd
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/mavenComponentContributors.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.m2e" id="mavenComponentContributors" name="Maven Core Component Contributors"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="configurator"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="configurator">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.m2e.internal.embedder.IMavenComponentContributor"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/mavenProjectChangedListeners.exsd b/org.eclipse.m2e.core/schema/mavenProjectChangedListeners.exsd
new file mode 100644
index 00000000..30b825c3
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/mavenProjectChangedListeners.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.m2e" id="mavenProjectChangedListeners" name="mavenProjectChangedListeners"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="listener" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="listener">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.m2e.project.IMavenProjectChangedListener"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/projectConfigurators.exsd b/org.eclipse.m2e.core/schema/projectConfigurators.exsd
new file mode 100644
index 00000000..eb7d1385
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/projectConfigurators.exsd
@@ -0,0 +1,191 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="projectConfigurators" name="Project Configurators"/>
+ </appinfo>
+ <documentation>
+ Project Configurators
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="configurator"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="configurator">
+ <annotation>
+ <documentation>
+ Project configurator
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <element ref="mojo"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique configurator id
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ Configurator implementation
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.project.configurator.AbstractProjectConfigurator:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Configurator name, eg. &quot;JDT&quot;, &quot;PDE&quot;, &quot;AJDT&quot;, &quot;WTP&quot;, etc.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Priority of given configurator. Smaller number correspond to higher priority, for example, &quot;10&quot; for JDT, &quot;50&quot; - PDE, AJDT and WTP. Tools that build on WTP should use priority bigger then &quot;100&quot;
+
+This attribute is considered for removal from m2e 1.0.
+ </documentation>
+ <appinfo>
+ <meta.attribute deprecated="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="mojo">
+ <annotation>
+ <documentation>
+ mojo element specifies Maven plugin goals the project configurator should be enabled for by default. Maven plugin goals are identified by groupId, artifactId of the Maven plugin, Maven plugin version range using Maven version range syntax and comma separated list of plugin goals.
+
+Project configurators without &lt;mojo/&gt; elements will require explicit enablement in lifecycle mapping configuration in pom.xml.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="groupId" type="string" use="required">
+ <annotation>
+ <documentation>
+ Maven plugin groupId
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="artifactId" type="string" use="required">
+ <annotation>
+ <documentation>
+ Maven plugin artifactId
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="versionRange" type="string" use="required">
+ <annotation>
+ <documentation>
+ Maven plugin version range
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="goals" type="string" use="required">
+ <annotation>
+ <documentation>
+ Comma separated list of Maven plugin goals
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.9.4
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/scmHandlers.exsd b/org.eclipse.m2e.core/schema/scmHandlers.exsd
new file mode 100644
index 00000000..20afa37d
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/scmHandlers.exsd
@@ -0,0 +1,130 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="scmHandlers" name="Maven SCM Handlers"/>
+ </appinfo>
+ <documentation>
+ Maven SCM Handlers
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="handler" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="handler">
+ <annotation>
+ <documentation>
+ SCM Handler
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ Supported SCM type
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ Java class name for SCM handler implementation
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.scm.ScmHandler:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Numeric priority used to determine order during handler resolution
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.0.13
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiInfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2007, 2008 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
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.m2e.core/schema/scmHandlersUi.exsd b/org.eclipse.m2e.core/schema/scmHandlersUi.exsd
new file mode 100644
index 00000000..7bb97acb
--- /dev/null
+++ b/org.eclipse.m2e.core/schema/scmHandlersUi.exsd
@@ -0,0 +1,104 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2e" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.m2e" id="scmHandlersUi" name="SCM Handlers UI"/>
+ </appinfo>
+ <documentation>
+ Maven SCM Handlers UI
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="handlerUi"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="handlerUi">
+ <complexType>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ SCM type
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ Java class name for SCM handler UI implementation
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.m2e.scm.ScmHandlerUi:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java
new file mode 100644
index 00000000..2c58294d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenImages.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.viewers.DecorationOverlayIcon;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+
+
+/**
+ * @author Eugene Kuleshov
+ */
+public class MavenImages {
+
+ // object images
+
+ public static final Image IMG_CLEAR = createImage("clear.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_CLEAR_DISABLED = createImage("clear_disabled.gif"); //$NON-NLS-1$
+
+ public static final String PATH_JAR = "jar_obj.gif"; //$NON-NLS-1$
+
+ public static final Image IMG_JAR = createImage(PATH_JAR);
+
+ public static final String PATH_LOCK = "lock_ovr.gif"; //$NON-NLS-1$
+
+ public static final String PATH_VERSION = "jar_version.gif"; //$NON-NLS-1$
+
+ public static final Image IMG_VERSION = createImage(PATH_VERSION);
+
+ public static final String PATH_VERSION_SRC = "jar_src_version.gif"; //$NON-NLS-1$
+
+ public static final Image IMG_VERSION_SRC = createImage(PATH_VERSION_SRC);
+
+ public static final Image IMG_JAVA = createImage("java_obj.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_JAVA_SRC = createImage("java_src_obj.gif"); //$NON-NLS-1$
+
+ // public static final Image IMG_M2 = createImage("m2.gif");
+
+ public static final Image IMG_LAUNCH_MAIN = createImage("main_tab.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_INDEX = createImage("maven_index.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_INDEXES = createImage("maven_indexes.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_MAVEN_JAR = createImage("mjar.gif"); //$NON-NLS-1$
+
+ // public static final Image IMG_JAR = createImage("mlabel.gif");
+
+ public static final Image IMG_NEW_POM = createImage("new_m2_pom.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_NEW_PROJECT = createImage("new_m2_project.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_OPEN_POM = createImage("open_pom.gif"); //$NON-NLS-1$
+
+ // public static final Image IMG_POM = createImage("pom_obj.gif");
+
+ public static final Image IMG_UPD_DEPENDENCIES = createImage("update_dependencies.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_UPD_SOURCES = createImage("update_source_folders.gif"); //$NON-NLS-1$
+
+ public static final Image IMG_WEB = createImage("web.gif"); //$NON-NLS-1$
+
+ // wizard images
+
+ public static final ImageDescriptor WIZ_IMPORT_WIZ = createDescriptor("import_project.png"); //$NON-NLS-1$
+
+ public static final ImageDescriptor WIZ_NEW_PROJECT = createDescriptor("new_m2_project_wizard.gif"); //$NON-NLS-1$
+
+ // descriptors
+
+ public static final ImageDescriptor M2 = createDescriptor("m2.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor DEBUG = createDescriptor("debug.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor ADD_INDEX = createDescriptor("add_index.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor CLOSE = createDescriptor("close.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor COPY = createDescriptor("copy.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor COLLAPSE_ALL = createDescriptor("collapseall.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor EXPAND_ALL = createDescriptor("expandall.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor NEW_POM = createDescriptor("new_m2_pom.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor REFRESH = createDescriptor("refresh.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor UPD_INDEX = createDescriptor("update_index.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor REBUILD_INDEX = createDescriptor("rebuild_index.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor POM = createDescriptor("pom_obj.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor IMPORT_PROJECT = createDescriptor("import_m2_project.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor SHOW_CONSOLE_ERR = createDescriptor("stderr.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor SHOW_CONSOLE_OUT = createDescriptor("stdout.gif"); //$NON-NLS-1$
+
+ private static ImageDescriptor createDescriptor(String key) {
+ try {
+ ImageRegistry imageRegistry = getImageRegistry();
+ if(imageRegistry != null) {
+ ImageDescriptor imageDescriptor = imageRegistry.getDescriptor(key);
+ if(imageDescriptor==null) {
+ imageDescriptor = doCreateDescriptor(key);
+ imageRegistry.put(key, imageDescriptor);
+ }
+ return imageDescriptor;
+ }
+ } catch(Exception ex) {
+ MavenLogger.log(key, ex);
+ }
+ return null;
+ }
+
+ private static Image createImage(String key) {
+ createDescriptor(key);
+ ImageRegistry imageRegistry = getImageRegistry();
+ return imageRegistry == null ? null : imageRegistry.get(key);
+ }
+
+ private static ImageRegistry getImageRegistry() {
+ MavenPlugin plugin = MavenPlugin.getDefault();
+ return plugin == null ? null : plugin.getImageRegistry();
+ }
+
+ private static ImageDescriptor doCreateDescriptor(String image) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, "icons/" + image); //$NON-NLS-1$
+ }
+
+
+
+ private static ImageDescriptor createImageDescriptor( String key, ImageData imageData )
+ {
+ try
+ {
+ ImageRegistry imageRegistry = getImageRegistry();
+ if ( imageRegistry != null )
+ {
+ ImageDescriptor imageDescriptor = imageRegistry.getDescriptor( key );
+ if ( imageDescriptor != null )
+ {
+ imageRegistry.remove( key );
+ }
+ {
+ imageDescriptor = ImageDescriptor.createFromImageData( imageData );
+ imageRegistry.put( key, imageDescriptor );
+ }
+ return imageDescriptor;
+ }
+ }
+ catch ( Exception ex )
+ {
+ MavenLogger.log(key, ex);
+ }
+ return null;
+ }
+
+ private static ImageDescriptor getOverlayImageDescriptor( String basekey, String overlaykey, int quadrant )
+ {
+ String key = basekey + overlaykey;
+ try
+ {
+ ImageRegistry imageRegistry = getImageRegistry();
+ if ( imageRegistry != null )
+ {
+ ImageDescriptor imageDescriptor = imageRegistry.getDescriptor( key );
+ if ( imageDescriptor == null )
+ {
+ ImageDescriptor base = createDescriptor( basekey );
+ ImageDescriptor overlay = createDescriptor( overlaykey );
+ if ( base == null || overlay == null )
+ {
+ MavenLogger.log( "cannot construct overlay image descriptor for " + basekey + " " + overlaykey );
+ return null;
+ }
+ imageDescriptor = createOverlayDescriptor( base, overlay, quadrant );
+ imageRegistry.put( key, imageDescriptor );
+ }
+ return imageDescriptor;
+ }
+ }
+ catch ( Exception ex )
+ {
+ MavenLogger.log(key, ex);
+ }
+ return null;
+ }
+
+ public static Image getOverlayImage( String base, String overlay, int quadrant )
+ {
+ getOverlayImageDescriptor( base, overlay, quadrant );
+ ImageRegistry imageRegistry = getImageRegistry();
+ return imageRegistry == null ? null : imageRegistry.get( base + overlay );
+ }
+
+
+ private static ImageDescriptor createOverlayDescriptor( ImageDescriptor base, ImageDescriptor overlay, int quadrant )
+ {
+ return new DecorationOverlayIcon( base.createImage(), overlay, quadrant );
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java
new file mode 100644
index 00000000..07717168
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/MavenPlugin.java
@@ -0,0 +1,564 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.DefaultContainerConfiguration;
+import org.codehaus.plexus.DefaultPlexusContainer;
+import org.codehaus.plexus.MutablePlexusContainer;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.classworlds.ClassWorld;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+
+import org.apache.maven.archetype.Archetype;
+import org.apache.maven.archetype.common.ArchetypeArtifactManager;
+import org.apache.maven.archetype.source.ArchetypeDataSource;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.manager.WagonManager;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.resolver.ArtifactCollector;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.index.ArtifactContextProducer;
+import org.apache.maven.index.NexusIndexer;
+import org.apache.maven.index.updater.IndexUpdater;
+import org.apache.maven.plugin.LegacySupport;
+
+import org.sonatype.aether.RepositorySystem;
+
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeManager;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.core.MavenLogger;
+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.embedder.MavenRuntimeManager;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.internal.ExtensionReader;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.console.MavenConsoleImpl;
+import org.eclipse.m2e.core.internal.embedder.MavenConfigurationImpl;
+import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
+import org.eclipse.m2e.core.internal.embedder.MavenImpl;
+import org.eclipse.m2e.core.internal.embedder.MavenWorkspaceRuntime;
+import org.eclipse.m2e.core.internal.index.IndexesExtensionReader;
+import org.eclipse.m2e.core.internal.index.IndexingTransferListener;
+import org.eclipse.m2e.core.internal.index.NexusIndexManager;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.internal.project.MavenMarkerManager;
+import org.eclipse.m2e.core.internal.project.ProjectConfigurationManager;
+import org.eclipse.m2e.core.internal.project.WorkspaceStateWriter;
+import org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager;
+import org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob;
+import org.eclipse.m2e.core.internal.repository.RepositoryRegistry;
+import org.eclipse.m2e.core.project.IMavenMarkerManager;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.eclipse.m2e.core.repository.IRepositoryRegistry;
+import org.eclipse.m2e.core.util.search.IndexSearchEngine;
+import org.eclipse.m2e.core.util.search.SearchEngine;
+
+
+/**
+ * MavenPlugin main plug-in class.
+ */
+public class MavenPlugin extends AbstractUIPlugin implements IStartup {
+
+ // preferences
+ private static final String PREFS_ARCHETYPES = "archetypesInfo.xml"; //$NON-NLS-1$
+
+ // The shared instance
+ private static MavenPlugin plugin;
+
+ /**
+ * General purpose plexus container. Contains components from maven embedder and all other bundles visible from this
+ * bundle's classloader.
+ */
+ private MutablePlexusContainer plexus;
+
+ private MavenConsole console;
+
+ private MavenModelManager modelManager;
+
+ private NexusIndexManager indexManager;
+
+ private BundleContext bundleContext;
+
+ private MavenProjectManager projectManager;
+
+ private MavenRuntimeManager runtimeManager;
+
+ private ProjectConfigurationManager configurationManager;
+
+ private ProjectRegistryRefreshJob mavenBackgroundJob;
+
+ private ArchetypeManager archetypeManager;
+
+ private ProjectRegistryManager managerImpl;
+
+ private IMavenMarkerManager mavenMarkerManager;
+
+ private RepositoryRegistry repositoryRegistry;
+
+ private String version = "0.0.0"; //$NON-NLS-1$
+
+ private String qualifiedVersion = "0.0.0.qualifier"; //$NON-NLS-1$
+
+ private IMavenConfiguration mavenConfiguration;
+
+ private MavenImpl maven;
+
+ public MavenPlugin() {
+ plugin = this;
+
+ if(Boolean.parseBoolean(Platform.getDebugOption(IMavenConstants.PLUGIN_ID + "/debug/initialization"))) { //$NON-NLS-1$
+ System.err.println("### executing constructor " + IMavenConstants.PLUGIN_ID); //$NON-NLS-1$
+ new Throwable().printStackTrace();
+ }
+ }
+
+ public IMaven getMaven() {
+ return maven;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+
+ if(Boolean.parseBoolean(Platform.getDebugOption(IMavenConstants.PLUGIN_ID + "/debug/initialization"))) { //$NON-NLS-1$
+ System.err.println("### executing start() " + IMavenConstants.PLUGIN_ID); //$NON-NLS-1$
+ new Throwable().printStackTrace();
+ }
+
+ this.bundleContext = context;
+
+ try {
+ this.qualifiedVersion = (String) getBundle().getHeaders().get(Constants.BUNDLE_VERSION);
+ Version bundleVersion = Version.parseVersion(this.qualifiedVersion);
+ this.version = bundleVersion.getMajor() + "." + bundleVersion.getMinor() + "." + bundleVersion.getMicro(); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch(IllegalArgumentException e) {
+ // ignored
+ }
+
+ MavenLogger.setLog(getLog());
+
+ try {
+ this.console = new MavenConsoleImpl(MavenImages.M2); //$NON-NLS-1$
+ } catch(RuntimeException ex) {
+ MavenLogger.log(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, "Unable to start console: "
+ + ex.toString(), ex));
+ }
+
+ this.mavenConfiguration = new MavenConfigurationImpl(getPreferenceStore());
+
+ ClassLoader cl = MavenPlugin.class.getClassLoader();
+ ContainerConfiguration cc = new DefaultContainerConfiguration().setClassWorld(new ClassWorld("plexus.core", cl)) //$NON-NLS-1$
+ .setName("plexus"); //$NON-NLS-1$
+ this.plexus = new DefaultPlexusContainer(cc);
+
+ File stateLocationDir = getStateLocation().toFile();
+
+ // TODO this is broken, need to make it lazy, otherwise we'll deadlock or timeout... or both
+ this.archetypeManager = newArchetypeManager(stateLocationDir);
+ try {
+ this.archetypeManager.readCatalogs();
+ } catch(Exception ex) {
+ String msg = "Can't read archetype catalog configuration";
+ this.console.logError(msg + "; " + ex.getMessage()); //$NON-NLS-1$
+ MavenLogger.log(msg, ex);
+ }
+
+ this.mavenMarkerManager = new MavenMarkerManager(console, mavenConfiguration);
+
+ boolean updateProjectsOnStartup = mavenConfiguration.isUpdateProjectsOnStartup();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+
+ this.maven = new MavenImpl(mavenConfiguration, console);
+
+ // TODO eagerly reads workspace state cache
+ this.managerImpl = new ProjectRegistryManager(maven, console, stateLocationDir,
+ !updateProjectsOnStartup /* readState */, mavenMarkerManager);
+
+ this.mavenBackgroundJob = new ProjectRegistryRefreshJob(managerImpl, console, mavenConfiguration);
+
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.addResourceChangeListener(mavenBackgroundJob, IResourceChangeEvent.POST_CHANGE
+ | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
+
+ this.projectManager = new MavenProjectManager(managerImpl, mavenBackgroundJob, stateLocationDir);
+ this.projectManager.addMavenProjectChangedListener(new WorkspaceStateWriter(projectManager));
+ if(updateProjectsOnStartup || managerImpl.getProjects().length == 0) {
+ this.projectManager.refresh(new MavenUpdateRequest(workspace.getRoot().getProjects(), //
+ mavenConfiguration.isOffline() /*offline*/, false /* updateSnapshots */));
+ }
+
+ this.modelManager = new MavenModelManager(maven, projectManager, console);
+
+ this.runtimeManager = new MavenRuntimeManager(getPreferenceStore());
+ this.runtimeManager.setEmbeddedRuntime(new MavenEmbeddedRuntime(getBundleContext()));
+ this.runtimeManager.setWorkspaceRuntime(new MavenWorkspaceRuntime(projectManager));
+
+ this.configurationManager = new ProjectConfigurationManager(maven, console, projectManager, modelManager,
+ mavenMarkerManager, mavenConfiguration);
+ this.projectManager.addMavenProjectChangedListener(this.configurationManager);
+
+ //create repository registry
+ this.repositoryRegistry = new RepositoryRegistry(maven, projectManager);
+ this.maven.addSettingsChangeListener(repositoryRegistry);
+ this.projectManager.addMavenProjectChangedListener(repositoryRegistry);
+
+ //create the index manager
+ this.indexManager = new NexusIndexManager(console, projectManager, repositoryRegistry, stateLocationDir);
+ this.projectManager.addMavenProjectChangedListener(indexManager);
+ this.maven.addLocalRepositoryListener(new IndexingTransferListener(indexManager));
+ this.repositoryRegistry.addRepositoryIndexer(indexManager);
+ this.repositoryRegistry.addRepositoryDiscoverer(new IndexesExtensionReader(indexManager));
+
+ // fork repository registry update. must after index manager registered as a listener
+ this.repositoryRegistry.updateRegistry();
+
+ checkJdk();
+ }
+
+ private static ArchetypeManager newArchetypeManager(File stateLocationDir) {
+ ArchetypeManager archetypeManager = new ArchetypeManager(new File(stateLocationDir, PREFS_ARCHETYPES));
+ archetypeManager.addArchetypeCatalogFactory(new ArchetypeCatalogFactory.NexusIndexerCatalogFactory());
+ archetypeManager.addArchetypeCatalogFactory(new ArchetypeCatalogFactory.InternalCatalogFactory());
+ archetypeManager.addArchetypeCatalogFactory(new ArchetypeCatalogFactory.DefaultLocalCatalogFactory());
+ for(ArchetypeCatalogFactory archetypeCatalogFactory : ExtensionReader.readArchetypeExtensions()) {
+ archetypeManager.addArchetypeCatalogFactory(archetypeCatalogFactory);
+ }
+ return archetypeManager;
+ }
+
+ public void earlyStartup() {
+ // nothing to do here, all startup work is done in #start(BundleContext)
+ }
+
+ public PlexusContainer getPlexusContainer() {
+ return plexus;
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+
+ this.mavenBackgroundJob.cancel();
+ try {
+ this.mavenBackgroundJob.join();
+ } catch(InterruptedException ex) {
+ // ignored
+ }
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.removeResourceChangeListener(this.mavenBackgroundJob);
+ this.mavenBackgroundJob = null;
+
+ this.projectManager.removeMavenProjectChangedListener(this.configurationManager);
+ this.projectManager.removeMavenProjectChangedListener(indexManager);
+ this.projectManager.removeMavenProjectChangedListener(repositoryRegistry);
+ this.projectManager = null;
+
+ this.plexus.dispose();
+ this.maven.disposeContainer();
+
+ this.configurationManager = null;
+
+ if(this.console != null) {
+ this.console.shutdown();
+ }
+
+ plugin = null;
+ }
+
+ private void checkJdk() {
+ if(getPreferenceStore().getBoolean(MavenPreferenceConstants.P_DISABLE_JDK_CHECK)) {
+ return;
+ }
+ // There is no tools.jar on Mac OS X
+ // http://developer.apple.com/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html
+ String osName = System.getProperty("os.name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if(osName.toLowerCase().indexOf("mac os") == -1) { //$NON-NLS-1$
+ String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
+ File toolsJar = new File(javaHome, "../lib/tools.jar"); //$NON-NLS-1$
+ if(!toolsJar.exists()) {
+ getConsole().logError("Eclipse is running in a JRE, but a JDK is required\n" //
+ + " Some Maven plugins may not work when importing projects or updating source folders.");
+ if(!getPreferenceStore().getBoolean(MavenPreferenceConstants.P_DISABLE_JDK_WARNING)) {
+ showJdkWarning();
+ }
+ }
+ }
+ }
+
+ private void showJdkWarning() {
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+ MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, //
+ Messages.MavenPlugin_error_jre_title, //
+ null, Messages.MavenPlugin_error_jre_message, MessageDialog.WARNING, //
+ new String[] {IDialogConstants.OK_LABEL}, //
+ 0, Messages.MavenPlugin_error_warn_again, false) {
+ protected Control createMessageArea(Composite composite) {
+ Image image = getImage();
+ if(image != null) {
+ imageLabel = new Label(composite, SWT.NULL);
+ image.setBackground(imageLabel.getBackground());
+ imageLabel.setImage(image);
+ GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING).applyTo(imageLabel);
+ }
+
+ Link link = new Link(composite, getMessageLabelStyle());
+ link.setText(message);
+ link.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ if("eclipse.ini".equals(e.text)) { //$NON-NLS-1$
+// String href = "topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm";
+// BaseHelpSystem.getHelpDisplay().displayHelpResource(href, false);
+
+ try {
+ IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
+ // browser.openURL(new URL("http://www.eclipse.org/swt/launcher.html"));
+ browser
+ .openURL(new URL(
+ "http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm")); //$NON-NLS-1$
+ } catch(MalformedURLException ex) {
+ MavenLogger.log("Malformed URL", ex);
+ } catch(PartInitException ex) {
+ MavenLogger.log(ex);
+ }
+ } else {
+ PreferencesUtil.createPreferenceDialogOn(getShell(),
+ "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage", null, null).open(); //$NON-NLS-1$
+ }
+ }
+ });
+
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false)
+ .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT)
+ .applyTo(link);
+
+ return composite;
+ }
+ };
+
+ dialog.setPrefStore(getPreferenceStore());
+ dialog.setPrefKey(MavenPreferenceConstants.P_DISABLE_JDK_WARNING);
+
+ dialog.open();
+
+ getPreferenceStore().setValue(MavenPreferenceConstants.P_DISABLE_JDK_WARNING, dialog.getToggleState());
+ }
+ });
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static MavenPlugin getDefault() {
+ return plugin;
+ }
+
+ public MavenModelManager getMavenModelManager() {
+ return this.modelManager;
+ }
+
+ public MavenProjectManager getMavenProjectManager() {
+ return this.projectManager;
+ }
+
+ public ProjectRegistryManager getMavenProjectManagerImpl() {
+ return this.managerImpl;
+ }
+
+ public IndexManager getIndexManager() {
+ return this.indexManager;
+ }
+
+ public MavenConsole getConsole() {
+ return this.console;
+ }
+
+ public MavenRuntimeManager getMavenRuntimeManager() {
+ return this.runtimeManager;
+ }
+
+ public ArchetypeManager getArchetypeManager() {
+ return this.archetypeManager;
+ }
+
+ public IMavenMarkerManager getMavenMarkerManager() {
+ return this.mavenMarkerManager;
+ }
+
+ public IMavenConfiguration getMavenConfiguration() {
+ return this.mavenConfiguration;
+ }
+
+ /**
+ * Returns an Image for the file at the given relative path.
+ */
+ public static Image getImage(String path) {
+ ImageRegistry registry = getDefault().getImageRegistry();
+ Image image = registry.get(path);
+ if(image == null) {
+ registry.put(path, imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path));
+ image = registry.get(path);
+ }
+ return image;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(IMavenConstants.PLUGIN_ID, path);
+ }
+
+ public BundleContext getBundleContext() {
+ return this.bundleContext;
+ }
+
+ public IProjectConfigurationManager getProjectConfigurationManager() {
+ return configurationManager;
+ }
+
+ /** for use by unit tests */
+ public ProjectRegistryRefreshJob getProjectManagerRefreshJob() {
+ return mavenBackgroundJob;
+ }
+
+ private <C> C lookup(Class<C> role) {
+ try {
+ return plexus.lookup(role);
+ } catch(ComponentLookupException ex) {
+ throw new NoSuchComponentException(ex);
+ }
+ }
+
+ private <T> T lookup(Class<T> role, String roleHint) {
+ try {
+ return plexus.lookup(role, roleHint);
+ } catch(ComponentLookupException ex) {
+ throw new NoSuchComponentException(ex);
+ }
+ }
+
+ public static String getVersion() {
+ return plugin.version;
+ }
+
+ public static String getQualifiedVersion() {
+ return plugin.qualifiedVersion;
+ }
+
+ public IRepositoryRegistry getRepositoryRegistry() {
+ return repositoryRegistry;
+ }
+
+ public Archetype getArchetype() {
+ return lookup(Archetype.class);
+ }
+
+ public ArchetypeDataSource getArchetypeDataSource(String hint) {
+ return lookup(ArchetypeDataSource.class, hint);
+ }
+
+ public ArchetypeArtifactManager getArchetypeArtifactManager() {
+ return lookup(ArchetypeArtifactManager.class);
+ }
+
+ public IndexUpdater getIndexUpdater() {
+ return lookup(IndexUpdater.class);
+ }
+
+ public WagonManager getWagonManager() {
+ return lookup(WagonManager.class);
+ }
+
+ public NexusIndexer getNexusIndexer() {
+ return lookup(NexusIndexer.class);
+ }
+
+ public ArtifactContextProducer getArtifactContextProducer() {
+ return lookup(ArtifactContextProducer.class);
+ }
+
+ public ArtifactFactory getArtifactFactory() {
+ return lookup(ArtifactFactory.class);
+ }
+
+ public ArtifactMetadataSource getArtifactMetadataSource() {
+ return lookup(ArtifactMetadataSource.class);
+ }
+
+ public ArtifactCollector getArtifactCollector() {
+ return lookup(ArtifactCollector.class);
+ }
+
+ public RepositorySystem getRepositorySystem() {
+ return lookup(RepositorySystem.class);
+ }
+
+ public MavenSession setSession(MavenSession session) {
+ LegacySupport legacy = lookup(LegacySupport.class);
+ MavenSession old = legacy.getSession();
+ legacy.setSession(session);
+ return old;
+ }
+
+ public SearchEngine getSearchEngine(IProject context) throws CoreException {
+ return new IndexSearchEngine(MavenPlugin.getDefault().getIndexManager().getIndex(context));
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/NoSuchComponentException.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/NoSuchComponentException.java
new file mode 100644
index 00000000..b79b7ddf
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/NoSuchComponentException.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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;
+
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+
+/**
+ * NoSuchComponentException
+ *
+ * @author igor
+ */
+public class NoSuchComponentException extends IllegalArgumentException {
+
+ private static final long serialVersionUID = 9184391358528175461L;
+
+ public NoSuchComponentException(ComponentLookupException ex) {
+ super(ex);
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AbstractMavenMenuCreator.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AbstractMavenMenuCreator.java
new file mode 100644
index 00000000..92a431a5
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AbstractMavenMenuCreator.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IActionDelegate;
+
+import org.eclipse.m2e.core.MavenPlugin;
+
+
+/**
+ * Abstract Maven menu creator can be used to contribute custom entries to the Maven popup menu.
+ * <p>
+ * Custom items can be added to one of the standard groups {@link #NEW}, {@link #OPEN}, {@link #UPDATE}, {@link #NATURE}
+ * or {@link #IMPORT}.
+ *
+ * @see org.eclipse.m2e.m2menu extension point
+ *
+ * @author Eugene Kuleshov
+ */
+public abstract class AbstractMavenMenuCreator {
+ public static final String NEW = "new"; //$NON-NLS-1$
+ public static final String OPEN = "open"; //$NON-NLS-1$
+ public static final String UPDATE = "update"; //$NON-NLS-1$
+ public static final String NATURE = "nature"; //$NON-NLS-1$
+ public static final String IMPORT = "import"; //$NON-NLS-1$
+
+ protected IStructuredSelection selection;
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+ }
+
+ /**
+ * Creates menu items in given menu manager.
+ */
+ public abstract void createMenu(IMenuManager mgr);
+
+ /**
+ * A helper method to create IAction instance from given IActionDelegate.
+ */
+ protected IAction getAction(IActionDelegate delegate, String id, String text) {
+ return getAction(delegate, id, text, (ImageDescriptor) null);
+ }
+
+ /**
+ * A helper method to create IAction instance from given IActionDelegate.
+ */
+ protected IAction getAction(IActionDelegate delegate, String id, String text, String image) {
+ return getAction(delegate, id, text, MavenPlugin.getImageDescriptor(image));
+ }
+
+ protected IAction getAction(IActionDelegate delegate, String id, String text, ImageDescriptor image) {
+ ActionProxy action = new ActionProxy(id, text, delegate);
+ if(image!=null) {
+ action.setImageDescriptor(image);
+ }
+ return action;
+ }
+
+ class ActionProxy extends Action {
+ private IActionDelegate action;
+
+ public ActionProxy(String id, String text, IActionDelegate action) {
+ super(text);
+ this.action = action;
+ setId(id);
+ }
+
+ public ActionProxy(String id, String text, IActionDelegate action, int style) {
+ super(text, style);
+ this.action = action;
+ setId(id);
+ }
+
+ public void run() {
+ action.selectionChanged(this, selection);
+ action.run(this);
+ }
+ }
+
+}
+
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java
new file mode 100644
index 00000000..316b44d5
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddDependencyAction.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+import org.apache.maven.model.Dependency;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+
+
+public class AddDependencyAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
+
+ public static final String ID = "org.eclipse.m2e.addDependencyAction"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+ IFile file = getPomFileFromPomEditorOrViewSelection();
+
+ if(file == null) {
+ return;
+ }
+
+ MavenPlugin plugin = MavenPlugin.getDefault();
+
+ Set<ArtifactKey> artifacts = getArtifacts(file, plugin);
+ MavenRepositorySearchDialog dialog = new MavenRepositorySearchDialog(getShell(), Messages.AddDependencyAction_searchDialog_title, IIndex.SEARCH_ARTIFACT, artifacts, true);
+ if(dialog.open() == Window.OK) {
+ IndexedArtifactFile indexedArtifactFile = (IndexedArtifactFile) dialog.getFirstResult();
+ if(indexedArtifactFile != null) {
+ try {
+ MavenModelManager modelManager = plugin.getMavenModelManager();
+ Dependency dependency = indexedArtifactFile.getDependency();
+ String selectedScope = dialog.getSelectedScope();
+ dependency.setScope(selectedScope);
+ modelManager.addDependency(file, dependency);
+ } catch(Exception ex) {
+ String msg = NLS.bind(Messages.AddDependencyAction_error_msg, file);
+ MavenLogger.log(msg, ex);
+ MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.AddDependencyAction_error_title, msg);
+ }
+ }
+ }
+ }
+
+ public void dispose() {
+ }
+
+ public void init(IWorkbenchWindow window) {
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java
new file mode 100644
index 00000000..5251d527
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/AddPluginAction.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Collections;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+
+
+public class AddPluginAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
+
+ public static final String ID = "org.eclipse.m2e.addPluginAction"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+ IFile file = getPomFileFromPomEditorOrViewSelection();
+
+ if(file == null) {
+ return;
+ }
+
+ MavenRepositorySearchDialog dialog = new MavenRepositorySearchDialog(getShell(), Messages.AddPluginAction_searchDialog_title, IIndex.SEARCH_PLUGIN, Collections.<ArtifactKey> emptySet());
+ if(dialog.open() == Window.OK) {
+ final IndexedArtifactFile indexedArtifactFile = (IndexedArtifactFile) dialog.getFirstResult();
+ if(indexedArtifactFile != null) {
+ try {
+ MavenModelManager modelManager = MavenPlugin.getDefault().getMavenModelManager();
+ modelManager.updateProject(file, new MavenModelManager.PluginAdder( //
+ indexedArtifactFile.group, //
+ indexedArtifactFile.artifact, //
+ indexedArtifactFile.version));
+ } catch(Exception ex) {
+ MavenLogger.log("Can't add dependency to " + file, ex);
+ }
+ }
+ }
+ }
+
+ public void dispose() {
+ }
+
+ public void init(IWorkbenchWindow window) {
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java
new file mode 100644
index 00000000..ef074ace
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ChangeNatureAction.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+
+
+public class ChangeNatureAction implements IObjectActionDelegate {
+
+ public static final String ID_ENABLE_WORKSPACE = "org.eclipse.m2e.enableWorkspaceResolutionAction"; //$NON-NLS-1$
+
+ public static final String ID_DISABLE_WORKSPACE = "org.eclipse.m2e.disableWorkspaceResolutionAction"; //$NON-NLS-1$
+
+ public static final int ENABLE_WORKSPACE = 1;
+
+ public static final int DISABLE_WORKSPACE = 2;
+
+ private ISelection selection;
+
+ private int option;
+
+ public ChangeNatureAction(int option) {
+ this.option = option;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void run(IAction action) {
+ if(selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ Set<IProject> projects = new LinkedHashSet<IProject>();
+ for(Iterator<?> it = structuredSelection.iterator(); it.hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if(element instanceof IProject) {
+ project = (IProject) element;
+ } else if(element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
+ }
+ if(project != null) {
+ projects.add(project);
+ }
+ }
+
+ new UpdateJob(projects, option).schedule();
+ }
+ }
+
+ static class UpdateJob extends WorkspaceJob {
+ private final Set<IProject> projects;
+ private final int option;
+
+ private final IProjectConfigurationManager importManager;
+ private final MavenProjectManager projectManager;
+ private final IMavenConfiguration mavenConfiguration;
+
+ public UpdateJob(Set<IProject> projects, int option) {
+ super(Messages.ChangeNatureAction_job_changing);
+ this.projects = projects;
+ this.option = option;
+
+ MavenPlugin plugin = MavenPlugin.getDefault();
+ this.importManager = plugin.getProjectConfigurationManager();
+ this.projectManager = plugin.getMavenProjectManager();
+
+ this.mavenConfiguration = MavenPlugin.getDefault().getMavenConfiguration();
+ }
+
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ MultiStatus status = null;
+ for(IProject project : projects) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ monitor.subTask(project.getName());
+
+ try {
+ changeNature(project, monitor);
+ } catch (CoreException ex) {
+ if (status == null) {
+ status = new MultiStatus(IMavenConstants.PLUGIN_ID, IStatus.ERROR, Messages.ChangeNatureAction_status_error, null);
+ }
+ status.add(ex.getStatus());
+ }
+ }
+
+ boolean offline = mavenConfiguration.isOffline();
+ boolean updateSnapshots = false;
+ projectManager.refresh(new MavenUpdateRequest(projects.toArray(new IProject[projects.size()]), //
+ offline, updateSnapshots));
+
+ return status != null? status: Status.OK_STATUS;
+ }
+
+ private void changeNature(final IProject project, IProgressMonitor monitor) throws CoreException {
+ MavenPlugin plugin = MavenPlugin.getDefault();
+ MavenProjectManager projectManager = plugin.getMavenProjectManager();
+
+ final ResolverConfiguration configuration = projectManager.getResolverConfiguration(project);
+
+ boolean updateSourceFolders = false;
+
+ switch(option) {
+ case ENABLE_WORKSPACE:
+ configuration.setResolveWorkspaceProjects(true);
+ break;
+ case DISABLE_WORKSPACE:
+ configuration.setResolveWorkspaceProjects(false);
+ break;
+ }
+
+ projectManager.setResolverConfiguration(project, configuration);
+
+ if (updateSourceFolders) {
+ importManager.updateProjectConfiguration(project, configuration, monitor);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java
new file mode 100644
index 00000000..9431826e
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/CheckoutAsMavenAction.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Iterator;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.scm.ScmUrl;
+import org.eclipse.m2e.core.wizards.MavenCheckoutWizard;
+
+
+/**
+ * Checkout as Maven project action
+ *
+ * @author @author Eugene Kuleshov
+ */
+public class CheckoutAsMavenAction implements IObjectActionDelegate {
+
+ private IStructuredSelection selection;
+ private IWorkbenchPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ ScmUrl[] urls = null;
+ if(selection != null) {
+ urls = new ScmUrl[selection.size()];
+ int i = 0;
+ for(Iterator<?> it = selection.iterator(); it.hasNext();) {
+ urls[i++] = (ScmUrl) it.next();
+ }
+ }
+
+ MavenCheckoutWizard wizard = new MavenCheckoutWizard(urls);
+ WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ dialog.open();
+ }
+
+ protected Shell getShell() {
+ Shell shell = null;
+ if(targetPart != null) {
+ shell = targetPart.getSite().getShell();
+ }
+ if(shell != null) {
+ return shell;
+ }
+
+ IWorkbench workbench = MavenPlugin.getDefault().getWorkbench();
+ if(workbench == null) {
+ return null;
+ }
+
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window == null ? null : window.getShell();
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java
new file mode 100644
index 00000000..7ae99170
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/DisableNatureAction.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+
+
+public class DisableNatureAction implements IObjectActionDelegate {
+ public static final String ID = "org.eclipse.m2e.disableAction"; //$NON-NLS-1$
+
+ private ISelection selection;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ if(selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ for(Iterator<?> it = structuredSelection.iterator(); it.hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if(element instanceof IProject) {
+ project = (IProject) element;
+ } else if(element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
+ }
+ if(project != null) {
+ MavenPlugin plugin = MavenPlugin.getDefault();
+
+ try {
+ plugin.getProjectConfigurationManager().disableMavenNature(project, new NullProgressMonitor());
+
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
+ * org.eclipse.ui.IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java
new file mode 100644
index 00000000..2dec17c2
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/EnableNatureAction.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.core.wizards.MavenPomWizard;
+
+
+public class EnableNatureAction implements IObjectActionDelegate, IExecutableExtension {
+
+ public static final String ID = "org.eclipse.m2e.enableNatureAction"; //$NON-NLS-1$
+
+ static final String ID_WORKSPACE = "org.eclipse.m2e.enableWorkspaceResolutionAction"; //$NON-NLS-1$
+
+ static final String ID_MODULES = "org.eclipse.m2e.enableModulesAction"; //$NON-NLS-1$
+
+ private boolean workspaceProjects = true;
+
+ private ISelection selection;
+
+ public EnableNatureAction() {
+ }
+
+ public EnableNatureAction(String option) {
+ setInitializationData(null, null, option);
+ }
+
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+ if(IMavenConstants.NO_WORKSPACE_PROJECTS.equals(data)) {
+ this.workspaceProjects = false;
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void run(IAction action) {
+ if(selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ for(Iterator<?> it = structuredSelection.iterator(); it.hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if(element instanceof IProject) {
+ project = (IProject) element;
+ } else if(element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
+ }
+ if(project != null) {
+ enableNature(project, structuredSelection.size() == 1);
+ }
+ }
+ }
+ }
+
+ private void enableNature(final IProject project, boolean isSingle) {
+ final MavenPlugin plugin = MavenPlugin.getDefault();
+ IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME);
+ if(isSingle && !pom.exists()) {
+ // XXX move into AbstractProjectConfigurator and use Eclipse project settings
+ IWorkbench workbench = plugin.getWorkbench();
+
+ MavenPomWizard wizard = new MavenPomWizard();
+ wizard.init(workbench, (IStructuredSelection) selection);
+
+ Shell shell = workbench.getActiveWorkbenchWindow().getShell();
+ WizardDialog wizardDialog = new WizardDialog(shell, wizard);
+ wizardDialog.create();
+ wizardDialog.getShell().setText(Messages.EnableNatureAction_wizard_shell);
+ if(wizardDialog.open() == Window.CANCEL) {
+ return;
+ }
+ }
+ Job job = new Job(Messages.EnableNatureAction_job_enable) {
+
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResolverConfiguration configuration = new ResolverConfiguration();
+ configuration.setResolveWorkspaceProjects(workspaceProjects);
+ configuration.setActiveProfiles(""); //$NON-NLS-1$
+
+ boolean hasMavenNature = project.hasNature(IMavenConstants.NATURE_ID);
+
+ IProjectConfigurationManager configurationManager = plugin.getProjectConfigurationManager();
+
+ configurationManager.enableMavenNature(project, configuration, new NullProgressMonitor());
+
+ if(!hasMavenNature) {
+ configurationManager.updateProjectConfiguration(project, configuration, monitor);
+ }
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java
new file mode 100644
index 00000000..fee02f4f
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MaterializeAction.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+import org.apache.maven.model.Dependency;
+
+import org.eclipse.m2e.core.wizards.MavenMaterializePomWizard;
+
+
+public class MaterializeAction implements IObjectActionDelegate {
+
+ public static final String ID = "org.eclipse.m2e.materializeAction"; //$NON-NLS-1$
+
+ private IStructuredSelection selection;
+
+ public void run(IAction action) {
+ MavenMaterializePomWizard wizard = new MavenMaterializePomWizard();
+ wizard.init(PlatformUI.getWorkbench(), selection);
+
+ Dependency[] dependencies = wizard.getDependencies();
+ if(dependencies!=null && dependencies.length>0) {
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+ dialog.open();
+ } else {
+ // TODO show info dialog
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ } else {
+ this.selection = null;
+ }
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java
new file mode 100644
index 00000000..9e9ff69c
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenActionSupport.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.ArtifactRef;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+
+/**
+ *
+ * MavenActionSupport
+ *
+ * @author Jason van Zyl
+ */
+public abstract class MavenActionSupport implements IObjectActionDelegate {
+ protected IStructuredSelection selection;
+
+ protected IWorkbenchPart targetPart;
+
+ protected Set<ArtifactKey> getArtifacts(IFile file, MavenPlugin plugin) {
+ try {
+ MavenProjectManager projectManager = plugin.getMavenProjectManager();
+ IMavenProjectFacade projectFacade = projectManager.create(file, true, new NullProgressMonitor());
+ if(projectFacade != null) {
+ return ArtifactRef.toArtifactKey(projectFacade.getMavenProjectArtifacts());
+ }
+ } catch(Exception ex) {
+ String msg = "Can't read Maven project";
+ MavenLogger.log(msg, ex);
+ plugin.getConsole().logError(msg + "; " + ex.toString());
+ }
+ return Collections.emptySet();
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+ }
+
+ protected Shell getShell() {
+ Shell shell = null;
+ if(targetPart != null) {
+ shell = targetPart.getSite().getShell();
+ }
+ if(shell != null) {
+ return shell;
+ }
+
+ IWorkbench workbench = MavenPlugin.getDefault().getWorkbench();
+ if(workbench == null) {
+ return null;
+ }
+
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window == null ? null : window.getShell();
+ }
+
+ protected IFile getPomFileFromPomEditorOrViewSelection() {
+ IFile file = null;
+ //
+ // If I am in the POM editor I want to get hold of the IFile that is currently in the buffer
+ //
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if(window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if(page != null) {
+ IEditorPart editor = page.getActiveEditor();
+ if(editor != null) {
+ IEditorInput input = editor.getEditorInput();
+ if(input instanceof IFileEditorInput) {
+ IFileEditorInput fileInput = (IFileEditorInput) input;
+ file = fileInput.getFile();
+ if(file.getName().equals(IMavenConstants.POM_FILE_NAME)) {
+ return file;
+ }
+ }
+ }
+ }
+ }
+
+ //
+ // Otherwise we will assume a pom.xml file or IProject is being selected in the
+ // package explorer and we'll get the IFile from that. Otherwise we'll bail.
+ //
+ Object o = selection.iterator().next();
+
+ if(o instanceof IProject) {
+ file = ((IProject) o).getFile(IMavenConstants.POM_FILE_NAME);
+ } else if(o instanceof IFile) {
+ file = (IFile) o;
+ } else {
+ file = null;
+ }
+
+ return file;
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java
new file mode 100644
index 00000000..92aa714d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenConsoleRemoveAction.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.Action;
+
+import org.eclipse.m2e.core.MavenImages;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.internal.Messages;
+
+public class MavenConsoleRemoveAction extends Action {
+
+ public MavenConsoleRemoveAction() {
+ setToolTipText(Messages.MavenConsoleRemoveAction_tooltip);
+ setImageDescriptor(MavenImages.CLOSE);
+ }
+
+ public void run() {
+ MavenPlugin.getDefault().getConsole().closeConsole();
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java
new file mode 100644
index 00000000..c36e5357
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenDebugOutputAction.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+import org.eclipse.m2e.core.MavenImages;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+
+
+/**
+ * @author Eugene Kuleshov
+ */
+public class MavenDebugOutputAction extends Action {
+
+ private IPropertyChangeListener listener = new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ if(MavenPreferenceConstants.P_DEBUG_OUTPUT.equals(event.getProperty())) {
+ setChecked(isDebug());
+ }
+ }
+ };
+
+ public MavenDebugOutputAction() {
+ setToolTipText(Messages.MavenDebugOutputAction_0);
+ setImageDescriptor(MavenImages.DEBUG);
+
+ getPreferenceStore().addPropertyChangeListener(listener);
+ setChecked(isDebug());
+ }
+
+ public void run() {
+ getPreferenceStore().setValue(MavenPreferenceConstants.P_DEBUG_OUTPUT, isChecked());
+ }
+
+ public void dispose() {
+ getPreferenceStore().removePropertyChangeListener(listener);
+ }
+
+ IPreferenceStore getPreferenceStore() {
+ return MavenPlugin.getDefault().getPreferenceStore();
+ }
+
+ boolean isDebug() {
+ return getPreferenceStore().getBoolean(MavenPreferenceConstants.P_DEBUG_OUTPUT);
+ }
+
+}
+
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenMenuAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenMenuAction.java
new file mode 100644
index 00000000..6c67de47
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenMenuAction.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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.Platform;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.events.MenuAdapter;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.actions.DefaultMavenMenuCreator;
+
+
+/**
+ * Maven menu action
+ *
+ * @author Eugene Kuleshov
+ */
+public class MavenMenuAction implements IObjectActionDelegate, IMenuCreator {
+
+ private static final String EXTENSION_MENU_ITEMS = IMavenConstants.PLUGIN_ID + ".m2menu"; //$NON-NLS-1$
+
+ boolean fillMenu;
+
+ IAction delegateAction;
+
+ List<AbstractMavenMenuCreator> creators = null;
+
+ // IObjectActionDelegate
+
+ public void run(IAction action) {
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ // this.selection = (IStructuredSelection) selection;
+ this.fillMenu = true;
+
+ if(delegateAction != action) {
+ delegateAction = action;
+ delegateAction.setMenuCreator(this);
+ }
+
+ action.setEnabled(!selection.isEmpty());
+
+ for(AbstractMavenMenuCreator creator : getCreators()) {
+ creator.selectionChanged(action, selection);
+ }
+ }
+ }
+
+ // IMenuCreator
+
+ public void dispose() {
+ }
+
+ public Menu getMenu(Control parent) {
+ return null;
+ }
+
+ public Menu getMenu(Menu parent) {
+ Menu menu = new Menu(parent);
+
+ /**
+ * Add listener to re-populate the menu each time it is shown because MenuManager.update(boolean, boolean) doesn't
+ * dispose pull-down ActionContribution items for each popup menu.
+ */
+ menu.addMenuListener(new MenuAdapter() {
+ public void menuShown(MenuEvent e) {
+ if(fillMenu) {
+ Menu m = (Menu) e.widget;
+
+ for(MenuItem item : m.getItems()) {
+ item.dispose();
+ }
+
+ IMenuManager mgr = new MenuManager("#maven"); //$NON-NLS-1$
+ mgr.add(new GroupMarker(AbstractMavenMenuCreator.NEW));
+ mgr.insertAfter(AbstractMavenMenuCreator.NEW, new GroupMarker(AbstractMavenMenuCreator.UPDATE));
+ mgr.insertAfter(AbstractMavenMenuCreator.UPDATE, new GroupMarker(AbstractMavenMenuCreator.OPEN));
+ mgr.insertAfter(AbstractMavenMenuCreator.OPEN, new GroupMarker(AbstractMavenMenuCreator.NATURE));
+ mgr.insertAfter(AbstractMavenMenuCreator.NATURE, new GroupMarker(AbstractMavenMenuCreator.IMPORT));
+
+ for(AbstractMavenMenuCreator creator : getCreators()) {
+ creator.createMenu(mgr);
+ }
+
+ for(IContributionItem item : mgr.getItems()) {
+ item.fill(m, -1);
+ }
+
+ fillMenu = false;
+ }
+ }
+ });
+
+ return menu;
+ }
+
+ List<AbstractMavenMenuCreator> getCreators() {
+ if(creators == null) {
+ creators = new ArrayList<AbstractMavenMenuCreator>();
+ creators.add(new DefaultMavenMenuCreator());
+
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_MENU_ITEMS);
+ if(extensionPoint!=null) {
+ for(IExtension extension : extensionPoint.getExtensions()) {
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+ for(IConfigurationElement element : elements) {
+ try {
+ AbstractMavenMenuCreator creator = (AbstractMavenMenuCreator) element.createExecutableExtension("class"); //$NON-NLS-1$
+ creators.add(creator);
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ }
+ }
+ }
+ }
+ }
+ return creators;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java
new file mode 100644
index 00000000..9bf3586f
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/MavenPropertyTester.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+
+import org.eclipse.m2e.core.core.IMavenConstants;
+
+/**
+ * Helper IPropertyTester implementation to check if receiver can be launched with Maven.
+ * E.g. it is pom.xml file of folder or project that has pom.xml.
+ *
+ * @author Eugene Kuleshov
+ */
+public class MavenPropertyTester extends PropertyTester {
+
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ IAdaptable adaptable = (IAdaptable) receiver;
+
+ IProject projectAdapter = (IProject) adaptable.getAdapter(IProject.class);
+ if(projectAdapter!=null) {
+ return projectAdapter.getFile(IMavenConstants.POM_FILE_NAME).exists();
+ }
+
+ IFolder folderAdapter = (IFolder) adaptable.getAdapter(IFolder.class);
+ if(folderAdapter!=null) {
+ return folderAdapter.getFile(IMavenConstants.POM_FILE_NAME).exists();
+ }
+
+ IFile fileAdapter = (IFile) adaptable.getAdapter(IFile.class);
+ if(fileAdapter!=null) {
+ return fileAdapter.exists() && IMavenConstants.POM_FILE_NAME.equals(fileAdapter.getName());
+ }
+
+ return false;
+ }
+
+}
+
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java
new file mode 100644
index 00000000..ed7223c9
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/ModuleProjectWizardAction.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.m2e.core.wizards.MavenModuleWizard;
+
+/**
+ * A module project wizard action.
+ */
+public class ModuleProjectWizardAction implements IObjectActionDelegate {
+
+ /** action id */
+ public static final String ID =
+ "org.eclipse.m2e.actions.moduleProjectWizardAction"; //$NON-NLS-1$
+
+ /** the current selection */
+ private IStructuredSelection selection;
+
+ /** parent shell */
+ private Shell parent;
+
+ /** Runs the action. */
+ public void run( IAction action ) {
+ MavenModuleWizard wizard = new MavenModuleWizard();
+ wizard.init( PlatformUI.getWorkbench(), selection );
+ WizardDialog dialog = new WizardDialog( parent, wizard );
+ dialog.open();
+ }
+
+
+ /** Sets the active workbench part. */
+ public void setActivePart( IAction action, IWorkbenchPart part ) {
+ parent = part.getSite().getShell();
+ }
+
+
+ /** Handles the selection change */
+ public void selectionChanged( IAction action, ISelection selection ) {
+ if( selection instanceof IStructuredSelection ) {
+ this.selection = ( IStructuredSelection ) selection;
+ }
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java
new file mode 100644
index 00000000..47b10f71
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenMavenConsoleAction.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import org.eclipse.jface.action.Action;
+
+import org.eclipse.m2e.core.MavenPlugin;
+
+/**
+ * Open Maven Console Action
+ *
+ * @author Eugene Kuleshov
+ */
+public class OpenMavenConsoleAction extends Action {
+
+ public void run() {
+ MavenPlugin.getDefault().getConsole().showConsole();
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java
new file mode 100644
index 00000000..700b6c54
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenPomAction.java
@@ -0,0 +1,404 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionDelegate;
+import org.eclipse.ui.part.FileEditorInput;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.dialogs.MavenRepositorySearchDialog;
+
+
+/**
+ * Open POM Action
+ *
+ * @author Eugene Kuleshov
+ */
+public class OpenPomAction extends ActionDelegate implements IWorkbenchWindowActionDelegate, IExecutableExtension {
+
+ public static final String ID = "org.eclipse.m2e.openPomAction"; //$NON-NLS-1$
+
+ String type = IIndex.SEARCH_ARTIFACT;
+
+ private IStructuredSelection selection;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+ if("plugins".equals(data)) { //$NON-NLS-1$
+ this.type = IIndex.SEARCH_PACKAGING;
+ } else {
+ this.type = IIndex.SEARCH_ARTIFACT;
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ } else {
+ this.selection = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ if(selection != null) {
+ Object element = this.selection.getFirstElement();
+ if(IIndex.SEARCH_ARTIFACT.equals(type) && element != null) {
+ try {
+ final ArtifactKey ak = SelectionUtil.getArtifactKey(element);
+ if(ak != null) {
+ new Job(Messages.OpenPomAction_job_opening) {
+ protected IStatus run(IProgressMonitor monitor) {
+ openEditor(ak.getGroupId(), ak.getArtifactId(), ak.getVersion(), monitor);
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ return;
+ }
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenPomAction_open_error_title, Messages.OpenPomAction_open_error_message);
+ }
+ });
+ }
+ }
+ }
+
+ String title = Messages.OpenPomAction_title_pom;
+
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ MavenRepositorySearchDialog dialog = new MavenRepositorySearchDialog(shell, title, type, Collections
+ .<ArtifactKey> emptySet());
+ if(dialog.open() == Window.OK) {
+ final IndexedArtifactFile iaf = (IndexedArtifactFile) dialog.getFirstResult();
+ new Job(Messages.OpenPomAction_job_opening) {
+ protected IStatus run(IProgressMonitor monitor) {
+ if(iaf != null) {
+ openEditor(iaf.group, iaf.artifact, iaf.version, monitor);
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ }
+ }
+
+ public static void openEditor(IndexedArtifact ia, IndexedArtifactFile f, IProgressMonitor monitor) {
+ if(f == null || ia.getClassname() == null || ia.getPackageName() == null) {
+ return;
+ }
+
+ String groupId = f.getDependency().getGroupId();
+ String artifactId = f.getDependency().getArtifactId();
+ String version = f.getDependency().getVersion();
+
+ String name = ia.getClassname();
+ String fileName = ia.getPackageName().replace('.', '/') + "/" + ia.getClassname() + ".java"; //$NON-NLS-1$ //$NON-NLS-2$
+ String tooltip = groupId + ":" + artifactId + ":" + version + "/" + fileName; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ try {
+ IMaven maven = MavenPlugin.getDefault().getMaven();
+
+ List<ArtifactRepository> artifactRepositories = maven.getArtifactRepositories();
+
+ Artifact artifact = maven.resolve(groupId, artifactId, version, "java-source", "sources", artifactRepositories, //$NON-NLS-1$ //$NON-NLS-2$
+ monitor);
+
+ final File file = artifact.getFile();
+ if(file == null) {
+ openDialog(NLS.bind(Messages.OpenPomAction_error_download_source, tooltip));
+ return;
+ }
+
+ // that won't work if source archive have subfolders before actual source tree
+ String url = "jar:" + file.toURL().toString() + "!/" + fileName; //$NON-NLS-1$ //$NON-NLS-2$
+ InputStream is = new URL(url).openStream();
+ byte[] buff = readStream(is);
+
+ openEditor(new MavenPathStorageEditorInput(name + ".java", tooltip, url, buff), name + ".java"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ } catch(IOException ex) {
+ String msg = NLS.bind(Messages.OpenPomAction_error_open_editor, name);
+ MavenLogger.log(msg, ex);
+ openDialog(msg + "\n" + ex.toString()); //$NON-NLS-1$
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ openDialog(ex.getMessage() + "\n" + ex.toString()); //$NON-NLS-1$
+ }
+ }
+
+ public static IEditorPart openEditor(String groupId, String artifactId, String version, IProgressMonitor monitor) {
+ if(groupId.length() > 0 && artifactId.length() > 0) {
+ final String name = groupId + ":" + artifactId + ":" + version + ".pom"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ try {
+ MavenPlugin plugin = MavenPlugin.getDefault();
+
+ MavenProjectManager projectManager = plugin.getMavenProjectManager();
+ IMavenProjectFacade projectFacade = projectManager.getMavenProject(groupId, artifactId, version);
+ if(projectFacade != null) {
+ final IFile pomFile = projectFacade.getPom();
+ return openEditor(new FileEditorInput(pomFile), name);
+ }
+
+ IMaven maven = MavenPlugin.getDefault().getMaven();
+
+ List<ArtifactRepository> artifactRepositories = maven.getArtifactRepositories();
+
+ Artifact artifact = maven.resolve(groupId, artifactId, version, "pom", null, artifactRepositories, monitor); //$NON-NLS-1$
+
+ File file = artifact.getFile();
+ if(file != null) {
+ return openEditor(new MavenPathStorageEditorInput(name, name, file.getAbsolutePath(),
+ readStream(new FileInputStream(file))), name);
+ }
+
+ openDialog(NLS.bind(Messages.OpenPomAction_error_download, name));
+
+ } catch(IOException ex) {
+ String msg = NLS.bind(Messages.OpenPomAction_error_open_pom, name);
+ MavenLogger.log(msg, ex);
+ openDialog(msg + "\n" + ex.toString()); //$NON-NLS-1$
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ openDialog(ex.getMessage() + "\n" + ex.toString()); //$NON-NLS-1$
+ }
+ }
+
+ return null;
+ }
+
+ public static IEditorPart openEditor(final IEditorInput editorInput, final String name) {
+ final IEditorPart[] part = new IEditorPart[1];
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
+ IContentType contentType = contentTypeManager.findContentTypeFor(name);
+ IEditorRegistry editorRegistry = PlatformUI.getWorkbench().getEditorRegistry();
+ IEditorDescriptor editor = editorRegistry.getDefaultEditor(name, contentType);
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if(window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if(page != null) {
+ try {
+ part[0] = page.openEditor(editorInput, editor.getId());
+ } catch(PartInitException ex) {
+ MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenPomAction_open_title, NLS.bind(Messages.OpenPomAction_33, editorInput.getName(), ex.toString())); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ });
+ return part[0];
+ }
+
+ private static void openDialog(final String msg) {
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenPomAction_open_title, msg);
+ }
+ });
+ }
+
+ private static byte[] readStream(InputStream is) throws IOException {
+ byte[] b = new byte[is.available()];
+ int len = 0;
+ while(true) {
+ int n = is.read(b, len, b.length - len);
+ if(n == -1) {
+ if(len < b.length) {
+ byte[] c = new byte[len];
+ System.arraycopy(b, 0, c, 0, len);
+ b = c;
+ }
+ return b;
+ }
+ len += n;
+ if(len == b.length) {
+ byte[] c = new byte[b.length + 1000];
+ System.arraycopy(b, 0, c, 0, len);
+ b = c;
+ }
+ }
+ }
+
+ /**
+ * Storage editor input implementation for Maven poms
+ */
+ public static class MavenStorageEditorInput implements IStorageEditorInput {
+
+ private final String name;
+
+ private final String path;
+
+ private final String tooltip;
+
+ private final byte[] content;
+
+ public MavenStorageEditorInput(String name, String tooltip, String path, byte[] content) {
+ this.name = name;
+ this.path = path;
+ this.tooltip = tooltip;
+ this.content = content;
+ }
+
+ // IStorageEditorInput
+
+ public boolean exists() {
+ return true;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getToolTipText() {
+ return this.tooltip;
+ }
+
+ public IStorage getStorage() {
+ return new MavenStorage(name, path, content);
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ public IPersistableElement getPersistable() {
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+ // IPathEditorInput
+
+ public IPath getPath() {
+ return new Path(path);
+ }
+
+ }
+
+ public static class MavenPathStorageEditorInput extends MavenStorageEditorInput implements IPathEditorInput {
+ public MavenPathStorageEditorInput(String name, String tooltip, String path, byte[] content) {
+ super(name, tooltip, path, content);
+ }
+ }
+
+ private static class MavenStorage implements IStorage {
+ private String name;
+
+ private final String path;
+
+ private final byte[] content;
+
+ public MavenStorage(String name, String path, byte[] content) {
+ this.name = name;
+ this.path = path;
+ this.content = content;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public IPath getFullPath() {
+ return path == null ? null : new Path(path);
+ }
+
+ public InputStream getContents() {
+ return new ByteArrayInputStream(content);
+ }
+
+ public boolean isReadOnly() {
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java
new file mode 100644
index 00000000..2b81ec4b
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/OpenUrlAction.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionDelegate;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.CiManagement;
+import org.apache.maven.model.IssueManagement;
+import org.apache.maven.model.Scm;
+import org.apache.maven.project.MavenProject;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+
+
+/**
+ * Open Url Action
+ *
+ * @author Eugene Kuleshov
+ */
+public class OpenUrlAction extends ActionDelegate implements IWorkbenchWindowActionDelegate, IExecutableExtension {
+
+ public static final String ID_PROJECT = "org.eclipse.m2e.openProjectPage"; //$NON-NLS-1$
+
+ public static final String ID_ISSUES = "org.eclipse.m2e.openIssuesPage"; //$NON-NLS-1$
+
+ public static final String ID_SCM = "org.eclipse.m2e.openScmPage"; //$NON-NLS-1$
+
+ public static final String ID_CI = "org.eclipse.m2e.openCiPage"; //$NON-NLS-1$
+
+ String actionId;
+
+ private IStructuredSelection selection;
+
+ public OpenUrlAction() {
+ }
+
+ public OpenUrlAction(String id) {
+ this.actionId = id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ } else {
+ this.selection = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ if(selection != null) {
+ try {
+ Object element = this.selection.getFirstElement();
+ final ArtifactKey a = SelectionUtil.getArtifactKey(element);
+ if(a != null) {
+ new Job(Messages.OpenUrlAction_job_browser) {
+ protected IStatus run(IProgressMonitor monitor) {
+ openBrowser(actionId, a.getGroupId(), a.getArtifactId(), a.getVersion(), monitor);
+ return Status.OK_STATUS;
+ }
+
+ }.schedule();
+ return;
+ }
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenUrlAction_open_url_title, Messages.OpenUrlAction_open_url_message);
+ }
+ });
+ }
+ }
+ }
+
+ public static void openBrowser(String actionId, String groupId, String artifactId, String version, IProgressMonitor monitor) {
+ try {
+ MavenProject mavenProject = getMavenProject(groupId, artifactId, version, monitor);
+ final String url = getUrl(actionId, mavenProject);
+ if(url!=null) {
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ try {
+ IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
+ IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR
+ | IWorkbenchBrowserSupport.LOCATION_BAR, url, url, url);
+ browser.openURL(new URL(url));
+ } catch(PartInitException ex) {
+ MavenLogger.log(ex);
+ } catch(MalformedURLException ex) {
+ MavenLogger.log("Malformed url " + url, ex);
+ }
+ }
+ });
+ }
+ } catch(Exception ex) {
+ MavenLogger.log("Can't open URL", ex);
+ }
+ }
+
+ private static String getUrl(String actionId, MavenProject mavenProject) {
+ String url = null;
+ if(ID_PROJECT.equals(actionId)) {
+ url = mavenProject.getUrl();
+ if(url == null) {
+ openDialog(Messages.OpenUrlAction_error_no_url);
+ }
+ } else if(ID_ISSUES.equals(actionId)) {
+ IssueManagement issueManagement = mavenProject.getIssueManagement();
+ if(issueManagement != null) {
+ url = issueManagement.getUrl();
+ }
+ if(url == null) {
+ openDialog(Messages.OpenUrlAction_error_no_issues);
+ }
+ } else if(ID_SCM.equals(actionId)) {
+ Scm scm = mavenProject.getScm();
+ if(scm != null) {
+ url = scm.getUrl();
+ }
+ if(url == null) {
+ openDialog(Messages.OpenUrlAction_error_no_scm);
+ }
+ } else if(ID_CI.equals(actionId)) {
+ CiManagement ciManagement = mavenProject.getCiManagement();
+ if(ciManagement != null) {
+ url = ciManagement.getUrl();
+ }
+ if(url == null) {
+ openDialog(Messages.OpenUrlAction_error_no_ci);
+ }
+ }
+ return url;
+ }
+
+ private static MavenProject getMavenProject(String groupId, String artifactId, String version, IProgressMonitor monitor) throws Exception {
+ String name = groupId + ":" + artifactId + ":" + version;
+
+ MavenPlugin plugin = MavenPlugin.getDefault();
+ IMaven maven = MavenPlugin.getDefault().getMaven();
+
+ IMavenProjectFacade projectFacade = plugin.getMavenProjectManager().getMavenProject(groupId, artifactId, version);
+ if(projectFacade != null) {
+ return projectFacade.getMavenProject(monitor);
+ }
+
+ List<ArtifactRepository> artifactRepositories = maven.getArtifactRepositories();
+
+ Artifact a = maven.resolve(groupId, artifactId, version, "pom", null, artifactRepositories, monitor); //$NON-NLS-1$
+
+ File pomFile = a.getFile();
+ if(pomFile == null) {
+ openDialog(NLS.bind(Messages.OpenUrlAction_error_open, name));
+ return null;
+ }
+
+ return maven.readProject(pomFile, monitor);
+ }
+
+ private static void openDialog(final String msg) {
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenUrlAction_browser_title, msg);
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+ if(data != null) {
+ actionId = (String) data;
+ }
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java
new file mode 100644
index 00000000..5c2fa7fa
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/RefreshMavenModelsAction.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.IWorkingSet;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
+
+
+public class RefreshMavenModelsAction implements IWorkbenchWindowActionDelegate, IExecutableExtension {
+
+ public static final String ID = "org.eclipse.m2e.refreshMavenModelsAction"; //$NON-NLS-1$
+
+ public static final String ID_SNAPSHOTS = "org.eclipse.m2e.refreshMavenSnapshotsAction"; //$NON-NLS-1$
+
+ private boolean updateSnapshots = false;
+
+ private boolean offline = false; // should respect global settings
+
+ private IStructuredSelection selection;
+
+ public RefreshMavenModelsAction() {
+ }
+
+ public RefreshMavenModelsAction(boolean updateSnapshots) {
+ this.updateSnapshots = updateSnapshots;
+ }
+
+ // IExecutableExtension
+
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+ if("snapshots".equals(data)) { //$NON-NLS-1$
+ this.updateSnapshots = true;
+ }
+ }
+
+ // IWorkbenchWindowActionDelegate
+
+ public void run(IAction action) {
+ MavenProjectManager projectManager = MavenPlugin.getDefault().getMavenProjectManager();
+ projectManager.refresh(new MavenUpdateRequest(getProjects(), offline, updateSnapshots));
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ } else {
+ this.selection = null;
+ }
+ }
+
+ public void dispose() {
+ }
+
+ public void init(IWorkbenchWindow window) {
+ }
+
+ private IProject[] getProjects() {
+ ArrayList<IProject> projectList = new ArrayList<IProject>();
+ if(selection != null) {
+ for(Iterator<?> it = selection.iterator(); it.hasNext();) {
+ Object o = it.next();
+ if(o instanceof IProject) {
+ projectList.add((IProject) o);
+ } else if(o instanceof IWorkingSet) {
+ IWorkingSet workingSet = (IWorkingSet) o;
+ for(IAdaptable adaptable : workingSet.getElements()) {
+ IProject project = (IProject) adaptable.getAdapter(IProject.class);
+ try {
+ if(project != null && project.isAccessible() && project.hasNature(IMavenConstants.NATURE_ID)) {
+ projectList.add(project);
+ }
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ }
+ }
+ }
+ }
+ }
+ if(projectList.isEmpty()) {
+ return ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ }
+ return projectList.toArray(new IProject[projectList.size()]);
+ }
+
+}
+
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java
new file mode 100644
index 00000000..7955c654
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/SelectionUtil.java
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
+
+import org.codehaus.plexus.util.IOUtil;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
+import org.apache.maven.project.MavenProject;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.util.Util;
+import org.eclipse.m2e.core.util.Util.FileStoreEditorInputStub;
+import org.eclipse.m2e.model.edit.pom.Dependency;
+
+
+/**
+ * Helper methods to deal with workspace resources passed as navigator selection to actions and wizards.
+ */
+public class SelectionUtil {
+
+ public static final int UNSUPPORTED = 0;
+
+ public static final int PROJECT_WITH_NATURE = 1;
+
+ public static final int PROJECT_WITHOUT_NATURE = 2;
+
+ public static final int POM_FILE = 4;
+
+ public static final int JAR_FILE = 8;
+
+ public static final int WORKING_SET = 16;
+
+ /** Checks which type the given selection belongs to. */
+ public static int getSelectionType(IStructuredSelection selection) {
+ int type = UNSUPPORTED;
+ if(selection != null) {
+ for(Iterator<?> it = selection.iterator(); it.hasNext();) {
+ int elementType = getElementType(it.next());
+ if(elementType == UNSUPPORTED) {
+ return UNSUPPORTED;
+ }
+ type |= elementType;
+ }
+ }
+ return type;
+ }
+
+ /** Checks which type the given element belongs to. */
+ public static int getElementType(Object element) {
+ IProject project = getType(element, IProject.class);
+ if(project != null) {
+ try {
+ if(project.hasNature(IMavenConstants.NATURE_ID)) {
+ return PROJECT_WITH_NATURE;
+ }
+ return PROJECT_WITHOUT_NATURE;
+ } catch(CoreException e) {
+ // ignored
+ }
+ }
+
+ IFile file = getType(element, IFile.class);
+ if(file != null) {
+ if(IMavenConstants.POM_FILE_NAME.equals(file.getFullPath().lastSegment())) {
+ return POM_FILE;
+ }
+ }
+
+ ArtifactKey artifactKey = getType(element, ArtifactKey.class);
+ if(artifactKey != null) {
+ return JAR_FILE;
+ }
+
+ IWorkingSet workingSet = getType(element, IWorkingSet.class);
+ if(workingSet!=null) {
+ return WORKING_SET;
+ }
+
+ return UNSUPPORTED;
+ }
+
+ /**
+ * Checks if the object belongs to a given type and returns it or a suitable adapter.
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T getType(Object element, Class<T> type) {
+ if(element==null) {
+ return null;
+ }
+ if(type.isInstance(element)) {
+ return (T) element;
+ }
+ if(element instanceof IAdaptable) {
+ T adapter = (T) ((IAdaptable) element).getAdapter(type);
+ if(adapter != null) {
+ return adapter;
+ }
+ }
+ return (T) Platform.getAdapterManager().getAdapter(element, type);
+ }
+
+ public static IPath getSelectedLocation(IStructuredSelection selection) {
+ Object element = selection == null ? null : selection.getFirstElement();
+
+ IPath path = getType(element, IPath.class);
+ if(path != null) {
+ return path;
+ }
+
+ IResource resource = getType(element, IResource.class);
+ if(resource != null) {
+ return resource.getLocation();
+ }
+
+// IPackageFragmentRoot fragment = getType(element, IResource.class);
+// if(fragment != null) {
+// IJavaProject javaProject = fragment.getJavaProject();
+// if(javaProject != null) {
+// IResource resource = getType(javaProject, IResource.class);
+// if(resource != null) {
+// return resource.getProject().getProject().getLocation();
+// }
+// }
+// }
+
+ return null;
+ }
+
+ public static IWorkingSet getSelectedWorkingSet(IStructuredSelection selection) {
+ Object element = selection == null ? null : selection.getFirstElement();
+ {
+ IWorkingSet workingSet = getType(element, IWorkingSet.class);
+ if(workingSet != null) {
+ return workingSet;
+ }
+ }
+ {
+ IResource resource = getType(element, IResource.class);
+ if(resource != null) {
+ return getWorkingSet(resource.getProject());
+ }
+ }
+
+// IResource resource = getType(element, IResource.class);
+// if(resource != null) {
+// return getWorkingSet(resource);
+// }
+
+// IPackageFragmentRoot fragment = getType(element, IPackageFragmentRoot.class);
+// if(fragment != null) {
+// IJavaProject javaProject = fragment.getJavaProject();
+// if(javaProject != null) {
+// IResource resource = getType(javaProject, IResource.class);
+// if(resource != null) {
+// return getWorkingSet(resource.getProject());
+// }
+// }
+// }
+
+ return null;
+ }
+
+ public static IWorkingSet getWorkingSet(Object element) {
+ IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+ for(IWorkingSet workingSet : workingSetManager.getWorkingSets()) {
+ for(IAdaptable adaptable : workingSet.getElements()) {
+ if(adaptable.getAdapter(IResource.class) == element) {
+ return workingSet;
+ }
+ }
+ }
+ return null;
+ }
+
+ public static IWorkingSet[] getAssignedWorkingSets(Object element) {
+ List<IWorkingSet> list = new ArrayList<IWorkingSet>();
+ IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+ for(IWorkingSet workingSet : workingSetManager.getWorkingSets()) {
+ for(IAdaptable adaptable : workingSet.getElements()) {
+ if(adaptable.getAdapter(IResource.class) == element) {
+ list.add(workingSet);
+ }
+ }
+ }
+ return list.toArray(new IWorkingSet[list.size()]);
+ }
+
+ public static ArtifactKey getArtifactKey(Object element) throws CoreException {
+ if(element instanceof Artifact) {
+ return new ArtifactKey(((Artifact) element));
+
+ } else if(element instanceof org.sonatype.aether.graph.DependencyNode) {
+ org.sonatype.aether.artifact.Artifact artifact = ((org.sonatype.aether.graph.DependencyNode) element)
+ .getDependency().getArtifact();
+ return new ArtifactKey(artifact);
+
+ } else if(element instanceof Dependency) {
+ Dependency dependency = (Dependency) element;
+ String groupId = dependency.getGroupId();
+ String artifactId = dependency.getArtifactId();
+ String version = dependency.getVersion();
+
+ if(version == null) {
+ //mkleint: this looks scary
+ IEditorPart editor = getActiveEditor();
+ if(editor!=null) {
+ MavenProject mavenProject = getMavenProject(editor.getEditorInput(), null);
+ if(mavenProject!=null) {
+ Artifact a = mavenProject.getArtifactMap().get(groupId + ":" + artifactId); //$NON-NLS-1$
+ version = a.getBaseVersion();
+ }
+ }
+ }
+ return new ArtifactKey(dependency.getGroupId(), dependency.getArtifactId(), version, null);
+ }
+
+ return SelectionUtil.getType(element, ArtifactKey.class);
+ }
+
+ public static MavenProject getMavenProject(IEditorInput editorInput, IProgressMonitor monitor) throws CoreException {
+ if(editorInput instanceof IFileEditorInput) {
+ IFile pomFile = ((IFileEditorInput) editorInput).getFile();
+ MavenProjectManager projectManager = MavenPlugin.getDefault().getMavenProjectManager();
+ IMavenProjectFacade facade = projectManager.create(pomFile, true, monitor);
+ if(facade!=null) {
+ return facade.getMavenProject(monitor);
+ }
+
+ } else if(editorInput instanceof IStorageEditorInput) {
+ IStorageEditorInput storageInput = (IStorageEditorInput) editorInput;
+ IStorage storage = storageInput.getStorage();
+ IPath path = storage.getFullPath();
+ if(path == null || !new File(path.toOSString()).exists()) {
+ File tempPomFile = null;
+ InputStream is = null;
+ OutputStream os = null;
+ try {
+ tempPomFile = File.createTempFile("maven-pom", ".pom"); //$NON-NLS-1$ //$NON-NLS-2$
+ os = new FileOutputStream(tempPomFile);
+ is = storage.getContents();
+ IOUtil.copy(is, os);
+ return readMavenProject(tempPomFile, monitor);
+ } catch(IOException ex) {
+ MavenLogger.log("Can't close stream", ex);
+ } finally {
+ IOUtil.close(is);
+ IOUtil.close(os);
+ if(tempPomFile != null) {
+ tempPomFile.delete();
+ }
+ }
+ } else {
+ return readMavenProject(path.toFile(), monitor);
+ }
+
+ } else if(editorInput.getClass().getName().endsWith("FileStoreEditorInput")) { //$NON-NLS-1$
+ return readMavenProject(new File(Util.proxy(editorInput, FileStoreEditorInputStub.class).getURI().getPath()), monitor);
+ }
+
+ return null;
+ }
+
+ private static MavenProject readMavenProject(File pomFile, IProgressMonitor monitor) throws CoreException {
+ if(monitor==null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ IMaven maven = MavenPlugin.getDefault().getMaven();
+
+ MavenExecutionRequest request = maven.createExecutionRequest(monitor);
+ request.setOffline(false);
+ request.setUpdateSnapshots(false);
+ request.setRecursive(false);
+ request.setPom(pomFile);
+
+ MavenExecutionResult result = maven.execute(request, monitor);
+
+ MavenProject project = result.getProject();
+ if(project!=null) {
+ return project;
+ }
+
+ if(result.hasExceptions()) {
+ List<IStatus> statuses = new ArrayList<IStatus>();
+ List<Throwable> exceptions = result.getExceptions();
+ for(Throwable e : exceptions) {
+ statuses.add(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, e.getMessage(), e));
+ }
+
+ throw new CoreException(new MultiStatus(IMavenConstants.PLUGIN_ID, IStatus.ERROR, //
+ statuses.toArray(new IStatus[statuses.size()]), Messages.SelectionUtil_error_cannot_read, null));
+ }
+
+ throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, //
+ Messages.SelectionUtil_error_cannot_read, null));
+ }
+
+ private static IEditorPart getActiveEditor() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if(window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if(page != null) {
+ return page.getActiveEditor();
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java
new file mode 100644
index 00000000..e8adb704
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/actions/UpdateConfigurationAction.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.actions;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.progress.IProgressConstants;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenConsole;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.util.M2EUtils;
+
+
+public class UpdateConfigurationAction implements IObjectActionDelegate {
+
+ public static final String ID = "org.eclipse.m2e.updateConfigurationAction"; //$NON-NLS-1$
+
+ private IStructuredSelection selection;
+
+ private Shell shell;
+
+ public UpdateConfigurationAction(Shell shell) {
+ this.shell = shell;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ this.selection = (IStructuredSelection) selection;
+ } else {
+ this.selection = null;
+ }
+ }
+
+ public void run(IAction action) {
+ final Set<IProject> projects = getProjects();
+ final MavenPlugin plugin = MavenPlugin.getDefault();
+ WorkspaceJob job = new WorkspaceJob(Messages.UpdateSourcesAction_job_update_conf) {
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
+ monitor.beginTask(getName(), projects.size());
+
+ MavenConsole console = plugin.getConsole();
+
+ long l1 = System.currentTimeMillis();
+ console.logMessage("Update started");
+
+ MultiStatus status = null;
+ //project names to the errors encountered when updating them
+ Map<String, Throwable> updateErrors = new HashMap<String, Throwable>();
+
+ for(IProject project : projects) {
+ if(monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ monitor.subTask(project.getName());
+ IMavenProjectFacade projectFacade = plugin.getMavenProjectManager().create(project, monitor);
+ if(projectFacade != null) {
+ try {
+ plugin.getProjectConfigurationManager().updateProjectConfiguration(project, //
+ projectFacade.getResolverConfiguration(), //
+ new SubProgressMonitor(monitor, 1));
+ } catch(CoreException ex) {
+ if(status == null) {
+ status = new MultiStatus(IMavenConstants.PLUGIN_ID, IStatus.ERROR, //
+ Messages.UpdateSourcesAction_error_cannot_update, null);
+ }
+ status.add(ex.getStatus());
+ updateErrors.put(project.getName(), ex);
+ } catch(IllegalArgumentException e) {
+ status = new MultiStatus(IMavenConstants.PLUGIN_ID, IStatus.ERROR, //
+ Messages.UpdateSourcesAction_error_cannot_update, null);
+ updateErrors.put(project.getName(), e);
+ }
+ }
+ }
+ if(updateErrors.size() > 0) {
+ M2EUtils.showErrorsForProjectsDialog(shell, Messages.UpdateSourcesAction_error_title,
+ Messages.UpdateSourcesAction_error_message, updateErrors);
+ }
+ long l2 = System.currentTimeMillis();
+ console.logMessage(NLS.bind("Update completed: {0} sec", ((l2 - l1) / 1000)));
+
+ return status != null ? status : Status.OK_STATUS;
+ }
+ };
+ // We need to grab workspace lock because IJavaProject.setRawClasspath() needs it.
+ job.setRule(plugin.getProjectConfigurationManager().getRule());
+ job.schedule();
+ }
+
+ private Set<IProject> getProjects() {
+ Set<IProject> projects = new LinkedHashSet<IProject>();
+ if(selection != null) {
+ for(Iterator<?> it = selection.iterator(); it.hasNext();) {
+ Object element = it.next();
+ if(element instanceof IProject) {
+ projects.add((IProject) element);
+ } else if(element instanceof IWorkingSet) {
+ IWorkingSet workingSet = (IWorkingSet) element;
+ for(IAdaptable adaptable : workingSet.getElements()) {
+ IProject project = (IProject) adaptable.getAdapter(IProject.class);
+ try {
+ if(project != null && project.isAccessible() && project.hasNature(IMavenConstants.NATURE_ID)) {
+ projects.add(project);
+ }
+ } catch(CoreException ex) {
+ MavenLogger.log(ex);
+ }
+ }
+ } else if(element instanceof IAdaptable) {
+ IProject project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
+ if(project != null) {
+ projects.add(project);
+ }
+ }
+ }
+ }
+ return projects;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogFactory.java
new file mode 100644
index 00000000..8b9331bd
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogFactory.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.archetype;
+
+import java.util.Properties;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+
+import org.apache.maven.archetype.Archetype;
+import org.apache.maven.archetype.catalog.ArchetypeCatalog;
+import org.apache.maven.archetype.source.ArchetypeDataSource;
+import org.apache.maven.archetype.source.ArchetypeDataSourceException;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+
+
+/**
+ * Abstract ArchetypeCatalog factory
+ */
+public abstract class ArchetypeCatalogFactory {
+ private final String id;
+
+ private final String description;
+
+ private final boolean editable;
+
+ public ArchetypeCatalogFactory(String id, String description, boolean editable) {
+ this.id = id;
+ this.description = description;
+ this.editable = editable;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public boolean isEditable() {
+ return editable;
+ }
+
+ public abstract ArchetypeCatalog getArchetypeCatalog() throws CoreException;
+
+ public String toString() {
+ return getId();
+ }
+
+ protected Archetype getArchetyper() {
+ return MavenPlugin.getDefault().getArchetype();
+ }
+
+ /**
+ * Factory for Nexus Indexer ArchetypeCatalog
+ */
+ public static class NexusIndexerCatalogFactory extends ArchetypeCatalogFactory {
+ public static final String ID = "nexusIndexer"; //$NON-NLS-1$
+
+ public NexusIndexerCatalogFactory() {
+ super(ID, Messages.ArchetypeCatalogFactory_indexer_catalog, false);
+ }
+
+ public ArchetypeCatalog getArchetypeCatalog() throws CoreException {
+ try {
+ ArchetypeDataSource source = MavenPlugin.getDefault().getArchetypeDataSource("nexus"); //$NON-NLS-1$
+ return source.getArchetypeCatalog(new Properties());
+ } catch(ArchetypeDataSourceException ex) {
+ String msg = NLS.bind(Messages.ArchetypeCatalogFactory_error_missing_catalog, ex.getMessage());
+ MavenLogger.log(msg, ex);
+ throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, msg, ex));
+ }
+ }
+
+ }
+
+ /**
+ * Factory for internal ArchetypeCatalog
+ */
+ public static class InternalCatalogFactory extends ArchetypeCatalogFactory {
+ public static final String ID = "internal"; //$NON-NLS-1$
+
+ public InternalCatalogFactory() {
+ super(ID, Messages.ArchetypeCatalogFactory_internal, false);
+ }
+
+ public ArchetypeCatalog getArchetypeCatalog() {
+ return getArchetyper().getInternalCatalog();
+ }
+ }
+
+ /**
+ * Factory for default local ArchetypeCatalog
+ */
+ public static class DefaultLocalCatalogFactory extends ArchetypeCatalogFactory {
+ public static final String ID = "defaultLocal"; //$NON-NLS-1$
+
+ public DefaultLocalCatalogFactory() {
+ super(ID, Messages.ArchetypeCatalogFactory_default_local, false);
+ }
+
+ public ArchetypeCatalog getArchetypeCatalog() {
+ return getArchetyper().getDefaultLocalCatalog();
+ }
+ }
+
+ /**
+ * Factory for local ArchetypeCatalog
+ */
+ public static class LocalCatalogFactory extends ArchetypeCatalogFactory {
+
+ public LocalCatalogFactory(String path, String description, boolean editable) {
+ super(path, description == null || description.trim().length() == 0 ? NLS.bind(Messages.ArchetypeCatalogFactory_local, path) : description, editable);
+ }
+
+ public ArchetypeCatalog getArchetypeCatalog() {
+ return getArchetyper().getLocalCatalog(getId());
+ }
+ }
+
+ /**
+ * Factory for remote ArchetypeCatalog
+ */
+ public static class RemoteCatalogFactory extends ArchetypeCatalogFactory {
+
+ private String repositoryUrl = null;
+
+ public RemoteCatalogFactory(String url, String description, boolean editable) {
+ super(url, description == null || description.trim().length() == 0 ? NLS.bind(Messages.ArchetypeCatalogFactory_remote, url) : description, editable);
+ repositoryUrl = parseCatalogUrl(url);
+ }
+
+ /**
+ * @param url
+ * @return
+
+ */
+ private String parseCatalogUrl(String url) {
+ if (url == null) {
+ return null;
+ }
+ int length = url.length();
+ if (length > 1 && url.endsWith("/")) //$NON-NLS-1$
+ {
+ return url.substring(0, url.length()-1);
+ }
+ int idx = url.lastIndexOf("/"); //$NON-NLS-1$
+ idx = (idx>0)?idx:0;
+ if (url.lastIndexOf(".") >= idx) { //$NON-NLS-1$
+ //Assume last fragment of the url is a file, let's keep its parent folder
+ return url.substring(0, idx);
+ }
+ return url;
+ }
+
+ public ArchetypeCatalog getArchetypeCatalog() {
+ return getArchetyper().getRemoteCatalog(getId());
+ }
+
+
+ /**
+ * @return the url of the remote repository hosting the catalog
+ */
+ public String getRepositoryUrl() {
+ return repositoryUrl;
+ }
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogsWriter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogsWriter.java
new file mode 100644
index 00000000..aecc0a6d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeCatalogsWriter.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.archetype;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.helpers.XMLFilterImpl;
+
+import org.eclipse.osgi.util.NLS;
+
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
+import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
+import org.eclipse.m2e.core.core.MavenLogger;
+import org.eclipse.m2e.core.internal.Messages;
+
+
+/**
+ * Archetype catalogs writer
+ *
+ * @author Eugene Kuleshov
+ */
+public class ArchetypeCatalogsWriter {
+
+ private static final String ELEMENT_CATALOGS = "archetypeCatalogs"; //$NON-NLS-1$
+
+ private static final String ELEMENT_CATALOG = "catalog"; //$NON-NLS-1$
+
+ private static final String ATT_CATALOG_TYPE = "type"; //$NON-NLS-1$
+
+ private static final String ATT_CATALOG_LOCATION = "location"; //$NON-NLS-1$
+
+ public static final String ATT_CATALOG_DESCRIPTION = "description"; //$NON-NLS-1$
+
+ private static final String TYPE_LOCAL = "local"; //$NON-NLS-1$
+
+ private static final String TYPE_REMOTE = "remote"; //$NON-NLS-1$
+
+
+ public Collection<ArchetypeCatalogFactory> readArchetypeCatalogs(InputStream is) throws IOException {
+ Collection<ArchetypeCatalogFactory> catalogs = new ArrayList<ArchetypeCatalogFactory>();
+ try {
+ SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+ SAXParser parser = parserFactory.newSAXParser();
+ parser.parse(is, new ArchetypeCatalogsContentHandler(catalogs));
+ } catch(SAXException ex) {
+ String msg = Messages.ArchetypeCatalogsWriter_error_parse;
+ MavenLogger.log(msg, ex);
+ throw new IOException(NLS.bind(msg, ex.getMessage()));
+ } catch(ParserConfigurationException ex) {
+ String msg = Messages.ArchetypeCatalogsWriter_error_parse;
+ MavenLogger.log(msg, ex);
+ throw new IOException(NLS.bind(msg, ex.getMessage()));
+ }
+ return catalogs;
+ }
+
+ public void writeArchetypeCatalogs(final Collection<ArchetypeCatalogFactory> catalogs, OutputStream os) throws IOException {
+ try {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.transform(new SAXSource(new XMLArchetypeCatalogsWriter(catalogs), new InputSource()), new StreamResult(os));
+
+ } catch(TransformerFactoryConfigurationError ex) {
+ throw new IOException(NLS.bind(Messages.ArchetypeCatalogsWriter_error_write, ex.getMessage()));
+
+ } catch(TransformerException ex) {
+ throw new IOException(NLS.bind(Messages.ArchetypeCatalogsWriter_error_write, ex.getMessage()));
+
+ }
+ }
+
+ static class XMLArchetypeCatalogsWriter extends XMLFilterImpl {
+
+ private final Collection<ArchetypeCatalogFactory> catalogs;
+
+ public XMLArchetypeCatalogsWriter(Collection<ArchetypeCatalogFactory> catalogs) {
+ this.catalogs = catalogs;
+ }
+
+ public void parse(InputSource input) throws SAXException {
+ ContentHandler handler = getContentHandler();
+ handler.startDocument();
+ handler.startElement(null, ELEMENT_CATALOGS, ELEMENT_CATALOGS, new AttributesImpl());
+
+ for(ArchetypeCatalogFactory factory : this.catalogs) {
+ if(factory.isEditable()) {
+ if(factory instanceof LocalCatalogFactory) {
+ AttributesImpl attrs = new AttributesImpl();
+ attrs.addAttribute(null, ATT_CATALOG_TYPE, ATT_CATALOG_TYPE, null, TYPE_LOCAL);
+ attrs.addAttribute(null, ATT_CATALOG_LOCATION, ATT_CATALOG_LOCATION, null, factory.getId());
+ attrs.addAttribute(null, ATT_CATALOG_DESCRIPTION, ATT_CATALOG_DESCRIPTION, null, factory.getDescription());
+ handler.startElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG, attrs);
+ handler.endElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG);
+ } else if(factory instanceof RemoteCatalogFactory) {
+ AttributesImpl attrs = new AttributesImpl();
+ attrs.addAttribute(null, ATT_CATALOG_TYPE, ATT_CATALOG_TYPE, null, TYPE_REMOTE);
+ attrs.addAttribute(null, ATT_CATALOG_LOCATION, ATT_CATALOG_LOCATION, null, factory.getId());
+ attrs.addAttribute(null, ATT_CATALOG_DESCRIPTION, ATT_CATALOG_DESCRIPTION, null, factory.getDescription());
+ handler.startElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG, attrs);
+ handler.endElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG);
+ }
+ }
+ }
+
+ handler.endElement(null, ELEMENT_CATALOGS, ELEMENT_CATALOGS);
+ handler.endDocument();
+ }
+ }
+
+ static class ArchetypeCatalogsContentHandler extends DefaultHandler {
+
+ private Collection<ArchetypeCatalogFactory> catalogs;
+
+ public ArchetypeCatalogsContentHandler(Collection<ArchetypeCatalogFactory> catalogs) {
+ this.catalogs = catalogs;
+ }
+
+ public void startElement(String uri, String localName, String qName, Attributes attributes) {
+ if(ELEMENT_CATALOG.equals(qName) && attributes != null) {
+ String type = attributes.getValue(ATT_CATALOG_TYPE);
+ if(TYPE_LOCAL.equals(type)) {
+ String path = attributes.getValue(ATT_CATALOG_LOCATION);
+ if(path!=null) {
+ String description = attributes.getValue(ATT_CATALOG_DESCRIPTION);
+ catalogs.add(new LocalCatalogFactory(path, description, true));
+ }
+ } else if(TYPE_REMOTE.equals(type)) {
+ String url = attributes.getValue(ATT_CATALOG_LOCATION);
+ if(url!=null) {
+ String description = attributes.getValue(ATT_CATALOG_DESCRIPTION);
+ catalogs.add(new RemoteCatalogFactory(url, description, true));
+ }
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeManager.java
new file mode 100644
index 00000000..e447e2de
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/archetype/ArchetypeManager.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.archetype;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.codehaus.plexus.util.IOUtil;
+
+import org.apache.maven.archetype.catalog.Archetype;
+
+
+
+
+/**
+ * Archetype Manager
+ *
+ * @author Eugene Kuleshov
+ */
+public class ArchetypeManager {
+
+ private final Map<String, ArchetypeCatalogFactory> catalogs = new LinkedHashMap<String, ArchetypeCatalogFactory>();
+
+ private final File configFile;
+
+ private final ArchetypeCatalogsWriter writer;
+
+ public ArchetypeManager(File configFile) {
+ this.configFile = configFile;
+ this.writer = new ArchetypeCatalogsWriter();
+ }
+
+ /**
+ * @return Collection of ArchetypeCatalogFactory
+ */
+ public Collection<ArchetypeCatalogFactory> getArchetypeCatalogs() {
+ return new ArrayList<ArchetypeCatalogFactory>(catalogs.values());
+ }
+
+ public void addArchetypeCatalogFactory(ArchetypeCatalogFactory factory) {
+ if(factory != null) {
+ catalogs.put(factory.getId(), factory);
+ }
+ }
+
+ public void removeArchetypeCatalogFactory(String catalogId) {
+ catalogs.remove(catalogId);
+ }
+
+ public ArchetypeCatalogFactory getArchetypeCatalogFactory(String catalogId) {
+ return catalogs.get(catalogId);
+ }
+
+ public void readCatalogs() throws IOException {
+ if(configFile.exists()) {
+ InputStream is = null;
+ try {
+ is = new FileInputStream(configFile);
+ Collection<ArchetypeCatalogFactory> catalogs = writer.readArchetypeCatalogs(is);
+ for(Iterator<ArchetypeCatalogFactory> it = catalogs.iterator(); it.hasNext();) {
+ addArchetypeCatalogFactory(it.next());
+ }
+ } finally {
+ IOUtil.close(is);
+ }
+ }
+ }
+
+ public void saveCatalogs() throws IOException {
+ OutputStream os = null;
+ try {
+ os = new FileOutputStream(configFile);
+ writer.writeArchetypeCatalogs(getArchetypeCatalogs(), os);
+ } finally {
+ IOUtil.close(os);
+ }
+ }
+
+ /**
+ * @return the archetypeCatalogFactory containing the archetype parameter, null if none was found.
+ */
+ public <T extends ArchetypeCatalogFactory> T findParentCatalogFactory(Archetype a, Class<T> type) throws CoreException {
+ if (a!=null){
+ for (ArchetypeCatalogFactory factory : getArchetypeCatalogs()) {
+ if ((type.isAssignableFrom(factory.getClass()))
+ //temporary hack to get around https://issues.sonatype.org/browse/MNGECLIPSE-1792
+ //cf. MavenProjectWizardArchetypePage.getAllArchetypes
+ && !(factory.getDescription() != null && factory.getDescription().startsWith("Test")) //$NON-NLS-1$
+ && factory.getArchetypeCatalog().getArchetypes().contains(a)) {
+ return (T)factory;
+ }
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/AbstractEclipseBuildContext.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/AbstractEclipseBuildContext.java
new file mode 100644
index 00000000..df3a519d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/AbstractEclipseBuildContext.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.builder;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+
+/**
+ * AbstractEclipseBuildContext
+ *
+ * @author igor
+ */
+public abstract class AbstractEclipseBuildContext implements BuildContext {
+
+ public static class Message {
+ public final File file;
+
+ public final int line;
+
+ public final int column;
+
+ public final String message;
+
+ public final Throwable cause;
+
+ Message(File file, int line, int column, String message, Throwable cause) {
+ this.file = file;
+ this.line = line;
+ this.column = column;
+ this.message = message;
+ this.cause = cause;
+ }
+ }
+
+ private final Set<File> refresh = new HashSet<File>();
+
+ protected final Map<String, Object> context;
+
+ private final ArrayList<Message> errorMessages = new ArrayList<Message>();
+
+ private final ArrayList<Message> warningMessages = new ArrayList<Message>();
+
+ protected AbstractEclipseBuildContext(Map<String, Object> context) {
+ this.context = context;
+ }
+
+ public void refresh(File file) {
+ refresh.add(file);
+ }
+
+ public Set<File> getFiles() {
+ return refresh;
+ }
+
+ public OutputStream newFileOutputStream(File file) throws IOException {
+ return new ChangedFileOutputStream(file, this);
+ }
+
+ /**
+ * Returns path relative to delta resource location.
+ */
+ protected IPath getRelativePath(File file) {
+ IPath basepath = getBaseResource().getLocation();
+ IPath path = Path.fromOSString(file.getAbsolutePath());
+
+ if(!basepath.isPrefixOf(path)) {
+ return null;
+ }
+
+ return path.removeFirstSegments(basepath.segmentCount());
+ }
+
+ protected IResource getResource(File file) {
+ IPath relpath = getRelativePath(file);
+ if (relpath == null) {
+ return null;
+ }
+ IResource baseResource = getBaseResource();
+ if (baseResource instanceof IContainer) {
+ return ((IContainer) baseResource).findMember(relpath);
+ }
+ return null;
+ }
+
+ protected abstract IResource getBaseResource();
+
+ public void setValue(String key, Object value) {
+ context.put(key, value);
+ }
+
+ public Object getValue(String key) {
+ return context.get(key);
+ }
+
+ public void addError(File file, int line, int column, String message, Throwable cause) {
+ errorMessages.add(new Message(file, line, column, message, cause));
+ }
+
+ public void addWarning(File file, int line, int column, String message, Throwable cause) {
+ warningMessages.add(new Message(file, line, column, message, cause));
+ }
+
+ public List<Message> getErrorMessages() {
+ return errorMessages;
+ }
+
+ public List<Message> getWarningMessages() {
+ return warningMessages;
+ }
+
+ public boolean isUptodate(File target, File source) {
+ IResource targetResource = getResource(target);
+ IResource sourceResource = getResource(source);
+ return targetResource != null && targetResource.isAccessible() && !hasDelta(target)
+ && sourceResource != null && sourceResource.isAccessible() && !hasDelta(source)
+ && targetResource.getLocalTimeStamp() >= sourceResource.getLocalTimeStamp();
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ChangedFileOutputStream.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ChangedFileOutputStream.java
new file mode 100644
index 00000000..51aa0093
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ChangedFileOutputStream.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.builder;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Writes to the file only if content of the file is different.
+ *
+ * TODO. Current implementation defers actual writing to the output file until
+ * invocation of {@link #close()} method. This results in missed/ignored IOExceptions
+ * in some cases. First, {@link #flush()} method does not actually flush buffer to the disk.
+ * Second, any problems writing to the file will be reported as IOException
+ * thrown by {@link #close()}, which are generally ignored.
+ */
+public class ChangedFileOutputStream extends OutputStream {
+
+ private final File file;
+ private final BuildContext buildContext;
+ private final OutputStream os;
+
+ private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+
+ public ChangedFileOutputStream(File file) throws FileNotFoundException {
+ this(file, null);
+ }
+
+ public ChangedFileOutputStream(File file, BuildContext buildContext) throws FileNotFoundException {
+ this.file = file;
+ this.buildContext = buildContext;
+ this.os = new BufferedOutputStream(new FileOutputStream(file));
+ }
+
+ public void write(int b) {
+ buffer.write(b);
+ }
+
+ public void write(byte[] b, int off, int len) {
+ buffer.write(b, off, len);
+ }
+
+ public void close() throws IOException {
+ try {
+ writeIfNewOrChanged();
+ } finally {
+ os.close();
+ }
+ }
+
+ protected void writeIfNewOrChanged() throws IOException {
+ byte[] bytes = buffer.toByteArray();
+
+ boolean needToWrite = false;
+
+ // XXX harden
+ if (file.exists()) {
+ BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
+ try {
+ for (int i = 0; i < bytes.length; i++) {
+ if (bytes[i] != is.read()) {
+ needToWrite = true;
+ break;
+ }
+ }
+ } finally {
+ try {
+ is.close();
+ } catch (IOException e) {
+
+ }
+ }
+ } else {
+ // file does not exist
+ needToWrite = true;
+ }
+
+ if (needToWrite) {
+ if (buildContext != null) {
+ buildContext.refresh(file);
+ }
+
+ os.write(bytes);
+ }
+ }
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseBuildContext.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseBuildContext.java
new file mode 100644
index 00000000..c5161f7d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseBuildContext.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.builder;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+import org.codehaus.plexus.util.Scanner;
+
+import org.sonatype.plexus.build.incremental.EmptyScanner;
+
+import org.eclipse.m2e.core.internal.builder.ResourceScanner;
+
+/**
+ * EclipseBuildContext
+ *
+ * @author igor
+ */
+public class EclipseBuildContext extends AbstractEclipseBuildContext {
+
+ protected final IProject project;
+
+ public EclipseBuildContext(IProject project, Map<String, Object> context) {
+ super(context);
+ this.project = project;
+ }
+
+ public boolean hasDelta(String relpath) {
+ return true;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public boolean hasDelta(List relpath) {
+ return true;
+ }
+
+ public boolean hasDelta(File file) {
+ return true;
+ }
+
+ public Scanner newDeleteScanner(File basedir) {
+ return new EmptyScanner(basedir);
+ }
+
+ public Scanner newScanner(File basedir) {
+ IPath relpath = getRelativePath(basedir);
+ return new ResourceScanner(project.findMember(relpath));
+ }
+
+ public Scanner newScanner(File basedir, boolean ignoreDelta) {
+ return newScanner(basedir);
+ }
+
+ protected IProject getBaseResource() {
+ return project;
+ }
+
+ public boolean isIncremental() {
+ return false;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseIncrementalBuildContext.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseIncrementalBuildContext.java
new file mode 100644
index 00000000..e5f039fb
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/EclipseIncrementalBuildContext.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.builder;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.Scanner;
+
+import org.sonatype.plexus.build.incremental.EmptyScanner;
+
+public class EclipseIncrementalBuildContext extends AbstractEclipseBuildContext {
+
+ private final IResourceDelta delta;
+
+ public EclipseIncrementalBuildContext(IResourceDelta delta, Map<String, Object> context) {
+ super(context);
+ this.delta = delta;
+ }
+
+ public boolean hasDelta(String relPath) {
+ IPath path = new Path(relPath);
+ return hasDelta(path);
+ }
+
+ protected boolean hasDelta(IPath path) {
+ return delta == null || path == null || delta.findMember(path) != null;
+ }
+
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ public boolean hasDelta(List relPaths) {
+ for (String relPath : (List<String>) relPaths) {
+ if (hasDelta(relPath)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean hasDelta(File file) {
+ return hasDelta(getRelativePath(file));
+ }
+
+ public Scanner newDeleteScanner(File basedir) {
+ IResourceDelta reldelta = getDelta(basedir);
+
+ if (reldelta == null || !isRemove(reldelta)) {
+ return new EmptyScanner(basedir);
+ }
+
+ return new ResourceDeltaScanner(reldelta, true);
+ }
+
+ public Scanner newScanner(File basedir) {
+ return newScanner(basedir, false);
+ }
+
+ public Scanner newScanner(File basedir, boolean ignoreDelta) {
+ if (!ignoreDelta) {
+ IResourceDelta reldelta = getDelta(basedir);
+
+ if (reldelta == null || !isContentChange(reldelta)) {
+ return new EmptyScanner(basedir);
+ }
+
+ return new ResourceDeltaScanner(reldelta, false);
+ }
+
+ DirectoryScanner ds = new DirectoryScanner();
+ ds.setBasedir(basedir);
+ return ds;
+ }
+
+ private IResourceDelta getDelta(File file) {
+ IPath relpath = getRelativePath(file);
+ if (relpath == null) {
+ return null;
+ }
+ return delta.findMember(relpath);
+ }
+
+ static boolean isContentChange(IResourceDelta delta) {
+ int kind = delta.getKind();
+ if (IResourceDelta.ADDED == kind) {
+ return true;
+ }
+
+ if (IResourceDelta.CHANGED == kind) {
+ if (delta.getResource() instanceof IContainer) {
+ return true;
+ }
+
+ int flags = delta.getFlags();
+
+ return (flags & IResourceDelta.CONTENT) != 0;
+ }
+
+ return false;
+ }
+
+ static boolean isRemove(IResourceDelta delta) {
+ int kind = delta.getKind();
+
+ if (IResourceDelta.REMOVED == kind) {
+ return true;
+ }
+
+ if (IResourceDelta.CHANGED == kind && delta.getResource() instanceof IContainer) {
+ return true;
+ }
+
+ return false;
+ }
+
+
+ @Override
+ protected IResource getBaseResource() {
+ return delta.getResource();
+ }
+
+ public boolean isIncremental() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ResourceDeltaScanner.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ResourceDeltaScanner.java
new file mode 100644
index 00000000..092d419d
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/builder/ResourceDeltaScanner.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.builder;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.runtime.CoreException;
+
+import org.codehaus.plexus.util.AbstractScanner;
+
+public class ResourceDeltaScanner extends AbstractScanner {
+
+ protected final IResourceDelta delta;
+
+ protected final List<String> includedDirectories = new ArrayList<String>();
+
+ protected final List<String> includedFiles = new ArrayList<String>();
+
+ protected final boolean deleted;
+
+ public ResourceDeltaScanner(IResourceDelta delta, boolean deleted) {
+ this.delta = delta;
+ this.deleted = deleted;
+ }
+
+ public String[] getIncludedDirectories() {
+ return includedDirectories.toArray(new String[includedDirectories.size()]);
+ }
+
+ public String[] getIncludedFiles() {
+ return includedFiles.toArray(new String[includedFiles.size()]);
+ }
+
+ public void scan() {
+ try {
+ setupDefaultFilters();
+ scanDelta();
+ } catch(CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private void scanDelta() throws CoreException {
+ delta.accept(new IResourceDeltaVisitor() {
+
+ @SuppressWarnings("synthetic-access")
+ public boolean visit(IResourceDelta delta) {
+ String relpath = getRelativePath(delta);
+ if (isInteresting(delta) && isIncluded(relpath) && !isExcluded(relpath)) {
+ IResource resource = delta.getResource();
+ if (resource instanceof IContainer) {
+ includedDirectories.add(relpath);
+ } else {
+ includedFiles.add(relpath);
+ }
+ return true;
+ } else if (delta.getResource() instanceof IFolder) {
+ return couldHoldIncluded(relpath);
+ }
+
+ return false;
+ }
+
+ });
+ }
+
+ protected boolean isInteresting(IResourceDelta delta) {
+ return deleted? EclipseIncrementalBuildContext.isRemove(delta): EclipseIncrementalBuildContext.isContentChange(delta);
+ }
+
+ protected String getRelativePath(IResourceDelta delta) {
+ return delta.getFullPath().removeFirstSegments(this.delta.getFullPath().segmentCount()).toOSString();
+ }
+
+ public File getBasedir() {
+ return delta.getResource().getLocation().toFile();
+ }
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java
new file mode 100644
index 00000000..1d1a7b93
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConsoleListener.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.core;
+
+import java.util.EventListener;
+
+/**
+ * A console listener is notified of output to the Maven console.
+ *
+ * @author Benjamin Bentmann
+ */
+public interface IMavenConsoleListener extends EventListener {
+
+ void loggingMessage(String msg);
+
+ void loggingError(String msg);
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConstants.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConstants.java
new file mode 100644
index 00000000..fb9562d1
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/IMavenConstants.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+/**
+ * Maven Constants
+ *
+ * @author Eugene Kuleshov
+ */
+public interface IMavenConstants {
+
+ public static final String PLUGIN_ID = "org.eclipse.m2e.core"; //$NON-NLS-1$
+
+ public static final String NATURE_ID = PLUGIN_ID + ".maven2Nature"; //$NON-NLS-1$
+
+ public static final String BUILDER_ID = PLUGIN_ID + ".maven2Builder"; //$NON-NLS-1$
+
+ public static final String MARKER_ID = PLUGIN_ID + ".maven2Problem"; //$NON-NLS-1$
+
+ public static final String MARKER_POM_LOADING_ID = MARKER_ID + ".pomloading"; //$NON-NLS-1$
+
+ public static final String MARKER_CONFIGURATION_ID = MARKER_ID + ".configuration"; //$NON-NLS-1$
+
+ public static final String MARKER_DEPENDENCY_ID = MARKER_ID + ".dependency"; //$NON-NLS-1$
+
+ public static final String MARKER_BUILD_ID = MARKER_ID + ".build"; //$NON-NLS-1$
+
+ /**
+ * string that gets included in pom.xml file comments and makes the marker manager to ignore
+ * the managed version override marker
+ */
+ public static final String MARKER_IGNORE_MANAGED = "$NO-MVN-MAN-VER$";//$NON-NLS-1$
+
+ public static final String MAVEN_COMPONENT_CONTRIBUTORS_XPT = PLUGIN_ID + ".mavenComponentContributors"; //$NON-NLS-1$
+
+ public static final String POM_FILE_NAME = "pom.xml"; //$NON-NLS-1$
+
+ public static final String PREFERENCE_PAGE_ID = PLUGIN_ID + ".MavenProjectPreferencePage"; //$NON-NLS-1$
+
+ public static final String NO_WORKSPACE_PROJECTS = "noworkspace"; //$NON-NLS-1$
+
+ public static final String ACTIVE_PROFILES = "profiles"; //$NON-NLS-1$
+
+ public static final String FILTER_RESOURCES = "filterresources"; //$NON-NLS-1$
+
+ public static final String JAVADOC_CLASSIFIER = "javadoc"; //$NON-NLS-1$
+
+ public static final String SOURCES_CLASSIFIER = "sources"; //$NON-NLS-1$
+
+
+ /**
+ * Session property key used to indicate that full maven build was requested for a project.
+ * It is not intended to be used by clients directly.
+ */
+ public static final QualifiedName FULL_MAVEN_BUILD = new QualifiedName(PLUGIN_ID, "fullBuild"); //$NON-NLS-1$
+
+ /**
+ * The name of the folder containing metadata information for the workspace.
+ */
+ public static final String METADATA_FOLDER = ".metadata"; //$NON-NLS-1$
+
+ public static final String INDEX_UPDATE_PROP = "indexUpdate"; //$NON-NLS-1$
+
+ public static final String MARKER_ATTR_EDITOR_HINT = "editor_hint";
+
+ public static final String EDITOR_HINT_PARENT_GROUP_ID = "parent_groupid";
+
+ public static final String EDITOR_HINT_PARENT_VERSION = "parent_version";
+
+ public static final String EDITOR_HINT_MANAGED_DEPENDENCY_OVERRIDE = "managed_dependency_override";
+
+ public static final String EDITOR_HINT_MANAGED_PLUGIN_OVERRIDE = "managed_plugin_override";
+
+ public static final String EDITOR_HINT_MISSING_SCHEMA = "missing_schema";
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java
new file mode 100644
index 00000000..a6196d0f
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenConsole.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.core;
+
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleListener;
+
+/**
+ * Maven Console
+ *
+ * @author Eugene Kuleshov
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface MavenConsole extends IConsole {
+
+ void logMessage(String msg);
+
+ void logError(String msg);
+
+ IConsoleListener newLifecycle();
+
+ void shutdown();
+
+ void showConsole();
+
+ void closeConsole();
+
+ void addMavenConsoleListener(IMavenConsoleListener listener);
+
+ void removeMavenConsoleListener(IMavenConsoleListener listener);
+
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenLogger.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenLogger.java
new file mode 100644
index 00000000..2cef32db
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/core/MavenLogger.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2008-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.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+
+/**
+ * Maven Logger
+ *
+ * @author Eugene Kuleshov
+ */
+public class MavenLogger {
+
+ private static ILog LOG;
+
+ public static void setLog(ILog log) {
+ LOG = log;
+ }
+
+ public static void log(IStatus status) {
+ LOG.log(status);
+ }
+
+ public static void log(CoreException ex) {
+ IStatus s = ex.getStatus();
+ if(s.getException() == null) {
+ int n = s.getSeverity();
+ log(new Status(n == IStatus.CANCEL || n == IStatus.ERROR || n == IStatus.INFO //
+ || n == IStatus.WARNING || n == IStatus.OK ? n : IStatus.ERROR, //
+ s.getPlugin() == null ? IMavenConstants.PLUGIN_ID : s.getPlugin(), //
+ s.getCode(), //
+ s.getMessage() == null ? s.toString() : s.getMessage(), //
+ ex));
+ } else {
+ log(s);
+ }
+ }
+
+ public static void log(String msg, Throwable t) {
+ log(new Status