diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/.project b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/.project
deleted file mode 100644
index 53c59d1be1..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
- org.eclipse.m2e.maven.indexer
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.m2e.core.maven2Nature
- org.eclipse.pde.PluginNature
-
-
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/build.properties b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/build.properties
deleted file mode 100644
index c5172d108a..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/main/java/,\
- src/main/resources/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- jars/
-bin.excludes = jars/sources/
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
deleted file mode 100644
index c2ae63b370..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.eclipse.m2e
- m2e-maven-runtime
- 1.16.0-SNAPSHOT
-
-
- org.eclipse.m2e.maven.indexer
- 1.18.2-SNAPSHOT
- eclipse-plugin
-
- M2E Maven/Nexus Indexer
-
-
- 6.0.0
-
-
-
-
- org.apache.maven.indexer
- indexer-core
- ${maven-indexer.version}
-
-
-
- org.apache.maven
- maven-model
-
-
- org.apache.maven.resolver
- maven-resolver-api
-
-
- org.apache.maven.resolver
- maven-resolver-util
-
-
- com.google.inject
- guice
-
-
- com.google.guava
- guava
-
-
- org.slf4j
- slf4j-api
-
-
- javax.inject
- javax.inject
-
-
- javax.annotation
- javax.annotation-api
-
-
-
-
-
-
-
-
-
- org.eclipse.sisu
- sisu-maven-plugin
- 0.3.5
-
-
-
- index-project
- prepare-package
-
- index
-
-
- ${project.basedir}
-
-
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
-
-
- <_exportcontents>
- META-INF.sisu;-noimport:=true;x-internal:=true,
- org.apache.lucene.*;provider=m2e;mandatory:=provider,
- org.apache.maven.*;provider=m2e;mandatory:=provider,
-
-
- org.slf4j;resolution:=optional;version="[1.6.2,2.0.0)",
- javax.inject;version="1.0.0"
-
-
- org.eclipse.m2e.maven.runtime;bundle-version="[1.18.0,1.19.0)",
- org.eclipse.m2e.archetype.common;bundle-version="[1.18.0,1.19.0)",
- com.google.guava
-
-
-
-
-
-
-
-
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java
deleted file mode 100644
index c0d4c0e5f3..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.index;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.StringField;
-import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.search.TopDocs;
-import org.apache.maven.index.context.IndexingContext;
-import org.apache.maven.index.creator.MinimalArtifactInfoIndexCreator;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-
-/**
- * A default {@link IndexerEngine} implementation.
- *
- * @author Tamas Cservenak
- */
-@Singleton
-@Named
-public class DefaultIndexerEngine
- extends AbstractLogEnabled
- implements IndexerEngine
-{
-
- public void index( IndexingContext context, ArtifactContext ac )
- throws IOException
- {
- // skip artifacts not obeying repository layout (whether m1 or m2)
- if ( ac != null && ac.getGav() != null )
- {
- Document d = ac.createDocument( context );
-
- if ( d != null )
- {
- context.getIndexWriter().addDocument( d );
-
- context.updateTimestamp();
- }
- }
- }
-
- public void update( IndexingContext context, ArtifactContext ac )
- throws IOException
- {
- if ( ac != null && ac.getGav() != null )
- {
- Document d = ac.createDocument( context );
-
- if ( d != null )
- {
- Document old = getOldDocument( context, ac );
-
- if ( !equals( d, old ) )
- {
- IndexWriter w = context.getIndexWriter();
-
- w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d );
-
- updateGroups( context, ac );
-
- context.updateTimestamp();
- }
- }
- }
- }
-
- private boolean equals( Document d1, Document d2 )
- {
- if ( d1 == null && d2 == null )
- {
- return true;
- }
- if ( d1 == null || d2 == null )
- {
- return false;
- }
-
- Map m1 = toMap( d1 );
- Map m2 = toMap( d2 );
-
- m1.remove( MinimalArtifactInfoIndexCreator.FLD_LAST_MODIFIED.getKey() );
- m2.remove( MinimalArtifactInfoIndexCreator.FLD_LAST_MODIFIED.getKey() );
-
- return m1.equals( m2 );
- }
-
- private Map toMap( Document d )
- {
- final HashMap result = new HashMap<>();
-
- for ( IndexableField f : d.getFields() )
- {
- if ( f.fieldType().stored() )
- {
- result.put( f.name(), f.stringValue() );
- }
- }
-
- return result;
- }
-
- private Document getOldDocument( IndexingContext context, ArtifactContext ac )
- {
- try
- {
- IndexSearcher indexSearcher = context.acquireIndexSearcher();
- try
- {
- TopDocs result = indexSearcher
- .search(new TermQuery(new Term(ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo())), 2);
-
- if ( result.totalHits == 1 )
- {
- return indexSearcher.doc( result.scoreDocs[0].doc );
- }
- }
- finally
- {
- context.releaseIndexSearcher( indexSearcher );
- }
- }
- catch ( IOException e )
- {
- }
- return null;
- }
-
- private void updateGroups( IndexingContext context, ArtifactContext ac )
- throws IOException
- {
- String rootGroup = ac.getArtifactInfo().getRootGroup();
- Set rootGroups = context.getRootGroups();
- if ( !rootGroups.contains( rootGroup ) )
- {
- rootGroups.add( rootGroup );
- context.setRootGroups( rootGroups );
- }
-
- Set allGroups = context.getAllGroups();
- if ( !allGroups.contains( ac.getArtifactInfo().getGroupId() ) )
- {
- allGroups.add( ac.getArtifactInfo().getGroupId() );
- context.setAllGroups( allGroups );
- }
- }
-
- public void remove( IndexingContext context, ArtifactContext ac )
- throws IOException
- {
- if ( ac != null )
- {
- String uinfo = ac.getArtifactInfo().getUinfo();
- // add artifact deletion marker
- Document doc = new Document();
- doc.add( new StringField( ArtifactInfo.DELETED, uinfo, Field.Store.YES ) );
- doc.add( new StringField( ArtifactInfo.LAST_MODIFIED, //
- Long.toString( System.currentTimeMillis() ), Field.Store.YES ) );
- IndexWriter w = context.getIndexWriter();
- w.addDocument( doc );
- w.deleteDocuments( new Term( ArtifactInfo.UINFO, uinfo ) );
- w.commit();
- context.updateTimestamp();
- }
- }
-
-}
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/NexusArchetypeDataSource.java b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/NexusArchetypeDataSource.java
deleted file mode 100644
index afa58caf05..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/NexusArchetypeDataSource.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *******************************************************************************/
-
-package org.apache.maven.index;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.apache.maven.archetype.source.ArchetypeDataSource;
-import org.apache.maven.index.archetype.AbstractArchetypeDataSource;
-import org.apache.maven.index.context.IndexingContext;
-
-/**
- * Trivial implementation of a Nexus indexer-based data source for archetypes.
- *
- * The maven-indexer used to ship such a class, but it is now an abstract helper
- * class that consumers have to extend themselves in order to implement
- * maven-archetype's {@link ArchetypeDataSource} interface. This allows
- * maven-indexer to avoid having a hard dep on maven-archetype at the cost of us
- * having to provide our own concrete implementation.
- */
-@Singleton
-@Named("nexus")
-public class NexusArchetypeDataSource extends AbstractArchetypeDataSource implements ArchetypeDataSource {
-
- private final NexusIndexer nexusIndexer;
-
- @Inject
- public NexusArchetypeDataSource(Indexer indexer, NexusIndexer nexusIndexer) {
- super(indexer);
- this.nexusIndexer = nexusIndexer;
- }
-
- @Override
- protected List getIndexingContexts() {
- return new ArrayList<>(nexusIndexer.getIndexingContexts().values());
- }
-}
\ No newline at end of file
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about.html b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about.html
deleted file mode 100644
index 340da6e557..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-About
-
-
-
About This Content
-
-
November 30, 2017
-
License
-
-
- The Eclipse Foundation makes available all content in this plug-in
- ("Content"). Unless otherwise indicated below, the Content
- is provided to you under the terms and conditions of the Eclipse
- Public License Version 2.0 ("EPL"). A copy of the EPL is
- available at http://www.eclipse.org/legal/epl-2.0.
- For purposes of the EPL, "Program" will mean the Content.
-
-
-
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") 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 http://www.eclipse.org.
-
-
-
Third Party Content
-
-
-The Content includes items that have been sourced from third parties as set out below. If you
-did not receive this Content directly from the Eclipse Foundation, the following is provided
-for informational purposes only, and you should look to the Redistributor’s license for
-terms and conditions of use.
-
-
-
Maven Indexer 3.1.0
-
-The plug-in includes software developed by The Apache Software Foundation as part of the Maven project.
-Your use of Maven Indexer 3.1.0 in binary code form contained in the plug-in is subject to the terms and conditions of the
-The Apache Software License, Version 2.0 ("ASL").
-A copy of the ASL is available at http://maven.apache.org/license.html.
-(a local copy can be found here)
-
-The plug-in includes software developed by The Apache Software Foundation as part of the Lucene project.
-Your use of Lucene 2.4.1 in binary code form contained in the plug-in is subject to the terms and conditions of the
-The Apache Software License, Version 2.0 ("ASL").
-A copy of the ASL is available at http://www.apache.org/licenses/LICENSE-2.0.
-(a local copy can be found here)
-
-
-
-
-
\ No newline at end of file
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about_files/LICENSE-2.0.txt b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about_files/LICENSE-2.0.txt
deleted file mode 100644
index d645695673..0000000000
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/resources/about_files/LICENSE-2.0.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/m2e-maven-runtime/pom.xml b/m2e-maven-runtime/pom.xml
index b0cff0d22c..fdc4815081 100644
--- a/m2e-maven-runtime/pom.xml
+++ b/m2e-maven-runtime/pom.xml
@@ -31,7 +31,6 @@
org.eclipse.m2e.archetype.common
- org.eclipse.m2e.maven.indexerorg.eclipse.m2e.maven.runtimeorg.eclipse.m2e.maven.runtime.slf4j.simple
diff --git a/org.eclipse.m2e.apt.tests/META-INF/MANIFEST.MF b/org.eclipse.m2e.apt.tests/META-INF/MANIFEST.MF
index f7a91c620a..883785a280 100644
--- a/org.eclipse.m2e.apt.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.apt.tests/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.m2e.tests.common;bundle-version="[1.0.0,2.0)",
org.junit;bundle-version="3.8.2",
org.eclipse.jdt.core;bundle-version="3.7.0",
org.eclipse.jdt.apt.core;bundle-version="3.3.500",
- org.eclipse.m2e.core;bundle-version="[1.0.0,2.0)",
+ org.eclipse.m2e.core,
org.eclipse.core.resources;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.m2e.apt.core,
diff --git a/org.eclipse.m2e.binaryproject.tests/META-INF/MANIFEST.MF b/org.eclipse.m2e.binaryproject.tests/META-INF/MANIFEST.MF
index ebbdead3bf..424e035728 100644
--- a/org.eclipse.m2e.binaryproject.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.binaryproject.tests/META-INF/MANIFEST.MF
@@ -4,14 +4,14 @@ Bundle-Name: M2E Binary Project Core Tests
Bundle-SymbolicName: org.eclipse.m2e.binaryproject.tests;singleton:=true
Bundle-Version: 1.16.0.qualifier
Bundle-Vendor: Eclipse.org - m2e
-Require-Bundle: org.eclipse.m2e.core;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.maven.runtime;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.binaryproject;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.tests.common;bundle-version="[1.16.0,2.0.0)",
+Require-Bundle: org.eclipse.m2e.core;bundle-version="1.16.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="1.16.0",
+ org.eclipse.m2e.binaryproject;bundle-version="1.16.0",
+ org.eclipse.m2e.tests.common;bundle-version="1.16.0",
org.junit;bundle-version="4.0.0",
org.eclipse.equinox.common;bundle-version="3.6.100",
org.eclipse.core.resources;bundle-version="3.8.0",
- org.eclipse.m2e.jdt;bundle-version="[1.16.0,2.0.0)",
+ org.eclipse.m2e.jdt;bundle-version="1.16.0",
org.eclipse.jdt.core;bundle-version="3.8.1",
org.eclipse.core.runtime;bundle-version="3.8.0"
Import-Package: org.slf4j;version="[1.6.2,2.0.0)"
diff --git a/org.eclipse.m2e.binaryproject.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.binaryproject.ui/META-INF/MANIFEST.MF
index b937b3ada4..4f2966e547 100644
--- a/org.eclipse.m2e.binaryproject.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.binaryproject.ui/META-INF/MANIFEST.MF
@@ -1,17 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.m2e.binaryproject.ui;singleton:=true
-Bundle-Version: 1.18.1.qualifier
+Bundle-Version: 1.18.2.qualifier
Bundle-Activator: org.eclipse.m2e.binaryproject.ui.internal.BinaryprojectUIActivator
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Name: %Bundle-Name
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.m2e.core.ui;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.binaryproject;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.core;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.maven.runtime;bundle-version="[1.16.0,2.0.0)"
+ org.eclipse.m2e.core.ui;bundle-version="1.16.0",
+ org.eclipse.m2e.binaryproject;bundle-version="1.16.0",
+ org.eclipse.m2e.core;bundle-version="1.16.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="1.16.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.m2e.binaryproject.ui
diff --git a/org.eclipse.m2e.binaryproject/META-INF/MANIFEST.MF b/org.eclipse.m2e.binaryproject/META-INF/MANIFEST.MF
index 984534d6f2..d22966c741 100644
--- a/org.eclipse.m2e.binaryproject/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.binaryproject/META-INF/MANIFEST.MF
@@ -1,13 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.m2e.binaryproject;singleton:=true
-Bundle-Version: 1.17.4.qualifier
+Bundle-Version: 1.17.5.qualifier
Bundle-Vendor: Eclipse.org - m2e
Bundle-Name: M2E Binary Project Core
-Require-Bundle: org.eclipse.m2e.core;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.maven.runtime;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.sourcelookup;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.jdt;bundle-version="[1.16.0,2.0.0)",
+Require-Bundle: org.eclipse.m2e.core;bundle-version="1.16.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="1.16.0",
+ org.eclipse.m2e.sourcelookup;bundle-version="1.16.0",
+ org.eclipse.m2e.jdt;bundle-version="1.16.0",
org.eclipse.equinox.common;bundle-version="3.6.0",
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.jdt.core;bundle-version="3.7.0",
diff --git a/org.eclipse.m2e.core.tests/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.tests/META-INF/MANIFEST.MF
index e91700b0be..d66af2c947 100644
--- a/org.eclipse.m2e.core.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core.tests/META-INF/MANIFEST.MF
@@ -1,12 +1,12 @@
Manifest-Version: 1.0
-Fragment-Host: org.eclipse.m2e.core;bundle-version="[1.16.0,2.0.0)"
+Fragment-Host: org.eclipse.m2e.core;bundle-version="1.16.0"
Bundle-ManifestVersion: 2
Bundle-Name: M2E Maven Integration for Eclipse Core Tests
Bundle-SymbolicName: org.eclipse.m2e.core.tests
Bundle-Version: 1.16.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Eclipse.org - m2e
-Require-Bundle: org.eclipse.m2e.tests.common;bundle-version="[1.16.0,2.0.0)",
+Require-Bundle: org.eclipse.m2e.tests.common;bundle-version="1.16.0",
org.junit;bundle-version="4.12.0",
org.eclipse.core.resources,
org.eclipse.core.runtime,
diff --git a/org.eclipse.m2e.core.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui.tests/META-INF/MANIFEST.MF
index f96343ace5..be9a3466c4 100644
--- a/org.eclipse.m2e.core.ui.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core.ui.tests/META-INF/MANIFEST.MF
@@ -1,12 +1,12 @@
Manifest-Version: 1.0
-Fragment-Host: org.eclipse.m2e.core.ui;bundle-version="[1.16.0,2.0.0)"
+Fragment-Host: org.eclipse.m2e.core.ui;bundle-version="1.16.0"
Bundle-ManifestVersion: 2
Bundle-Name: M2E Maven Integration for Eclipse UI Tests
Bundle-SymbolicName: org.eclipse.m2e.core.ui.tests
Bundle-Version: 1.19.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Eclipse.org - m2e
-Require-Bundle: org.eclipse.m2e.tests.common;bundle-version="[1.16.0,2.0.0)",
+Require-Bundle: org.eclipse.m2e.tests.common;bundle-version="1.16.0",
org.junit;bundle-version="4.12.0",
org.eclipse.core.runtime,
org.eclipse.m2e.launching;bundle-version="1.17.2",
diff --git a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
index 1839d2c172..da50c21713 100644
--- a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.m2e.core.ui;singleton:=true
-Bundle-Version: 1.19.0.qualifier
+Bundle-Version: 1.20.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
@@ -22,13 +22,12 @@ Export-Package: org.eclipse.m2e.core.ui.internal;x-internal:=true,
org.eclipse.m2e.core.ui.internal.wizards;x-friends:="org.eclipse.m2e.editor"
Bundle-Activator: org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.m2e.core;bundle-version="[1.16.0,2.0.0)",
+Require-Bundle: org.eclipse.m2e.core;bundle-version="1.16.0",
org.eclipse.core.resources;bundle-version="3.5.2",
org.eclipse.core.runtime;bundle-version="3.5.0",
- org.eclipse.m2e.model.edit;bundle-version="[1.16.0,2.0.0)";visibility:=reexport,
- org.eclipse.m2e.maven.runtime;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.archetype.common;bundle-version="[1.16.0,2.0.0)",
- org.eclipse.m2e.maven.indexer;bundle-version="[1.17.1,2.0.0)",
+ org.eclipse.m2e.model.edit;bundle-version="1.16.0";visibility:=reexport,
+ org.eclipse.m2e.maven.runtime;bundle-version="1.16.0",
+ org.eclipse.m2e.archetype.common;bundle-version="1.16.0",
org.eclipse.ui.console;bundle-version="3.4.0",
org.eclipse.ui.ide;bundle-version="3.5.2",
org.eclipse.core.filesystem;bundle-version="1.2.1",
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
index 45c298c318..790b49348c 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
@@ -21,7 +21,6 @@
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.preferences.InstanceScope;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -31,13 +30,10 @@
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.core.internal.index.filter.FilteredIndex;
import org.eclipse.m2e.core.internal.lifecyclemapping.discovery.IMavenDiscovery;
import org.eclipse.m2e.core.ui.internal.console.MavenConsoleImpl;
import org.eclipse.m2e.core.ui.internal.project.MavenUpdateConfigurationChangeListener;
-import org.eclipse.m2e.core.ui.internal.search.util.IndexSearchEngine;
import org.eclipse.m2e.core.ui.internal.search.util.SearchEngine;
import org.eclipse.m2e.core.ui.internal.wizards.IMavenDiscoveryUI;
@@ -127,8 +123,8 @@ public boolean hasMavenConsoleImpl() {
return console != null;
}
- public SearchEngine getSearchEngine(IProject project) throws CoreException {
- return new IndexSearchEngine(new FilteredIndex(project, MavenPlugin.getIndexManager().getIndex(project)));
+ public SearchEngine getSearchEngine(IProject project) {
+ return null; // used to be only Index based search, need to hook other engines
}
public synchronized IMavenDiscovery getMavenDiscovery() {
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java
index 4b5140c55c..c328887fe7 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java
@@ -435,8 +435,6 @@ public class Messages extends NLS {
public static String MavenProjectWizardArchetypePage_btnSnapshots;
- public static String MavenProjectWizardArchetypePage_error_emptyNexusIndexer;
-
public static String MavenProjectWizardArchetypePage_error_emptyCatalog;
public static String MavenProjectWizardArchetypePage_error_noEnabledCatalogs;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties
index 369aca11d4..e71a4f2db0 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties
@@ -248,7 +248,6 @@ MavenProjectWizardArchetypePage_btnAdd=&Add Archetype...
MavenProjectWizardArchetypePage_btnConfigure=&Configure...
MavenProjectWizardArchetypePage_btnLast=&Show the last version of Archetype only
MavenProjectWizardArchetypePage_btnSnapshots=&Include snapshot archetypes
-MavenProjectWizardArchetypePage_error_emptyNexusIndexer=No archetypes currently available. The archetype list will refresh when the indexes finish updating.
MavenProjectWizardArchetypePage_error_emptyCatalog=No archetypes available for this catalog.
MavenProjectWizardArchetypePage_error_noEnabledCatalogs=There are no enabled archetype catalogs. Click the 'Configure...' button.
MavenProjectWizardArchetypePage_error_read=Unable to read catalog factory.
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
index 4078f6b258..f28d57856f 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
@@ -23,7 +23,6 @@
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -66,7 +65,6 @@
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.internal.index.IndexManager;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.m2e.core.ui.internal.Messages;
@@ -151,10 +149,6 @@ protected IStatus run(IProgressMonitor monitor) {
mavenConfiguration.setUserSettingsFile(userSettings);
File newRepositoryDir = new File(maven.getLocalRepository().getBasedir());
- if(!newRepositoryDir.equals(localRepositoryDir)) {
- IndexManager indexManager = MavenPlugin.getIndexManager();
- indexManager.getWorkspaceIndex().updateIndex(true, monitor);
- }
if(updateProjects[0]) {
IMavenProjectFacade[] projects = MavenPlugin.getMavenProjectRegistry().getProjects();
ArrayList allProjects = new ArrayList<>();
@@ -257,19 +251,6 @@ protected Control createContents(Composite parent) {
localRepositoryText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
localRepositoryText.setData("name", "localRepositoryText"); //$NON-NLS-1$ //$NON-NLS-2$
localRepositoryText.setEditable(false);
- Button reindexButton = new Button(composite, SWT.NONE);
- reindexButton.setLayoutData(new GridData(SWT.FILL, SWT.RIGHT, false, false, 1, 1));
- reindexButton.setText(Messages.preferencesReindexButton);
- reindexButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
- new WorkspaceJob(Messages.MavenSettingsPreferencePage_job_indexing) {
- @Override
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- IndexManager indexManager = MavenPlugin.getIndexManager();
- indexManager.getWorkspaceIndex().updateIndex(true, monitor);
- return Status.OK_STATUS;
- }
- }.schedule();
- }));
ModifyListener settingsModifyListener = modifyevent -> {
updateLocalRepository();
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java
deleted file mode 100644
index 23f1388cc8..0000000000
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/search/util/IndexSearchEngine.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.core.ui.internal.search.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.apache.maven.artifact.versioning.ComparableVersion;
-
-import org.eclipse.m2e.core.internal.index.IIndex;
-import org.eclipse.m2e.core.internal.index.IndexManager;
-import org.eclipse.m2e.core.internal.index.IndexedArtifact;
-import org.eclipse.m2e.core.internal.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.internal.index.MatchTyped.MatchType;
-import org.eclipse.m2e.core.internal.index.MatchTypedStringSearchExpression;
-import org.eclipse.m2e.core.internal.index.SearchExpression;
-
-
-/**
- * Search engine integrating {@link IndexManager} with POM XML editor.
- *
- * @author Lukas Krecan
- * @author Eugene Kuleshov
- */
-public class IndexSearchEngine implements SearchEngine {
-
- private final IIndex index;
-
- public IndexSearchEngine(IIndex index) {
- this.index = index;
- }
-
- protected boolean isBlank(String str) {
- return str == null || str.trim().length() == 0;
- }
-
- @Override
- public Collection findArtifactIds(String groupId, String searchExpression, Packaging packaging,
- ArtifactInfo containingArtifact) {
- // TODO add support for implicit groupIds in plugin dependencies "org.apache.maven.plugins", ...
- // Someone, give me here access to settings.xml, to be able to pick up "real" predefined groupIds added by user
- // Currently, I am just simulating the "factory defaults" of maven, but user changes to settings.xml
- // will not be picked up this way!
- ArrayList groupIdSearchExpressions = new ArrayList<>();
- if(isBlank(groupId)) {
- // values from effective settings
- // we are wiring in the defaults only, but user changes are lost!
- // org.apache.maven.plugins
- // org.codehaus.mojo
- groupIdSearchExpressions.add(new MatchTypedStringSearchExpression("org.apache.maven.plugins", MatchType.EXACT));
- groupIdSearchExpressions.add(new MatchTypedStringSearchExpression("org.codehaus.mojo", MatchType.EXACT));
- } else {
- groupIdSearchExpressions.add(new MatchTypedStringSearchExpression(groupId, MatchType.EXACT));
- }
-
- try {
- TreeSet ids = new TreeSet<>();
- for(IndexedArtifact artifact : index.find(groupIdSearchExpressions, null, null,
- packaging.toSearchExpression() == null ? null : Collections.singleton(packaging.toSearchExpression()))) {
- ids.add(artifact.getArtifactId());
- }
- return subSet(ids, searchExpression);
- } catch(CoreException ex) {
- throw new SearchException(ex.getMessage(), ex.getStatus().getException());
- }
- }
-
- @Override
- public Collection findClassifiers(String groupId, String artifactId, String version, String prefix,
- Packaging packaging) {
- try {
- Collection values = index.find(new MatchTypedStringSearchExpression(groupId, MatchType.EXACT),
- new MatchTypedStringSearchExpression(artifactId, MatchType.EXACT), null, packaging.toSearchExpression());
- if(values.isEmpty()) {
- return Collections.emptySet();
- }
-
- TreeSet ids = new TreeSet<>();
- Set files = values.iterator().next().getFiles();
- for(IndexedArtifactFile artifactFile : files) {
- if(artifactFile.classifier != null) {
- ids.add(artifactFile.classifier);
- }
- }
- return subSet(ids, prefix);
- } catch(CoreException ex) {
- throw new SearchException(ex.getMessage(), ex.getStatus().getException());
- }
- }
-
- @Override
- public Collection findGroupIds(String searchExpression, Packaging packaging, ArtifactInfo containingArtifact) {
- try {
- TreeSet ids = new TreeSet<>();
-
- SearchExpression groupSearchExpression = isBlank(searchExpression) ? null : new MatchTypedStringSearchExpression(
- searchExpression, MatchType.PARTIAL);
-
- for(IndexedArtifact artifact : index.find(groupSearchExpression, null, null, packaging.toSearchExpression())) {
- ids.add(artifact.getGroupId());
- }
- return subSet(ids, searchExpression);
- } catch(CoreException ex) {
- throw new SearchException(ex.getMessage(), ex.getStatus().getException());
- }
- }
-
- @Override
- public Collection findTypes(String groupId, String artifactId, String version, String prefix,
- Packaging packaging) {
- try {
- Collection values = index.find(new MatchTypedStringSearchExpression(groupId, MatchType.EXACT),
- new MatchTypedStringSearchExpression(artifactId, MatchType.EXACT), null, packaging.toSearchExpression());
- if(values.isEmpty()) {
- return Collections.emptySet();
- }
-
- TreeSet ids = new TreeSet<>();
- Set files = values.iterator().next().getFiles();
- for(IndexedArtifactFile artifactFile : files) {
- if(artifactFile.type != null) {
- ids.add(artifactFile.type);
- }
- }
- return subSet(ids, prefix);
- } catch(CoreException ex) {
- throw new SearchException(ex.getMessage(), ex.getStatus().getException());
- }
- }
-
- @Override
- public Collection findVersions(String groupId, String artifactId, String searchExpression, Packaging packaging) {
- try {
- Collection values = index.find(new MatchTypedStringSearchExpression(groupId, MatchType.EXACT),
- new MatchTypedStringSearchExpression(artifactId, MatchType.EXACT), null, packaging.toSearchExpression());
- if(values.isEmpty()) {
- return Collections.emptySet();
- }
-
- TreeSet ids = new TreeSet<>();
- Set files = values.iterator().next().getFiles();
- for(IndexedArtifactFile artifactFile : files) {
- ids.add(artifactFile.version);
- }
- Collection result = subSet(ids, searchExpression);
-
- // sort results according to o.a.m.artifact.versioning.ComparableVersion
- SortedSet versions = new TreeSet<>();
- for(String version : result) {
- versions.add(new ComparableVersion(version));
- }
- result = null; // not used any more
- List sorted = new ArrayList<>(versions.size());
- for(ComparableVersion version : versions) {
- sorted.add(version.toString());
- }
- versions = null; // not used any more
- Collections.reverse(sorted);
- return sorted;
- } catch(CoreException ex) {
- throw new SearchException(ex.getMessage(), ex.getStatus().getException());
- }
- }
-
- private Collection subSet(TreeSet ids, String searchExpression) {
- if(searchExpression == null || searchExpression.length() == 0) {
- return ids;
- }
- int n = searchExpression.length();
- return ids.subSet(searchExpression, //
- searchExpression.substring(0, n - 1) + ((char) (searchExpression.charAt(n - 1) + 1)));
- }
-
-}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
index 01936a566d..b0f076ab93 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
@@ -34,8 +34,6 @@
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.apache.lucene.queryparser.classic.QueryParserBase;
-
import org.apache.maven.project.MavenProject;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
@@ -132,9 +130,7 @@ public static void addClassifierProposal(final IProject project, final Text grou
@Override
public Collection search() throws CoreException {
return getSearchEngine(project).findClassifiers(
- escapeQuerySpecialCharacters(groupIdText.getText()), //
- escapeQuerySpecialCharacters(artifactIdText.getText()),
- escapeQuerySpecialCharacters(versionText.getText()), "", packaging);
+ groupIdText.getText(), artifactIdText.getText(), versionText.getText(), "", packaging);
}
});
}
@@ -145,8 +141,8 @@ public static void addVersionProposal(final IProject project, final MavenProject
@Override
public Collection search() throws CoreException {
Collection toRet = new ArrayList<>();
- toRet.addAll(getSearchEngine(project).findVersions(escapeQuerySpecialCharacters(groupIdText.getText()), //
- escapeQuerySpecialCharacters(artifactIdText.getText()), "", packaging));
+ toRet.addAll(getSearchEngine(project).findVersions(groupIdText.getText(), //
+ artifactIdText.getText(), "", packaging));
if(mp != null) {
//add version props now..
Properties props = mp.getProperties();
@@ -173,7 +169,7 @@ public static void addArtifactIdProposal(final IProject project, final Text grou
@Override
public Collection search() throws CoreException {
// TODO handle artifact info
- return getSearchEngine(project).findArtifactIds(escapeQuerySpecialCharacters(groupIdText.getText()), "",
+ return getSearchEngine(project).findArtifactIds(groupIdText.getText(), "",
packaging, null);
}
});
@@ -184,20 +180,12 @@ public static void addGroupIdProposal(final IProject project, final Text groupId
@Override
public Collection search() throws CoreException {
// TODO handle artifact info
- return getSearchEngine(project).findGroupIds(escapeQuerySpecialCharacters(groupIdText.getText()), packaging,
+ return getSearchEngine(project).findGroupIds(groupIdText.getText(), packaging,
null);
}
});
}
- //issue 350271
- //http://lucene.apache.org/java/3_2_0/queryparsersyntax.html#Escaping Special Characters
- //for proposal queries, any special chars shall be escaped
- // + - && || ! ( ) { } [ ] ^ " ~ * ? : \
- private static String escapeQuerySpecialCharacters(String raw) {
- return QueryParserBase.escape(raw);
- }
-
public static SearchEngine getSearchEngine(final IProject project) throws CoreException {
return M2EUIPluginActivator.getDefault().getSearchEngine(project);
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
index c49cedabad..1cbb56de71 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/MavenRepositoryView.java
@@ -19,12 +19,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.eclipse.aether.artifact.Artifact;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
@@ -35,11 +35,8 @@
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
@@ -56,22 +53,14 @@
import org.eclipse.ui.part.ViewPart;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.internal.index.IndexListener;
-import org.eclipse.m2e.core.internal.index.IndexManager;
import org.eclipse.m2e.core.internal.index.IndexedArtifact;
import org.eclipse.m2e.core.internal.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.internal.index.nexus.IndexedArtifactGroup;
-import org.eclipse.m2e.core.internal.index.nexus.NexusIndex;
-import org.eclipse.m2e.core.repository.IRepository;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
-import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
-import org.eclipse.m2e.core.ui.internal.views.nodes.AbstractIndexedRepositoryNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.IArtifactNode;
-import org.eclipse.m2e.core.ui.internal.views.nodes.IndexedArtifactFileNode;
-import org.eclipse.m2e.core.ui.internal.views.nodes.LocalRepositoryNode;
+import org.eclipse.m2e.core.ui.internal.views.nodes.IMavenRepositoryNode;
import org.eclipse.m2e.core.ui.internal.views.nodes.RepositoryNode;
@@ -109,24 +98,12 @@ public class MavenRepositoryView extends ViewPart {
private static final String MENU_ID = ".repositoryViewMenu"; //$NON-NLS-1$
- private final IndexManager indexManager = MavenPlugin.getIndexManager();
-
private IAction collapseAllAction;
private IAction reloadSettings;
BaseSelectionListenerAction openPomAction;
- private BaseSelectionListenerAction updateAction;
-
- private BaseSelectionListenerAction rebuildAction;
-
- private DisableIndexAction disableAction;
-
- private EnableMinIndexAction enableMinAction;
-
- private EnableFullIndexAction enableFullAction;
-
private BaseSelectionListenerAction copyUrlAction;
//private BaseSelectionListenerAction materializeProjectAction;
@@ -137,8 +114,6 @@ public class MavenRepositoryView extends ViewPart {
private DrillDownAdapter drillDownAdapter;
- private IndexListener indexListener;
-
@Override
public void setFocus() {
viewer.getControl().setFocus();
@@ -166,30 +141,6 @@ public void createPartControl(Composite parent) {
viewer.addDoubleClickListener(event -> openPomAction.run());
contributeToActionBars();
- this.indexListener = new IndexListener() {
-
- @Override
- public void indexAdded(IRepository repository) {
- refreshView();
- }
-
- @Override
- public void indexChanged(IRepository repository) {
- refreshView();
- }
-
- @Override
- public void indexRemoved(IRepository repository) {
- refreshView();
- }
-
- @Override
- public void indexUpdating(IRepository repository) {
- Display.getDefault().asyncExec(() -> viewer.refresh(true));
- }
- };
-
- indexManager.addIndexListener(this.indexListener);
}
private void hookContextMenu() {
@@ -217,12 +168,12 @@ private void fillLocalPullDown(IMenuManager manager) {
manager.add(reloadSettings);
}
- protected List getSelectedRepositoryNodes(List> elements) {
- ArrayList list = new ArrayList<>();
+ protected List getSelectedRepositoryNodes(List> elements) {
+ ArrayList list = new ArrayList<>();
if(elements != null) {
for(Object elem : elements) {
- if(elem instanceof AbstractIndexedRepositoryNode) {
- list.add((AbstractIndexedRepositoryNode) elem);
+ if(elem instanceof IMavenRepositoryNode) {
+ list.add((IMavenRepositoryNode) elem);
}
}
}
@@ -250,12 +201,6 @@ void fillContextMenu(IMenuManager manager) {
manager.prependToGroup(MENU_OPEN_GRP, copyUrlAction);
manager.prependToGroup(MENU_OPEN_GRP, openPomAction);
- manager.prependToGroup(MENU_UPDATE_GRP, updateAction);
- manager.prependToGroup(MENU_UPDATE_GRP, rebuildAction);
-
- manager.add(disableAction);
- manager.add(enableMinAction);
- manager.add(enableFullAction);
manager.add(new Separator());
manager.add(collapseAllAction);
manager.add(new Separator());
@@ -305,152 +250,21 @@ public IStatus runInWorkspace(IProgressMonitor monitor) {
};
reloadSettings.setImageDescriptor(MavenImages.REFRESH);
-// deleteFromLocalAction = new BaseSelectionListenerAction("Delete from Repository") {
-// public void run() {
-// List nodes = getArtifactNodes(getStructuredSelection().toList());
-// if(nodes != null){
-// for(IArtifactNode node : nodes){
-// String key = node.getDocumentKey();
-// System.out.println("key: "+key);
-// ((NexusIndexManager)MavenPlugin.getIndexManager()).removeDocument("local", null, key);
-// }
-// }
-// }
-//
-// protected boolean updateSelection(IStructuredSelection selection) {
-// List nodes = getArtifactNodes(getStructuredSelection().toList());
-// return (nodes != null && nodes.size() > 0);
-// }
-// };
-// deleteFromLocalAction.setToolTipText("Delete the selected GAV from the local repository");
- //updateAction.setImageDescriptor(MavenImages.UPD_INDEX);
-
- updateAction = new BaseSelectionListenerAction(Messages.MavenRepositoryView_action_update) {
- @Override
- public void run() {
- List nodes = getSelectedRepositoryNodes(getStructuredSelection().toList());
- for(AbstractIndexedRepositoryNode node : nodes) {
- if(node instanceof RepositoryNode) {
- ((RepositoryNode) node).getIndex().scheduleIndexUpdate(false);
- }
- }
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- int indexCount = 0;
- for(AbstractIndexedRepositoryNode node : getSelectedRepositoryNodes(selection.toList())) {
- if(node instanceof RepositoryNode && node.isEnabledIndex()) {
- indexCount++ ;
- }
- }
- if(indexCount > 1) {
- setText(Messages.MavenRepositoryView_update_more);
- } else {
- setText(Messages.MavenRepositoryView_update_one);
- }
- return indexCount > 0;
- }
- };
- updateAction.setToolTipText(Messages.MavenRepositoryView_btnUpdate_tooltip);
- updateAction.setImageDescriptor(MavenImages.UPD_INDEX);
-
- rebuildAction = new BaseSelectionListenerAction(Messages.MavenRepositoryView_action_rebuild) {
- @Override
- public void run() {
- new Job(Messages.MavenRepositoryView_rebuild_indexes) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- // Remove the index listener to avoid locking the user interface
- indexManager.removeIndexListener(indexListener);
- try {
- List nodes = getSelectedRepositoryNodes(getStructuredSelection().toList());
- if(!nodes.isEmpty()) {
- final String title = Messages.MavenRepositoryView_rebuild_title;
- final String msg = nodes.size() == 1
- ? NLS.bind(Messages.MavenRepositoryView_rebuild_msg, nodes.get(0).getIndex().getRepositoryUrl())
- : Messages.MavenRepositoryView_rebuild_msg2;
-
- final boolean result[] = new boolean[1];
- Display.getDefault()
- .syncExec(() -> result[0] = MessageDialog.openConfirm(getViewSite().getShell(), title, msg));
- if(result[0]) {
- SubMonitor mon = SubMonitor.convert(monitor, nodes.size());
- try {
- for(AbstractIndexedRepositoryNode node : nodes) {
- NexusIndex index = node.getIndex();
- if(index != null) {
- try {
- index.updateIndex(true, mon.newChild(1));
- } catch(CoreException ex) {
- log.error(ex.getMessage(), ex);
- }
- } else {
- mon.worked(1);
- }
- }
- } finally {
- mon.done();
- }
- }
- }
- return Status.OK_STATUS;
- } finally {
- indexManager.addIndexListener(indexListener);
- refreshView();
- }
- }
- }.schedule();
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- int indexCount = 0;
- for(AbstractIndexedRepositoryNode node : getSelectedRepositoryNodes(selection.toList())) {
- if((node instanceof LocalRepositoryNode) || node.isEnabledIndex()) {
- indexCount++ ;
- }
- }
- if(indexCount > 1) {
- setText(Messages.MavenRepositoryView_rebuild_many);
- } else {
- setText(Messages.MavenRepositoryView_rebuild_one);
- }
- return indexCount > 0;
- }
- };
-
- rebuildAction.setToolTipText(Messages.MavenRepositoryView_action_rebuild_tooltip);
- rebuildAction.setImageDescriptor(MavenImages.REBUILD_INDEX);
-
- disableAction = new DisableIndexAction();
-
- disableAction.setToolTipText(Messages.MavenRepositoryView_action_disable_tooltip);
- disableAction.setImageDescriptor(MavenImages.REBUILD_INDEX);
-
- enableMinAction = new EnableMinIndexAction();
- enableMinAction.setToolTipText(Messages.MavenRepositoryView_action_enable_tooltip);
- enableMinAction.setImageDescriptor(MavenImages.REBUILD_INDEX);
-
- enableFullAction = new EnableFullIndexAction();
- enableFullAction.setToolTipText(Messages.MavenRepositoryView_action_enableFull_tooltip);
- enableFullAction.setImageDescriptor(MavenImages.REBUILD_INDEX);
openPomAction = new BaseSelectionListenerAction(Messages.MavenRepositoryView_action_open) {
@Override
public void run() {
ISelection selection = viewer.getSelection();
Object element = ((IStructuredSelection) selection).getFirstElement();
- if(element instanceof IndexedArtifactFileNode) {
- IndexedArtifactFile f = ((IndexedArtifactFileNode) element).getIndexedArtifactFile();
- OpenPomAction.openEditor(f.group, f.artifact, f.version, null);
+ if(element instanceof IArtifactNode) {
+ Artifact f = ((IArtifactNode) element).getArtifact();
+ OpenPomAction.openEditor(f.getGroupId(), f.getArtifactId(), f.getVersion(), null);
}
}
@Override
protected boolean updateSelection(IStructuredSelection selection) {
- return selection.getFirstElement() instanceof IndexedArtifactFileNode;
+ return selection.getFirstElement() instanceof IArtifactNode;
}
};
openPomAction.setToolTipText(Messages.MavenRepositoryView_action_open_tooltip);
@@ -463,13 +277,6 @@ public void run() {
String url = null;
if(element instanceof RepositoryNode) {
url = ((RepositoryNode) element).getRepositoryUrl();
- } else if(element instanceof IndexedArtifactGroup) {
- IndexedArtifactGroup group = (IndexedArtifactGroup) element;
- String repositoryUrl = group.getRepository().getUrl();
- if(!repositoryUrl.endsWith("/")) { //$NON-NLS-1$
- repositoryUrl += "/"; //$NON-NLS-1$
- }
- url = repositoryUrl + group.getPrefix().replace('.', '/');
} else if(element instanceof IndexedArtifact) {
//
} else if(element instanceof IndexedArtifactFile) {
@@ -485,7 +292,7 @@ public void run() {
@Override
protected boolean updateSelection(IStructuredSelection selection) {
Object element = selection.getFirstElement();
- return element instanceof RepositoryNode || element instanceof IndexedArtifactGroup;
+ return element instanceof RepositoryNode;
}
};
copyUrlAction.setToolTipText(Messages.MavenRepositoryView_action_copy_tooltip);
@@ -510,46 +317,24 @@ protected boolean updateSelection(IStructuredSelection selection) {
// materializeProjectAction.setImageDescriptor(MavenImages.IMPORT_PROJECT);
viewer.addSelectionChangedListener(openPomAction);
- viewer.addSelectionChangedListener(updateAction);
- viewer.addSelectionChangedListener(disableAction);
- viewer.addSelectionChangedListener(enableMinAction);
- viewer.addSelectionChangedListener(enableFullAction);
- viewer.addSelectionChangedListener(rebuildAction);
viewer.addSelectionChangedListener(copyUrlAction);
// viewer.addSelectionChangedListener(materializeProjectAction);
}
- protected void setIndexDetails(AbstractIndexedRepositoryNode node, String details) {
- if(node != null && node.getIndex() != null) {
- try {
- node.getIndex().setIndexDetails(details);
- } catch(CoreException ex) {
- M2EUIUtils.showErrorDialog(this.getViewSite().getShell(), Messages.MavenRepositoryView_error_title,
- Messages.MavenRepositoryView_error_message, ex);
- }
- }
- }
-
- protected AbstractIndexedRepositoryNode getSelectedRepositoryNode(IStructuredSelection selection) {
+ protected RepositoryNode getSelectedRepositoryNode(IStructuredSelection selection) {
List> elements = selection.toList();
if(elements.size() != 1) {
return null;
}
Object element = elements.get(0);
- return element instanceof AbstractIndexedRepositoryNode ? (AbstractIndexedRepositoryNode) element : null;
+ return element instanceof RepositoryNode ? (RepositoryNode) element : null;
}
@Override
public void dispose() {
// viewer.removeSelectionChangedListener(materializeProjectAction);
viewer.removeSelectionChangedListener(copyUrlAction);
- viewer.removeSelectionChangedListener(rebuildAction);
- viewer.removeSelectionChangedListener(disableAction);
- viewer.removeSelectionChangedListener(enableMinAction);
- viewer.removeSelectionChangedListener(enableFullAction);
- viewer.removeSelectionChangedListener(updateAction);
viewer.removeSelectionChangedListener(openPomAction);
- indexManager.removeIndexListener(this.indexListener);
super.dispose();
}
@@ -565,99 +350,4 @@ void refreshView() {
});
}
- /**
- * Base Selection Listener does not allow the style (radio button/check) to be set. This base class listens to
- * selections and sets the appropriate index value depending on its value AbstractIndexAction
- *
- * @author dyocum
- */
- abstract class AbstractIndexAction extends Action implements ISelectionChangedListener {
-
- protected abstract String getDetailsValue();
-
- protected abstract String getActionText();
-
- public AbstractIndexAction(String text, int style) {
- super(text, style);
- }
-
- @Override
- public void run() {
- IStructuredSelection sel = (IStructuredSelection) viewer.getSelection();
- setIndexDetails(getSelectedRepositoryNode(sel), getDetailsValue());
- }
-
- /*
- */
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection sel = (IStructuredSelection) event.getSelection();
- updateSelection(sel);
- }
-
- protected void updateSelection(IStructuredSelection selection) {
- AbstractIndexedRepositoryNode node = getSelectedRepositoryNode(selection);
- updateIndexDetails(node);
- setText(getActionText());
- boolean enabled = (node instanceof RepositoryNode);
- this.setEnabled(enabled);
- }
-
- protected void updateIndexDetails(AbstractIndexedRepositoryNode node) {
- if(node == null || node.getIndex() == null) {
- return;
- }
- NexusIndex index = node.getIndex();
- setChecked(getDetailsValue().equals(index.getIndexDetails()));
- }
-
- }
-
- class DisableIndexAction extends AbstractIndexAction {
- public DisableIndexAction() {
- super(DISABLE_DETAILS, IAction.AS_CHECK_BOX);
- }
-
- @Override
- protected String getDetailsValue() {
- return NexusIndex.DETAILS_DISABLED;
- }
-
- @Override
- protected String getActionText() {
- return isChecked() ? DISABLED_DETAILS : DISABLE_DETAILS;
- }
- }
-
- class EnableMinIndexAction extends AbstractIndexAction {
- public EnableMinIndexAction() {
- super(ENABLE_MIN, IAction.AS_CHECK_BOX);
- }
-
- @Override
- protected String getDetailsValue() {
- return NexusIndex.DETAILS_MIN;
- }
-
- @Override
- protected String getActionText() {
- return isChecked() ? ENABLED_MIN : ENABLE_MIN;
- }
- }
-
- class EnableFullIndexAction extends AbstractIndexAction {
- public EnableFullIndexAction() {
- super(ENABLE_FULL, IAction.AS_CHECK_BOX);
- }
-
- @Override
- protected String getDetailsValue() {
- return NexusIndex.DETAILS_FULL;
- }
-
- @Override
- protected String getActionText() {
- return isChecked() ? ENABLED_FULL : ENABLE_FULL;
- }
- }
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
index 1d9aff3227..7a1f0a33ba 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/RepositoryViewLabelProvider.java
@@ -84,7 +84,7 @@ public Color getBackground(Object element) {
@Override
public Color getForeground(Object element) {
- if(element instanceof RepositoryNode && !((RepositoryNode) element).isEnabledIndex()) {
+ if(element instanceof RepositoryNode && !(((RepositoryNode) element).hasChildren())) {
return Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY);
}
return null;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
deleted file mode 100644
index a8edf4eb38..0000000000
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.core.ui.internal.views.nodes;
-
-import java.util.Arrays;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.m2e.core.internal.index.nexus.IndexedArtifactGroup;
-import org.eclipse.m2e.core.internal.index.nexus.NexusIndex;
-import org.eclipse.m2e.core.ui.internal.MavenImages;
-
-
-/**
- * AbstractIndexedRepository
- *
- * @author igor
- */
-public abstract class AbstractIndexedRepositoryNode implements IMavenRepositoryNode {
- private static final Logger log = LoggerFactory.getLogger(AbstractIndexedRepositoryNode.class);
-
- protected static final Object[] NO_CHILDREN = new Object[0];
-
- protected final NexusIndex index;
-
- protected AbstractIndexedRepositoryNode(NexusIndex index) {
- this.index = index;
- }
-
- @Override
- public Object[] getChildren() {
-
- if(index == null) {
- return NO_CHILDREN;
- }
-
- try {
- IndexedArtifactGroup[] rootGroups = index.getRootIndexedArtifactGroups();
- if(rootGroups == null) {
- return NO_CHILDREN;
- }
- IndexedArtifactGroupNode[] children = new IndexedArtifactGroupNode[rootGroups.length];
- Arrays.sort(rootGroups);
- for(int i = 0; i < rootGroups.length; i++ ) {
- children[i] = new IndexedArtifactGroupNode(rootGroups[i]);
- }
- return children;
- } catch(CoreException ex) {
- log.error(ex.getMessage(), ex);
- return NO_CHILDREN;
- }
- }
-
- @Override
- public Image getImage() {
- return MavenImages.IMG_INDEX;
- }
-
- @Override
- public boolean hasChildren() {
- return index != null;
- }
-
- @Override
- public boolean isUpdating() {
- return index != null && index.isUpdating();
- }
-
- public NexusIndex getIndex() {
- return index;
- }
-
- public String getRepositoryUrl() {
- return index.getRepositoryUrl();
- }
-
- public boolean isEnabledIndex() {
- return index != null && index.isEnabled();
- }
-}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
index d1e438d75e..293aa7487a 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractRepositoriesNode.java
@@ -19,8 +19,6 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.internal.index.nexus.NexusIndex;
-import org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager;
import org.eclipse.m2e.core.repository.IRepository;
import org.eclipse.m2e.core.repository.IRepositoryRegistry;
import org.eclipse.m2e.core.ui.internal.MavenImages;
@@ -33,8 +31,6 @@
*/
public abstract class AbstractRepositoriesNode implements IMavenRepositoryNode {
- protected final NexusIndexManager indexManager = (NexusIndexManager) MavenPlugin.getIndexManager();
-
protected final IRepositoryRegistry repositoryRegistry = MavenPlugin.getRepositoryRegistry();
@Override
@@ -44,8 +40,7 @@ public Object[] getChildren() {
ArrayList