From bc11ec707275c63542a0cef43e7a17ff687c2c46 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mar 25 2020 11:32:54 +0000 Subject: Merge branch 'eclipse' --- diff --git a/0001-Fix-manifests-for-guava-and-use-OSGi-fied-archetypes.patch b/0001-Fix-manifests-for-guava-and-use-OSGi-fied-archetypes.patch new file mode 100644 index 0000000..95cc8dc --- /dev/null +++ b/0001-Fix-manifests-for-guava-and-use-OSGi-fied-archetypes.patch @@ -0,0 +1,71 @@ +From bfcc8e7f185c01f85d9775047e21ae6399b269ab Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Tue, 18 Jun 2019 15:35:48 +0100 +Subject: [PATCH 1/5] Fix manifests for guava and use OSGi-fied archetypes + +--- + org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF | 4 +++- + org.eclipse.m2e.core/META-INF/MANIFEST.MF | 4 +++- + org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF | 2 +- + org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF | 2 +- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF +index 179c8e8..e4d7d7f 100644 +--- a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF ++++ b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF +@@ -36,7 +36,9 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[1.15.0,1.16.0)", + org.eclipse.core.expressions;bundle-version="3.4.101", + org.eclipse.ui.forms;bundle-version="3.4.1", + org.eclipse.jface.text, +- org.eclipse.ui ++ org.eclipse.ui, ++ org.apache.maven.archetype.catalog, ++ org.apache.maven.archetype.descriptor + Import-Package: org.eclipse.compare.rangedifferencer, + org.eclipse.ltk.core.refactoring, + org.slf4j;version="1.6.2" +diff --git a/org.eclipse.m2e.core/META-INF/MANIFEST.MF b/org.eclipse.m2e.core/META-INF/MANIFEST.MF +index e9a0428..3598d22 100644 +--- a/org.eclipse.m2e.core/META-INF/MANIFEST.MF ++++ b/org.eclipse.m2e.core/META-INF/MANIFEST.MF +@@ -13,7 +13,9 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.10.0", + org.eclipse.m2e.workspace.cli;bundle-version="0.1.0", + org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.core.resources;bundle-version="3.9.0", +- com.google.guava;bundle-version="[27.1,28.0)" ++ org.apache.maven.archetype.catalog, ++ org.apache.maven.archetype.descriptor, ++ com.google.guava;bundle-version="[20.0,29.0)" + Bundle-ActivationPolicy: lazy + Bundle-ClassPath: . + Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +diff --git a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF +index 2f155c1..68f61bb 100644 +--- a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF ++++ b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF +@@ -22,7 +22,7 @@ Require-Bundle: org.eclipse.core.runtime, + org.eclipse.ui.ide, + org.eclipse.core.filesystem, + org.eclipse.ui.forms, +- com.google.guava;bundle-version="[27.1,28.0)" ++ com.google.guava;bundle-version="[20.0,29.0)" + Export-Package: org.eclipse.m2e.editor.xml;x-internal:=true, + org.eclipse.m2e.editor.xml.internal;x-internal:=true, + org.eclipse.m2e.editor.xml.internal.lifecycle;x-internal:=true, +diff --git a/org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF b/org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF +index e964a7f..c08fb21 100644 +--- a/org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF ++++ b/org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF +@@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.m2e.launching;bundle-version="[1.15.0,1.16.0)", + org.eclipse.core.expressions;bundle-version="3.4.400", + org.eclipse.debug.ui;bundle-version="3.10.0", + org.eclipse.core.resources, +- com.google.guava;bundle-version="[27.1,28.0)", ++ com.google.guava;bundle-version="[20.0,29.0)", + com.google.gson;bundle-version="2.2.4", + org.eclipse.core.variables;bundle-version="3.2.0" + Import-Package: org.slf4j;version="1.6.2" +-- +2.26.0.rc2 + diff --git a/0002-Port-to-latest-versions-of-maven-indexer-and-lucene.patch b/0002-Port-to-latest-versions-of-maven-indexer-and-lucene.patch new file mode 100644 index 0000000..1e4f5b7 --- /dev/null +++ b/0002-Port-to-latest-versions-of-maven-indexer-and-lucene.patch @@ -0,0 +1,446 @@ +From 1ac69bca7c6007f3dd694885fa122beab0004676 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Tue, 18 Jun 2019 15:45:18 +0100 +Subject: [PATCH 2/5] Port to latest versions of maven-indexer and lucene + +--- + .../org.eclipse.m2e.maven.indexer/pom.xml | 4 +- + .../maven/index/DefaultIndexerEngine.java | 27 ++--- + .../core/ui/internal/util/ProposalUtil.java | 2 +- + .../nexus/AetherClientResourceFetcher.java | 11 +- + .../core/internal/index/nexus/NexusIndex.java | 10 +- + .../index/nexus/NexusIndexManager.java | 100 +++++++++--------- + 6 files changed, 83 insertions(+), 71 deletions(-) + +diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml +index 6c34e73..9f4a91f 100644 +--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml ++++ b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml +@@ -27,7 +27,7 @@ + + org.apache.maven.indexer + indexer-core +- 3.1.0 ++ 6.0.0 + true + + +@@ -70,7 +70,7 @@ + + + +- !* ++ org.apache.lucene*,!* + + + org.eclipse.m2e.maven.runtime;bundle-version="[1.15.0,1.16.0)", +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 +index 4b155c1..6aa1359 100644 +--- 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 +@@ -25,7 +25,9 @@ import java.util.Set; + + import org.apache.lucene.document.Document; + import org.apache.lucene.document.Field; +-import org.apache.lucene.document.Fieldable; ++import org.apache.lucene.document.StringField; ++import org.apache.lucene.index.IndexableField; ++import org.apache.lucene.index.IndexableFieldType; + import org.apache.lucene.index.IndexWriter; + import org.apache.lucene.index.Term; + import org.apache.lucene.search.IndexSearcher; +@@ -112,10 +114,9 @@ public class DefaultIndexerEngine + { + final HashMap result = new HashMap(); + +- for ( Object o : d.getFields() ) ++ for ( IndexableField f : d.getFields() ) + { +- Fieldable f = (Fieldable) o; +- if ( f.isStored() ) ++ if ( f.fieldType().stored() ) + { + result.put( f.name(), f.stringValue() ); + } +@@ -128,13 +129,15 @@ public class DefaultIndexerEngine + { + try + { +- IndexSearcher indexSearcher = context.getIndexSearcher(); ++ IndexSearcher indexSearcher = context.acquireIndexSearcher(); + TopDocs result = + indexSearcher.search( new TermQuery( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ) ), + 2 ); +- if ( result.totalHits == 1 ) ++ if ( result.totalHits.value == 1 ) + { +- return indexSearcher.doc( result.scoreDocs[0].doc ); ++ Document doc = indexSearcher.doc( result.scoreDocs[0].doc ); ++ context.releaseIndexSearcher( indexSearcher ); ++ return doc; + } + } + catch ( IOException e ) +@@ -155,9 +158,9 @@ public class DefaultIndexerEngine + } + + Set allGroups = context.getAllGroups(); +- if ( !allGroups.contains( ac.getArtifactInfo().groupId ) ) ++ if ( !allGroups.contains( ac.getArtifactInfo().getGroupId() ) ) + { +- allGroups.add( ac.getArtifactInfo().groupId ); ++ allGroups.add( ac.getArtifactInfo().getGroupId() ); + context.setAllGroups( allGroups ); + } + } +@@ -170,9 +173,9 @@ public class DefaultIndexerEngine + String uinfo = ac.getArtifactInfo().getUinfo(); + // add artifact deletion marker + Document doc = new Document(); +- doc.add( new Field( ArtifactInfo.DELETED, uinfo, Field.Store.YES, Field.Index.NO ) ); +- doc.add( new Field( ArtifactInfo.LAST_MODIFIED, // +- Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) ); ++ 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 ) ); +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 1446936..40f851e 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,7 +34,7 @@ import org.eclipse.swt.widgets.Text; + import org.eclipse.ui.IWorkbenchCommandConstants; + import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter; + +-import org.apache.lucene.queryParser.QueryParser; ++import org.apache.lucene.queryparser.classic.QueryParser; + + import org.apache.maven.project.MavenProject; + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java +index c549248..b311824 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java +@@ -35,7 +35,7 @@ import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.core.runtime.NullProgressMonitor; + import org.eclipse.core.runtime.OperationCanceledException; + +-import org.apache.maven.index.updater.AbstractResourceFetcher; ++import org.apache.maven.index.updater.ResourceFetcher; + import org.apache.maven.wagon.authentication.AuthenticationInfo; + import org.apache.maven.wagon.proxy.ProxyInfo; + import org.apache.maven.wagon.proxy.ProxyUtils; +@@ -51,7 +51,7 @@ import io.takari.aether.client.Response; + import io.takari.aether.okhttp.OkHttpAetherClient; + + +-public class AetherClientResourceFetcher extends AbstractResourceFetcher { ++public class AetherClientResourceFetcher implements ResourceFetcher { + + private AetherClient aetherClient; + +@@ -101,6 +101,13 @@ public class AetherClientResourceFetcher extends AbstractResourceFetcher { + } + } + ++ public InputStream retrieve(String name) throws IOException, FileNotFoundException { ++ String url = baseUrl + "/" + name; ++ Response response = aetherClient.get(url); ++ ++ return response.getInputStream(); ++ } ++ + class AetherClientConfigAdapter extends AetherClientConfig { + private final Logger log = LoggerFactory.getLogger(AetherClientConfigAdapter.class); + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java +index 0902eda..45b053d 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java +@@ -107,7 +107,7 @@ public class NexusIndex implements IIndex, IMutableIndex { + public Collection find(Collection groupId, + Collection artifactId, Collection version, + Collection packaging) throws CoreException { +- BooleanQuery query = new BooleanQuery(); ++ BooleanQuery.Builder query = new BooleanQuery.Builder(); + + addQueryFromSearchExpressionCollection(query, MAVEN.PACKAGING, packaging); + +@@ -117,18 +117,18 @@ public class NexusIndex implements IIndex, IMutableIndex { + + addQueryFromSearchExpressionCollection(query, MAVEN.VERSION, version); + +- return indexManager.search(repository, query).values(); ++ return indexManager.search(repository, query.build()).values(); + } + +- private void addQueryFromSearchExpressionCollection(final BooleanQuery query, final Field field, ++ private void addQueryFromSearchExpressionCollection(final BooleanQuery.Builder query, final Field field, + final Collection sec) { + if(sec != null && !sec.isEmpty()) { + if(sec.size() > 1) { +- BooleanQuery q = new BooleanQuery(); ++ BooleanQuery.Builder q = new BooleanQuery.Builder(); + for(SearchExpression se : sec) { + q.add(indexManager.constructQuery(field, se), Occur.SHOULD); + } +- query.add(q, Occur.MUST); ++ query.add(q.build(), Occur.MUST); + } else { + query.add(indexManager.constructQuery(field, sec.iterator().next()), Occur.MUST); + } +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java +index 37d6906..e7e0688 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java +@@ -54,9 +54,7 @@ import org.codehaus.plexus.util.IOUtil; + import org.apache.lucene.search.BooleanClause; + import org.apache.lucene.search.BooleanClause.Occur; + import org.apache.lucene.search.BooleanQuery; +-import org.apache.lucene.search.FilteredQuery; + import org.apache.lucene.search.Query; +-import org.apache.lucene.search.QueryWrapperFilter; + import org.apache.lucene.store.Directory; + import org.apache.lucene.store.FSDirectory; + +@@ -71,7 +69,6 @@ import org.apache.maven.index.MAVEN; + import org.apache.maven.index.NexusIndexer; + import org.apache.maven.index.SearchType; + import org.apache.maven.index.artifact.Gav; +-import org.apache.maven.index.artifact.IllegalArtifactCoordinateException; + import org.apache.maven.index.context.IndexCreator; + import org.apache.maven.index.context.IndexingContext; + import org.apache.maven.index.creator.JarFileContentsIndexCreator; +@@ -231,7 +228,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + public IndexedArtifactFile getIndexedArtifactFile(IRepository repository, ArtifactKey gav) throws CoreException { + + try { +- BooleanQuery query = new BooleanQuery(); ++ BooleanQuery.Builder query = new BooleanQuery.Builder(); + query.add(constructQuery(MAVEN.GROUP_ID, gav.getGroupId(), SearchType.EXACT), BooleanClause.Occur.MUST); + query.add(constructQuery(MAVEN.ARTIFACT_ID, gav.getArtifactId(), SearchType.EXACT), BooleanClause.Occur.MUST); + query.add(constructQuery(MAVEN.VERSION, gav.getVersion(), SearchType.EXACT), BooleanClause.Occur.MUST); +@@ -241,9 +238,10 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + } + + synchronized(getIndexLock(repository)) { +- ArtifactInfo artifactInfo = getIndexer().identify(query, Collections.singleton(getIndexingContext(repository))); +- if(artifactInfo != null) { +- return getIndexedArtifactFile(artifactInfo); ++ Collection artifactInfo = getIndexer().identify(query.build(), ++ Collections.singleton(getIndexingContext(repository))); ++ if(artifactInfo != null && !artifactInfo.isEmpty()) { ++ return getIndexedArtifactFile((ArtifactInfo) artifactInfo.toArray()[0]); + } + } + } catch(Exception ex) { +@@ -257,26 +255,26 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + + /** for Unit test */ + public IndexedArtifactFile getIndexedArtifactFile(ArtifactInfo artifactInfo) { +- String groupId = artifactInfo.groupId; +- String artifactId = artifactInfo.artifactId; +- String repository = artifactInfo.repository; +- String version = artifactInfo.version; +- String classifier = artifactInfo.classifier; +- String packaging = artifactInfo.packaging; +- String fname = artifactInfo.fname; ++ String groupId = artifactInfo.getGroupId(); ++ String artifactId = artifactInfo.getArtifactId(); ++ String repository = artifactInfo.getRepository(); ++ String version = artifactInfo.getVersion(); ++ String classifier = artifactInfo.getClassifier(); ++ String packaging = artifactInfo.getPackaging(); ++ String fname = artifactInfo.getFileName(); + if(fname == null) { + fname = artifactId + '-' + version + + (classifier != null ? '-' + classifier : "") + (packaging != null ? ('.' + packaging) : ""); //$NON-NLS-1$ //$NON-NLS-2$ + } + +- long size = artifactInfo.size; +- Date date = new Date(artifactInfo.lastModified); ++ long size = artifactInfo.getSize(); ++ Date date = new Date(artifactInfo.getLastModified()); + +- int sourcesExists = artifactInfo.sourcesExists.ordinal(); +- int javadocExists = artifactInfo.javadocExists.ordinal(); ++ int sourcesExists = artifactInfo.getSourcesExists().ordinal(); ++ int javadocExists = artifactInfo.getJavadocExists().ordinal(); + +- String prefix = artifactInfo.prefix; +- List goals = artifactInfo.goals; ++ String prefix = artifactInfo.getPrefix(); ++ List goals = artifactInfo.getGoals(); + + return new IndexedArtifactFile(repository, groupId, artifactId, version, packaging, classifier, fname, size, date, + sourcesExists, javadocExists, prefix, goals); +@@ -284,8 +282,9 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + + public IndexedArtifactFile identify(File file) throws CoreException { + try { +- ArtifactInfo artifactInfo = getIndexer().identify(file); +- return artifactInfo == null ? null : getIndexedArtifactFile(artifactInfo); ++ Collection artifactInfo = getIndexer().identify(file); ++ return artifactInfo == null || artifactInfo.isEmpty() ? null ++ : getIndexedArtifactFile((ArtifactInfo) artifactInfo.toArray()[0]); + } catch(IOException ex) { + throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, + Messages.NexusIndexManager_error_search, ex)); +@@ -343,7 +342,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + return search(null, term, type, classifier); + } + +- private void addClassifiersToQuery(BooleanQuery bq, int classifier) { ++ private void addClassifiersToQuery(BooleanQuery.Builder bq, int classifier) { + boolean includeJavaDocs = (classifier & IIndex.SEARCH_JAVADOCS) > 0; + Query tq = null; + if(!includeJavaDocs) { +@@ -374,46 +373,55 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + // query = new TermQuery(new Term(ArtifactInfo.GROUP_ID, term)); + // query = new PrefixQuery(new Term(ArtifactInfo.GROUP_ID, term)); + } else if(IIndex.SEARCH_ARTIFACT.equals(type)) { +- BooleanQuery bq = new BooleanQuery(); ++ BooleanQuery.Builder bq = new BooleanQuery.Builder(); + bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add( + constructQuery(MAVEN.SHA1, term.getStringValue(), term.getStringValue().length() == 40 ? SearchType.EXACT + : SearchType.SCORED), Occur.SHOULD); + addClassifiersToQuery(bq, classifier); +- query = bq; ++ query = bq.build(); + + } else if(IIndex.SEARCH_PARENTS.equals(type)) { + if(term == null) { + query = constructQuery(MAVEN.PACKAGING, "pom", SearchType.EXACT); //$NON-NLS-1$ + } else { +- BooleanQuery bq = new BooleanQuery(); ++ BooleanQuery.Builder bq = new BooleanQuery.Builder(); + bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add( + constructQuery(MAVEN.SHA1, term.getStringValue(), term.getStringValue().length() == 40 ? SearchType.EXACT + : SearchType.SCORED), Occur.SHOULD); + Query tq = constructQuery(MAVEN.PACKAGING, "pom", SearchType.EXACT); //$NON-NLS-1$ +- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); ++ BooleanQuery.Builder builder = new BooleanQuery.Builder(); ++ builder.add(bq.build(), Occur.MUST); ++ builder.add(tq, Occur.FILTER); ++ query = builder.build(); + } + + } else if(IIndex.SEARCH_PLUGIN.equals(type)) { + if(term == null) { + query = constructQuery(MAVEN.PACKAGING, "maven-plugin", SearchType.EXACT); //$NON-NLS-1$ + } else { +- BooleanQuery bq = new BooleanQuery(); ++ BooleanQuery.Builder bq = new BooleanQuery.Builder(); + bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ + Query tq = constructQuery(MAVEN.PACKAGING, "maven-plugin", SearchType.EXACT); //$NON-NLS-1$ +- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); ++ BooleanQuery.Builder builder = new BooleanQuery.Builder(); ++ builder.add(bq.build(), Occur.MUST); ++ builder.add(tq, Occur.FILTER); ++ query = builder.build(); + } + + } else if(IIndex.SEARCH_ARCHETYPE.equals(type)) { +- BooleanQuery bq = new BooleanQuery(); ++ BooleanQuery.Builder bq = new BooleanQuery.Builder(); + bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ + bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ + Query tq = constructQuery(MAVEN.PACKAGING, "maven-archetype", SearchType.EXACT); //$NON-NLS-1$ +- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); ++ BooleanQuery.Builder builder = new BooleanQuery.Builder(); ++ builder.add(bq.build(), Occur.MUST); ++ builder.add(tq, Occur.FILTER); ++ query = builder.build(); + + } else if(IIndex.SEARCH_PACKAGING.equals(type)) { + query = constructQuery(MAVEN.PACKAGING, term); +@@ -439,7 +447,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + } + + for(ArtifactInfo artifactInfo : response.getResults()) { +- addArtifactFile(result, getIndexedArtifactFile(artifactInfo), null, null, artifactInfo.packaging); ++ addArtifactFile(result, getIndexedArtifactFile(artifactInfo), null, null, artifactInfo.getPackaging()); + } + + // https://issues.sonatype.org/browse/MNGECLIPSE-1630 +@@ -490,7 +498,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + } + + for(ArtifactInfo artifactInfo : response.getResults()) { +- addArtifactFile(result, getIndexedArtifactFile(artifactInfo), null, null, artifactInfo.packaging); ++ addArtifactFile(result, getIndexedArtifactFile(artifactInfo), null, null, artifactInfo.getPackaging()); + } + + } catch(IOException ex) { +@@ -628,27 +636,20 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + fireIndexChanged(repository); + } + +- private ArtifactContext getArtifactContext(File file, IndexingContext context) +- throws IllegalArtifactCoordinateException { ++ private ArtifactContext getArtifactContext(File file, IndexingContext context) { + return getArtifactContextProducer().getArtifactContext(context, file); + } + +- private ArtifactContext getWorkspaceArtifactContext(IMavenProjectFacade facade, IndexingContext context) +- throws CoreException { ++ private ArtifactContext getWorkspaceArtifactContext(IMavenProjectFacade facade, IndexingContext context) { + IRepository workspaceRepository = repositoryRegistry.getWorkspaceRepository(); + ArtifactKey key = facade.getArtifactKey(); + ArtifactInfo ai = new ArtifactInfo(workspaceRepository.getUid(), key.getGroupId(), key.getArtifactId(), +- key.getVersion(), null); +- ai.packaging = facade.getPackaging(); ++ key.getVersion(), key.getClassifier(), null); ++ ai.setPackaging(facade.getPackaging()); + File pomFile = facade.getPomFile(); + File artifactFile = (pomFile != null) ? pomFile.getParentFile() : null; +- try { +- Gav gav = new Gav(key.getGroupId(), key.getArtifactId(), key.getVersion()); +- return new ArtifactContext(pomFile, artifactFile, null, ai, gav); +- } catch(IllegalArtifactCoordinateException ex) { +- throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, +- Messages.NexusIndexManager_error_unexpected, ex)); +- } ++ Gav gav = new Gav(key.getGroupId(), key.getArtifactId(), key.getVersion()); ++ return new ArtifactContext(pomFile, artifactFile, null, ai, gav); + } + + protected void scheduleIndexUpdate(final IRepository repository, final boolean force) { +@@ -841,7 +842,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + } + + protected Directory getIndexDirectory(IRepository repository) throws IOException { +- return FSDirectory.getDirectory(getIndexDirectoryFile(repository)); ++ return FSDirectory.open(getIndexDirectoryFile(repository).toPath()); + } + + public IndexedArtifactGroup resolveGroup(IndexedArtifactGroup group) { +@@ -1130,7 +1131,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + String details = getIndexDetails(repository); + String id = repository.getUid() + "-cache"; //$NON-NLS-1$ + File luceneCache = new File(request.getLocalIndexCacheDir(), details); +- Directory directory = FSDirectory.getDirectory(luceneCache); ++ Directory directory = FSDirectory.open(luceneCache.toPath()); + IndexingContext cacheCtx = getIndexer().addIndexingContextForced(id, id, null, directory, null, null, + getIndexers(details)); + request = newIndexUpdateRequest(repository, cacheCtx, monitor); +@@ -1274,7 +1275,8 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList + + Query q = getIndexer().constructQuery(MAVEN.SHA1, encode(digest), SearchType.EXACT); + +- return getIndexer().identify(q, contexts); ++ Collection result = getIndexer().identify(q, contexts); ++ return result == null || result.isEmpty() ? null : (ArtifactInfo) result.toArray()[0]; + + } catch(NoSuchAlgorithmException ex) { + throw new IOException("Unable to calculate digest"); +-- +2.26.0.rc2 + diff --git a/0003-Adapt-to-API-change-in-aether.patch b/0003-Adapt-to-API-change-in-aether.patch new file mode 100644 index 0000000..34cde67 --- /dev/null +++ b/0003-Adapt-to-API-change-in-aether.patch @@ -0,0 +1,55 @@ +From d55099c4a86c682f907ff3948f5c99b98bfc5d11 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 21 Jun 2019 11:24:15 +0100 +Subject: [PATCH 3/5] Adapt to API change in aether + +--- + .../embedder/ContextRepositorySystemSessionImpl.java | 6 ------ + .../internal/lifecyclemapping/LifecycleMappingFactory.java | 6 +++--- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java +index 1b9bf84..c40cf38 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java +@@ -34,7 +34,6 @@ import org.eclipse.aether.repository.WorkspaceReader; + import org.eclipse.aether.resolution.ArtifactDescriptorPolicy; + import org.eclipse.aether.resolution.ResolutionErrorPolicy; + import org.eclipse.aether.transfer.TransferListener; +-import org.eclipse.aether.transform.FileTransformerManager; + + import org.codehaus.plexus.component.annotations.Component; + import org.codehaus.plexus.component.annotations.Requirement; +@@ -180,9 +179,4 @@ public class ContextRepositorySystemSessionImpl implements ContextRepositorySyst + return getSession().getVersionFilter(); + } + +- @Override +- public FileTransformerManager getFileTransformerManager() { +- return getSession().getFileTransformerManager(); +- } +- + } +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java +index 416decc..630992a 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java +@@ -686,12 +686,12 @@ public class LifecycleMappingFactory { + List result = new ArrayList<>(); + all_metadatas: for(PluginExecutionMetadata metadata : metadatas) { + @SuppressWarnings("unchecked") +- Map parameters = metadata.getFilter().getParameters(); ++ Map parameters = metadata.getFilter().getParameters(); + if(!parameters.isEmpty()) { +- for(Entry entry : parameters.entrySet()) { ++ for(Entry entry : parameters.entrySet()) { + MojoExecution setupExecution = maven.setupMojoExecution(mavenProject, execution, monitor); + if(!eq(entry.getValue(), +- maven.getMojoParameterValue(mavenProject, setupExecution, entry.getKey(), String.class, monitor))) { ++ maven.getMojoParameterValue(mavenProject, setupExecution, (String)entry.getKey(), String.class, monitor))) { + continue all_metadatas; + } + } +-- +2.26.0.rc2 + diff --git a/0004-Remove-mandatory-attirbutes-from-OSGi-manifests-whic.patch b/0004-Remove-mandatory-attirbutes-from-OSGi-manifests-whic.patch new file mode 100644 index 0000000..5b33fb4 --- /dev/null +++ b/0004-Remove-mandatory-attirbutes-from-OSGi-manifests-whic.patch @@ -0,0 +1,67 @@ +From dd1ffee21280be51c9db64a3bbe831685879ef84 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 21 Jun 2019 11:27:12 +0100 +Subject: [PATCH 4/5] Remove mandatory attirbutes from OSGi manifests, which + cause problems with P2 + +--- + .../org.eclipse.m2e.archetype.common/pom.xml | 4 ++-- + .../org.eclipse.m2e.maven.indexer/pom.xml | 3 +-- + .../org.eclipse.m2e.maven.runtime/pom.xml | 12 ++++++------ + 3 files changed, 9 insertions(+), 10 deletions(-) + +diff --git a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml +index 68d1db2..9279dce 100644 +--- a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml ++++ b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml +@@ -91,8 +91,8 @@ + + <_exportcontents> + META-INF.plexus;-noimport:=true;x-internal:=true, +- org.apache.maven.archetype.*;provider=m2e;mandatory:=provider;x-internal:=true, +- org.codehaus.plexus.velocity;provider=m2e;mandatory:=provider;x-internal:=true, ++ org.apache.maven.archetype.*;provider=m2e;x-internal:=true, ++ org.codehaus.plexus.velocity;provider=m2e;x-internal:=true, + + + +diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml +index 9f4a91f..e073f24 100644 +--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml ++++ b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml +@@ -65,8 +65,7 @@ + + <_exportcontents> + META-INF.plexus;-noimport:=true, +- org.apache.lucene.*;provider=m2e;mandatory:=provider, +- org.apache.maven.*;provider=m2e;mandatory:=provider, ++ org.apache.maven.*;provider=m2e, + + + +diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml +index 2aa5313..d1f4ad4 100644 +--- a/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml ++++ b/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml +@@ -139,12 +139,12 @@ + <_exportcontents> + META-INF.plexus;-noimport:=true, + META-INF.sisu;-noimport:=true, +- org.apache.maven.*;provider=m2e;mandatory:=provider, +- org.codehaus.plexus.*;provider=m2e;mandatory:=provider, +- org.sonatype.plexus.*;provider=m2e;mandatory:=provider, +- org.eclipse.aether.*;provider=m2e;mandatory:=provider;version=1.1.1, +- com.google.inject.*;provider=m2e;mandatory:=provider, +- io.takari.*;provider=m2e;mandatory:=provider ++ org.apache.maven.*;provider=m2e, ++ org.codehaus.plexus.*;provider=m2e, ++ org.sonatype.plexus.*;provider=m2e, ++ org.eclipse.aether.*;provider=m2e, ++ com.google.inject.*;provider=m2e, ++ io.takari.*;provider=m2e + + + +-- +2.26.0.rc2 + diff --git a/0005-Port-to-latest-version-of-maven-archetypes.patch b/0005-Port-to-latest-version-of-maven-archetypes.patch new file mode 100644 index 0000000..f128d90 --- /dev/null +++ b/0005-Port-to-latest-version-of-maven-archetypes.patch @@ -0,0 +1,566 @@ +From eccef76a991528e8fde44e3767defd4ec4c1f5b0 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Wed, 3 Jul 2019 15:29:05 +0100 +Subject: [PATCH 5/5] Port to latest version of maven-archetypes + +Change-Id: I208abd50bdbe420d5413ad12bbe5150c428c9453 +--- + .../org.eclipse.m2e.archetype.common/pom.xml | 9 +- + .../MavenArchetypesPreferencePage.java | 93 +--------- + .../MavenProjectWizardArchetypePage.java | 8 +- + .../m2e/core/internal/ExtensionReader.java | 27 +-- + .../eclipse/m2e/core/internal/Messages.java | 2 - + .../archetype/ArchetypeCatalogFactory.java | 164 ++---------------- + .../archetype/ArchetypeCatalogsWriter.java | 49 +----- + .../internal/archetype/ArchetypeManager.java | 5 +- + 8 files changed, 34 insertions(+), 323 deletions(-) + +diff --git a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml +index 9279dce..ca19922 100644 +--- a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml ++++ b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml +@@ -24,7 +24,7 @@ + Maven Archetype Common Bundle + + +- 2.4 ++ 3.1.1 + + + +@@ -34,11 +34,6 @@ + ${archetype-common.version} + true + +- +- +- velocity +- velocity +- + + plexus-container-default + org.codehaus.plexus +@@ -76,12 +71,10 @@ + archetype-common, + archetype-catalog, + archetype-descriptor, +- archetype-registry, + maven-invoker, + commons-collections, + commons-io, + commons-lang, +- dom4j;version=2.1.1, + jchardet, + jdom, + oro, +diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java +index 0c95b17..486e3c9 100644 +--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java ++++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java +@@ -55,8 +55,6 @@ import org.eclipse.ui.browser.IWebBrowser; + + import org.eclipse.m2e.core.internal.MavenPluginActivator; + import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory; +-import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory.LocalCatalogFactory; +-import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory; + import org.eclipse.m2e.core.internal.archetype.ArchetypeManager; + import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants; + import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator; +@@ -174,84 +172,6 @@ public class MavenArchetypesPreferencePage extends FieldEditorPreferencePage imp + typeColumn.setWidth(250); + typeColumn.setText(""); //$NON-NLS-1$ + +- Button enableAllBtn = new Button(composite, SWT.NONE); +- enableAllBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); +- enableAllBtn.setText(Messages.MavenArchetypesPreferencePage_btnEnableAll); +- enableAllBtn.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> toggleRepositories(true))); +- +- Button disableAllBtn = new Button(composite, SWT.NONE); +- disableAllBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); +- disableAllBtn.setText(Messages.MavenArchetypesPreferencePage_btnDisableAll); +- disableAllBtn.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> toggleRepositories(false))); +- +- Button addLocalButton = new Button(composite, SWT.NONE); +- addLocalButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); +- addLocalButton.setText(Messages.MavenArchetypesPreferencePage_btnAddLocal); +- addLocalButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { +- LocalArchetypeCatalogDialog dialog = new LocalArchetypeCatalogDialog(getShell(), null); +- if(dialog.open() == Window.OK) { +- addCatalogFactory(dialog.getArchetypeCatalogFactory()); +- } +- })); +- +- Button addRemoteButton = new Button(composite, SWT.NONE); +- addRemoteButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); +- addRemoteButton.setText(Messages.MavenArchetypesPreferencePage_btnAddRemote); +- addRemoteButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { +- RemoteArchetypeCatalogDialog dialog = new RemoteArchetypeCatalogDialog(getShell(), null); +- if(dialog.open() == Window.OK) { +- addCatalogFactory(dialog.getArchetypeCatalogFactory()); +- } +- })); +- +- final Button editButton = new Button(composite, SWT.NONE); +- editButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); +- editButton.setEnabled(false); +- editButton.setText(Messages.MavenArchetypesPreferencePage_btnEdit); +- editButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { +- ArchetypeCatalogFactory factory = getSelectedArchetypeCatalogFactory(); +- ArchetypeCatalogFactory newFactory = null; +- if(factory instanceof LocalCatalogFactory) { +- LocalArchetypeCatalogDialog dialog = new LocalArchetypeCatalogDialog(getShell(), factory); +- if(dialog.open() == Window.OK) { +- newFactory = dialog.getArchetypeCatalogFactory(); +- } +- } else if(factory instanceof RemoteCatalogFactory) { +- RemoteArchetypeCatalogDialog dialog = new RemoteArchetypeCatalogDialog(getShell(), factory); +- if(dialog.open() == Window.OK) { +- newFactory = dialog.getArchetypeCatalogFactory(); +- } +- } +- if(newFactory != null) { +- int n = archetypeCatalogs.indexOf(factory); +- if(n > -1) { +- archetypeCatalogs.set(n, newFactory); +- archetypesViewer.setInput(archetypeCatalogs); +- archetypesViewer.setSelection(new StructuredSelection(newFactory), true); +- } +- } +- })); +- +- final Button removeButton = new Button(composite, SWT.NONE); +- removeButton.setEnabled(false); +- removeButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, true)); +- removeButton.setText(Messages.MavenArchetypesPreferencePage_btnRemove); +- removeButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { +- ArchetypeCatalogFactory factory = getSelectedArchetypeCatalogFactory(); +- archetypeCatalogs.remove(factory); +- archetypesViewer.setInput(archetypeCatalogs); +- archetypesViewer.setSelection(null, true); +- })); +- +- archetypesViewer.addSelectionChangedListener(event -> { +- if(archetypesViewer.getSelection() instanceof IStructuredSelection) { +- ArchetypeCatalogFactory factory = getSelectedArchetypeCatalogFactory(); +- boolean isEnabled = factory != null && factory.isEditable(); +- removeButton.setEnabled(isEnabled); +- editButton.setEnabled(isEnabled); +- } +- }); +- + archetypesViewer.addCheckStateListener((event) -> { + archetypesViewer.refresh(event.getElement(), true); + }); +@@ -294,18 +214,7 @@ public class MavenArchetypesPreferencePage extends FieldEditorPreferencePage imp + public String getColumnText(Object element, int columnIndex) { + ArchetypeCatalogFactory factory = (ArchetypeCatalogFactory) element; + String description = factory.getDescription(); +- String text; +- if(factory instanceof LocalCatalogFactory) { +- text = NLS.bind(Messages.MavenArchetypesPreferencePage_local, description); +- } else if(factory instanceof RemoteCatalogFactory) { +- if(factory.isEditable()) { +- text = NLS.bind(Messages.MavenArchetypesPreferencePage_remote, description); +- } else { +- text = NLS.bind(Messages.MavenArchetypesPreferencePage_packaged, description); +- } +- } else { +- text = description; +- } ++ String text = description; + + return factory.isEditable() ? text : NLS.bind(Messages.MavenArchetypesPreferencePage_SystemLabel, text); + } +diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java +index 90547dd..bb833c4 100644 +--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java ++++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java +@@ -82,11 +82,13 @@ import org.apache.maven.artifact.Artifact; + import org.apache.maven.artifact.repository.ArtifactRepository; + import org.apache.maven.artifact.versioning.ArtifactVersion; + import org.apache.maven.artifact.versioning.DefaultArtifactVersion; ++import org.apache.maven.project.ProjectBuildingRequest; + + import org.eclipse.m2e.core.MavenPlugin; + import org.eclipse.m2e.core.archetype.ArchetypeUtil; + import org.eclipse.m2e.core.embedder.ArtifactKey; + import org.eclipse.m2e.core.embedder.IMaven; ++import org.eclipse.m2e.core.embedder.IMavenExecutionContext; + import org.eclipse.m2e.core.internal.MavenPluginActivator; + import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory; + import org.eclipse.m2e.core.internal.archetype.ArchetypeManager; +@@ -848,7 +850,11 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp + archetype.setRepository(repositoryUrl); + org.apache.maven.archetype.ArchetypeManager archetyper = MavenPluginActivator.getDefault() + .getArchetypeManager().getArchetyper(); +- archetyper.updateLocalCatalog(archetype); ++ ++ IMavenExecutionContext context = maven.createExecutionContext(); ++ ProjectBuildingRequest buildingReq = context.newProjectBuildingRequest(); ++ ++ archetyper.updateLocalCatalog(buildingReq, archetype); + + archetypesCache.clear(); + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/ExtensionReader.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/ExtensionReader.java +index a7a4fd4..0afbc71 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/ExtensionReader.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/ExtensionReader.java +@@ -13,11 +13,9 @@ + + package org.eclipse.m2e.core.internal; + +-import java.net.URL; + import java.util.ArrayList; + import java.util.List; + +-import org.osgi.framework.Bundle; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + +@@ -84,29 +82,8 @@ public class ExtensionReader { + + private static ArchetypeCatalogFactory readArchetypeCatalogs(IConfigurationElement element, + IContributor contributor) { +- if(ELEMENT_LOCAL_ARCHETYPE.equals(element.getName())) { +- String name = element.getAttribute(ATTR_NAME); +- if(name != null) { +- Bundle[] bundles = Platform.getBundles(contributor.getName(), null); +- URL catalogUrl = null; +- for(int i = 0; i < bundles.length; i++ ) { +- Bundle bundle = bundles[i]; +- catalogUrl = bundle.getEntry(name); +- if(catalogUrl != null) { +- String description = element.getAttribute(ATTR_DESCRIPTION); +- String url = catalogUrl.toString(); +- return new ArchetypeCatalogFactory.LocalCatalogFactory(url, description, false); +- } +- } +- log.error("Unable to find Archetype catalog " + name + " in " + contributor.getName()); +- } +- } else if(ELEMENT_REMOTE_ARCHETYPE.equals(element.getName())) { +- String url = element.getAttribute(ATTR_URL); +- if(url != null) { +- String description = element.getAttribute(ATTR_DESCRIPTION); +- return new ArchetypeCatalogFactory.RemoteCatalogFactory(url, description, false); +- } +- } ++ log.error("Local and remote Archetype catalogs specified by URL from " + contributor.getName() ++ + " are no longer supported"); + return null; + } + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java +index 0f486cd..069e210 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java +@@ -50,8 +50,6 @@ public class Messages extends NLS { + + public static String ArchetypeCatalogFactory_internal; + +- public static String ArchetypeCatalogFactory_local; +- + public static String ArchetypeCatalogFactory_remote; + + public static String ArchetypeCatalogsWriter_error_parse; +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogFactory.java +index 8c82854..3da1f1a 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogFactory.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogFactory.java +@@ -31,10 +31,13 @@ import org.eclipse.osgi.util.NLS; + import org.apache.maven.archetype.ArchetypeManager; + import org.apache.maven.archetype.catalog.Archetype; + import org.apache.maven.archetype.catalog.ArchetypeCatalog; +-import org.apache.maven.archetype.catalog.io.xpp3.ArchetypeCatalogXpp3Reader; + import org.apache.maven.archetype.source.ArchetypeDataSource; + import org.apache.maven.archetype.source.ArchetypeDataSourceException; ++import org.apache.maven.project.ProjectBuildingRequest; + ++import org.eclipse.m2e.core.MavenPlugin; ++import org.eclipse.m2e.core.embedder.IMaven; ++import org.eclipse.m2e.core.embedder.IMavenExecutionContext; + import org.eclipse.m2e.core.internal.IMavenConstants; + import org.eclipse.m2e.core.internal.MavenPluginActivator; + import org.eclipse.m2e.core.internal.Messages; +@@ -107,8 +110,12 @@ public abstract class ArchetypeCatalogFactory { + + public ArchetypeCatalog getArchetypeCatalog() throws CoreException { + try { ++ final IMaven maven = MavenPlugin.getMaven(); ++ IMavenExecutionContext context = maven.createExecutionContext(); ++ ProjectBuildingRequest buildingReq = context.newProjectBuildingRequest(); ++ + ArchetypeDataSource source = MavenPluginActivator.getDefault().getIndexManager().getArchetypeCatalog(); +- return source.getArchetypeCatalog(new Properties()); ++ return source.getArchetypeCatalog(buildingReq); + } catch(ArchetypeDataSourceException ex) { + String msg = NLS.bind(Messages.ArchetypeCatalogFactory_error_missing_catalog, ex.getMessage()); + log.error(msg, ex); +@@ -143,156 +150,11 @@ public abstract class ArchetypeCatalogFactory { + 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) { +- this(path, description, editable, true); +- } +- +- public LocalCatalogFactory(String path, String description, boolean editable, boolean enabled) { +- super(path, description == null || description.trim().length() == 0 +- ? NLS.bind(Messages.ArchetypeCatalogFactory_local, path) +- : description, editable, enabled); +- } +- + public ArchetypeCatalog getArchetypeCatalog() throws CoreException { +- ArchetypeCatalog catalog = getEmbeddedCatalog(); +- if(catalog == null) { +- //local but not embedded catalog +- catalog = getArchetyper().getLocalCatalog(getId()); +- } +- return catalog; +- } +- +- private ArchetypeCatalog getEmbeddedCatalog() throws CoreException { +- URL url = getEmbeddedUrl(); +- if(url == null) { +- //Not an embedded catalog, nothing else to do +- return null; +- } +- try (InputStream is = new BufferedInputStream(url.openStream())) { +- return new ArchetypeCatalogXpp3Reader().read(is); +- } catch(Exception ex) { +- String msg = NLS.bind(Messages.ArchetypeCatalogFactory_error_missing_catalog, ex.getMessage()); +- log.error(msg, ex); +- throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, msg, ex)); +- } +- } +- +- private URL getEmbeddedUrl() { +- String path = getId(); +- if(path != null && path.startsWith("bundleentry://")) { +- try { +- return new URL(path); +- } catch(Exception ex) { +- log.error(ex.getMessage(), ex); +- } +- } +- return null; +- } +- } +- +- /** +- * Factory for remote ArchetypeCatalog +- */ +- public static class RemoteCatalogFactory extends ArchetypeCatalogFactory { +- +- private String repositoryUrl = null; +- +- public RemoteCatalogFactory(String url, String description, boolean editable) { +- this(url, description, editable, true); +- } +- +- public RemoteCatalogFactory(String url, String description, boolean editable, boolean enabled) { +- super(url, description == null || description.trim().length() == 0 +- ? NLS.bind(Messages.ArchetypeCatalogFactory_remote, url) +- : description, editable, enabled); +- 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() { +- String url = getId(); +- int idx = url.lastIndexOf("/archetype-catalog.xml"); +- if(idx > -1) { +- url = url.substring(0, idx); +- } +- final ArchetypeCatalog catalog = getArchetyper().getRemoteCatalog(url); +- final String remoteUrl = url; +- @SuppressWarnings("serial") +- ArchetypeCatalog catalogWrapper = new ArchetypeCatalog() { +- public void addArchetype(Archetype archetype) { +- catalog.addArchetype(archetype); +- } +- +- public List getArchetypes() { +- List archetypes = new ArrayList<>(catalog.getArchetypes()); +- for(Archetype arch : archetypes) { +- if(arch.getRepository() == null || arch.getRepository().trim().isEmpty()) { +- arch.setRepository(remoteUrl); +- } +- } +- return archetypes; +- } +- +- public String getModelEncoding() { +- return catalog.getModelEncoding(); +- } +- +- public void removeArchetype(Archetype archetype) { +- catalog.removeArchetype(archetype); +- } +- +- public void setModelEncoding(String modelEncoding) { +- catalog.setModelEncoding(modelEncoding); +- } +- +- public void setArchetypes(List archetypes) { +- catalog.setArchetypes(archetypes); +- } +- +- public String toString() { +- return catalog.toString(); +- } +- }; +- +- return catalogWrapper; +- } +- +- /** +- * @return the url of the remote repository hosting the catalog +- */ +- public String getRepositoryUrl() { +- return repositoryUrl; ++ final IMaven maven = MavenPlugin.getMaven(); ++ IMavenExecutionContext context = maven.createExecutionContext(); ++ ProjectBuildingRequest buildingReq = context.newProjectBuildingRequest(); ++ return getArchetyper().getLocalCatalog(buildingReq); + } + } + +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogsWriter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogsWriter.java +index 2adb946..31ef580 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogsWriter.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeCatalogsWriter.java +@@ -45,8 +45,6 @@ import org.xml.sax.helpers.XMLFilterImpl; + import org.eclipse.osgi.util.NLS; + + import org.eclipse.m2e.core.internal.Messages; +-import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory.LocalCatalogFactory; +-import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory; + + + /** +@@ -63,14 +61,8 @@ public class ArchetypeCatalogsWriter { + + 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$ +- + private static final String TYPE_SYSTEM = "system"; //$NON-NLS-1$ + + public static final String ATT_CATALOG_ID = "id"; +@@ -127,20 +119,8 @@ public class ArchetypeCatalogsWriter { + + for(ArchetypeCatalogFactory factory : this.catalogs) { + AttributesImpl attrs = new AttributesImpl(); +- if(factory.isEditable()) { +- if(factory instanceof LocalCatalogFactory) { +- 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()); +- } else if(factory instanceof RemoteCatalogFactory) { +- 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()); +- } +- } else { +- attrs.addAttribute(null, ATT_CATALOG_TYPE, ATT_CATALOG_TYPE, null, TYPE_SYSTEM); +- attrs.addAttribute(null, ATT_CATALOG_ID, ATT_CATALOG_ID, null, factory.getId()); +- } ++ attrs.addAttribute(null, ATT_CATALOG_TYPE, ATT_CATALOG_TYPE, null, TYPE_SYSTEM); ++ attrs.addAttribute(null, ATT_CATALOG_ID, ATT_CATALOG_ID, null, factory.getId()); + attrs.addAttribute(null, ATT_CATALOG_ENABLED, ATT_CATALOG_ENABLED, null, Boolean.toString(factory.isEnabled())); + handler.startElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG, attrs); + handler.endElement(null, ELEMENT_CATALOG, ELEMENT_CATALOG); +@@ -165,28 +145,13 @@ public class ArchetypeCatalogsWriter { + + 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); + String enabledStr = attributes.getValue(ATT_CATALOG_ENABLED); + boolean enabled = enabledStr==null||Boolean.parseBoolean(enabledStr); +- 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, enabled)); +- } +- } 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, enabled)); +- } +- } else { +- String id = attributes.getValue(ATT_CATALOG_ID); +- if(id != null && !id.isEmpty()) { +- ArchetypeCatalogFactory catalog = existingCatalogs.get(id); +- if(catalog != null) { +- catalog.setEnabled(enabled); +- } ++ String id = attributes.getValue(ATT_CATALOG_ID); ++ if(id != null && !id.isEmpty()) { ++ ArchetypeCatalogFactory catalog = existingCatalogs.get(id); ++ if(catalog != null) { ++ catalog.setEnabled(enabled); + } + } + } +diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeManager.java +index d14614f..c98dead 100644 +--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeManager.java ++++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/archetype/ArchetypeManager.java +@@ -180,11 +180,12 @@ public class ArchetypeManager { + try { + return maven.execute((context, monitor1) -> { + ArtifactRepository localRepository = context.getLocalRepository(); +- if(aaMgr.isFileSetArchetype(groupId, artifactId, version, null, localRepository, repositories)) { ++ if(aaMgr.isFileSetArchetype(groupId, artifactId, version, null, localRepository, repositories, ++ context.newProjectBuildingRequest())) { + ArchetypeDescriptor descriptor; + try { + descriptor = aaMgr.getFileSetArchetypeDescriptor(groupId, artifactId, version, null, localRepository, +- repositories); ++ repositories, context.newProjectBuildingRequest()); + } catch(UnknownArchetype ex) { + throw new WrappedUnknownArchetype(ex); + } +-- +2.26.0.rc2 + diff --git a/eclipse-m2e-core-LifecycleMappingFactory.patch b/eclipse-m2e-core-LifecycleMappingFactory.patch deleted file mode 100644 index 1e399eb..0000000 --- a/eclipse-m2e-core-LifecycleMappingFactory.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java -@@ -687,12 +687,12 @@ public class LifecycleMappingFactory { - List result = new ArrayList(); - all_metadatas: for(PluginExecutionMetadata metadata : metadatas) { - @SuppressWarnings("unchecked") -- Map parameters = metadata.getFilter().getParameters(); -+ Map parameters = metadata.getFilter().getParameters(); - if(!parameters.isEmpty()) { -- for(String name : parameters.keySet()) { -- String value = parameters.get(name); -+ for(Object name : parameters.keySet()) { -+ String value = (String)parameters.get(name); - MojoExecution setupExecution = maven.setupMojoExecution(mavenProject, execution, monitor); -- if(!eq(value, maven.getMojoParameterValue(mavenProject, setupExecution, name, String.class, monitor))) { -+ if(!eq(value, maven.getMojoParameterValue(mavenProject, setupExecution, (String)name, String.class, monitor))) { - continue all_metadatas; - } - } diff --git a/eclipse-m2e-core-fix-manifests.patch b/eclipse-m2e-core-fix-manifests.patch deleted file mode 100644 index f9bd72a..0000000 --- a/eclipse-m2e-core-fix-manifests.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF -+++ org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF -@@ -36,7 +36,9 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[1.6.0,1.7.0)", - org.eclipse.core.expressions;bundle-version="3.4.101", - org.eclipse.ui.forms;bundle-version="3.4.1", - org.eclipse.jface.text, -- org.eclipse.ui -+ org.eclipse.ui, -+ org.apache.maven.archetype.catalog, -+ org.apache.maven.archetype.descriptor - Import-Package: org.eclipse.compare.rangedifferencer, - org.eclipse.ltk.core.refactoring, - org.slf4j;version="1.6.2" ---- org.eclipse.m2e.core/META-INF/MANIFEST.MF.orig 2018-06-20 17:01:37.051314551 +0100 -+++ org.eclipse.m2e.core/META-INF/MANIFEST.MF 2018-06-20 17:03:16.779998408 +0100 -@@ -13,9 +13,10 @@ - org.eclipse.m2e.workspace.cli;bundle-version="0.1.0", - org.eclipse.core.runtime;bundle-version="3.12.0", - org.eclipse.core.resources;bundle-version="3.9.0", -- com.google.guava;bundle-version="[21.0,22.0)" -+ org.apache.maven.archetype.catalog, -+ org.apache.maven.archetype.descriptor, -+ com.google.guava;bundle-version="[18.0,21.0)" - Bundle-ActivationPolicy: lazy --Bundle-ClassPath: . - Bundle-RequiredExecutionEnvironment: JavaSE-1.8 - Export-Package: org.eclipse.m2e.core, - org.eclipse.m2e.core.archetype;x-friends:="org.eclipse.m2e.core.ui", ---- org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF.orig 2018-06-20 17:03:28.068962622 +0100 -+++ org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF 2018-06-20 17:03:41.050921469 +0100 -@@ -22,7 +22,7 @@ - org.eclipse.ui.ide, - org.eclipse.core.filesystem, - org.eclipse.ui.forms, -- com.google.guava;bundle-version="[21.0,22.0)" -+ com.google.guava;bundle-version="[18.0,21.0)" - Export-Package: org.eclipse.m2e.editor.xml;x-internal:=true, - org.eclipse.m2e.editor.xml.internal;x-internal:=true, - org.eclipse.m2e.editor.xml.internal.lifecycle;x-internal:=true, ---- org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF.orig 2018-06-20 17:45:06.045000839 +0100 -+++ org.eclipse.m2e.sourcelookup/META-INF/MANIFEST.MF 2018-06-20 17:46:00.735826625 +0100 -@@ -15,7 +15,7 @@ - org.eclipse.core.expressions;bundle-version="3.4.400", - org.eclipse.debug.ui;bundle-version="3.10.0", - org.eclipse.core.resources, -- com.google.guava;bundle-version="15.0.0", -+ com.google.guava;bundle-version="[18.0.0,21.0.0)", - com.google.gson;bundle-version="2.2.4", - org.eclipse.core.variables;bundle-version="3.2.0" - Import-Package: org.slf4j;version="1.6.2" diff --git a/eclipse-m2e-core-indexer-5.1.1.patch b/eclipse-m2e-core-indexer-5.1.1.patch deleted file mode 100644 index ecf3647..0000000 --- a/eclipse-m2e-core-indexer-5.1.1.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff --git m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml -index af8200b..d97e974 100644 ---- m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml -+++ m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml -@@ -23,7 +23,7 @@ - - org.apache.maven.indexer - indexer-core -- 3.1.0 -+ 5.1.1 - true - - -diff --git m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java -index 4b155c1..f34b300 100644 ---- m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java -+++ m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java -@@ -128,13 +128,15 @@ public class DefaultIndexerEngine - { - try - { -- IndexSearcher indexSearcher = context.getIndexSearcher(); -+ IndexSearcher indexSearcher = context.acquireIndexSearcher(); - 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 ); -+ Document doc = indexSearcher.doc( result.scoreDocs[0].doc ); -+ context.releaseIndexSearcher( indexSearcher ); -+ return doc; - } - } - catch ( IOException e ) -diff --git org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java -index 6f167dd..9b072ef 100644 ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/AetherClientResourceFetcher.java -@@ -31,7 +31,7 @@ - import org.eclipse.core.runtime.NullProgressMonitor; - import org.eclipse.core.runtime.OperationCanceledException; - --import org.apache.maven.index.updater.AbstractResourceFetcher; -+import org.apache.maven.index.updater.ResourceFetcher; - import org.apache.maven.wagon.authentication.AuthenticationInfo; - import org.apache.maven.wagon.proxy.ProxyInfo; - -@@ -46,7 +46,7 @@ - import io.takari.aether.okhttp.OkHttpAetherClient; - - --public class AetherClientResourceFetcher extends AbstractResourceFetcher { -+public class AetherClientResourceFetcher implements ResourceFetcher { - - private AetherClient aetherClient; - -@@ -94,6 +94,13 @@ - } - } - -+ public InputStream retrieve(String name) throws IOException, FileNotFoundException { -+ String url = baseUrl + "/" + name; -+ Response response = aetherClient.get(url); -+ -+ return response.getInputStream(); -+ } -+ - class AetherClientConfigAdapter extends AetherClientConfig { - private final Logger log = LoggerFactory.getLogger(AetherClientConfigAdapter.class); - -diff --git org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java -index 9686315..ab8c7c9 100644 ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java -@@ -69,7 +69,6 @@ import org.apache.maven.index.MAVEN; - import org.apache.maven.index.NexusIndexer; - import org.apache.maven.index.SearchType; - import org.apache.maven.index.artifact.Gav; --import org.apache.maven.index.artifact.IllegalArtifactCoordinateException; - import org.apache.maven.index.context.IndexCreator; - import org.apache.maven.index.context.IndexingContext; - import org.apache.maven.index.creator.JarFileContentsIndexCreator; -@@ -239,9 +238,10 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - } - - synchronized(getIndexLock(repository)) { -- ArtifactInfo artifactInfo = getIndexer().identify(query, Collections.singleton(getIndexingContext(repository))); -- if(artifactInfo != null) { -- return getIndexedArtifactFile(artifactInfo); -+ Collection artifactInfo = getIndexer().identify(query, -+ Collections.singleton(getIndexingContext(repository))); -+ if(artifactInfo != null && !artifactInfo.isEmpty()) { -+ return getIndexedArtifactFile((ArtifactInfo) artifactInfo.toArray()[0]); - } - } - } catch(Exception ex) { -@@ -282,8 +282,9 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - - public IndexedArtifactFile identify(File file) throws CoreException { - try { -- ArtifactInfo artifactInfo = getIndexer().identify(file); -- return artifactInfo == null ? null : getIndexedArtifactFile(artifactInfo); -+ Collection artifactInfo = getIndexer().identify(file); -+ return artifactInfo == null || artifactInfo.isEmpty() ? null -+ : getIndexedArtifactFile((ArtifactInfo) artifactInfo.toArray()[0]); - } catch(IOException ex) { - throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, - Messages.NexusIndexManager_error_search, ex)); -@@ -626,13 +627,11 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - fireIndexChanged(repository); - } - -- private ArtifactContext getArtifactContext(File file, IndexingContext context) -- throws IllegalArtifactCoordinateException { -+ private ArtifactContext getArtifactContext(File file, IndexingContext context) { - return getArtifactContextProducer().getArtifactContext(context, file); - } - -- private ArtifactContext getWorkspaceArtifactContext(IMavenProjectFacade facade, IndexingContext context) -- throws CoreException { -+ private ArtifactContext getWorkspaceArtifactContext(IMavenProjectFacade facade, IndexingContext context) { - IRepository workspaceRepository = repositoryRegistry.getWorkspaceRepository(); - ArtifactKey key = facade.getArtifactKey(); - ArtifactInfo ai = new ArtifactInfo(workspaceRepository.getUid(), key.getGroupId(), key.getArtifactId(), -@@ -640,13 +639,8 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - ai.packaging = facade.getPackaging(); - File pomFile = facade.getPomFile(); - File artifactFile = (pomFile != null) ? pomFile.getParentFile() : null; -- try { -- Gav gav = new Gav(key.getGroupId(), key.getArtifactId(), key.getVersion()); -- return new ArtifactContext(pomFile, artifactFile, null, ai, gav); -- } catch(IllegalArtifactCoordinateException ex) { -- throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, -- Messages.NexusIndexManager_error_unexpected, ex)); -- } -+ Gav gav = new Gav(key.getGroupId(), key.getArtifactId(), key.getVersion()); -+ return new ArtifactContext(pomFile, artifactFile, null, ai, gav); - } - - protected void scheduleIndexUpdate(final IRepository repository, final boolean force) { -@@ -843,7 +837,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - } - - protected Directory getIndexDirectory(IRepository repository) throws IOException { -- return FSDirectory.getDirectory(getIndexDirectoryFile(repository)); -+ return FSDirectory.open(getIndexDirectoryFile(repository)); - } - - public IndexedArtifactGroup resolveGroup(IndexedArtifactGroup group) { -@@ -1132,7 +1126,7 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - String details = getIndexDetails(repository); - String id = repository.getUid() + "-cache"; //$NON-NLS-1$ - File luceneCache = new File(request.getLocalIndexCacheDir(), details); -- Directory directory = FSDirectory.getDirectory(luceneCache); -+ Directory directory = FSDirectory.open(luceneCache); - IndexingContext cacheCtx = getIndexer().addIndexingContextForced(id, id, null, directory, null, null, - getIndexers(details)); - request = newIndexUpdateRequest(repository, cacheCtx, monitor); -@@ -1276,7 +1270,8 @@ public class NexusIndexManager implements IndexManager, IMavenProjectChangedList - - Query q = getIndexer().constructQuery(MAVEN.SHA1, encode(digest), SearchType.EXACT); - -- return getIndexer().identify(q, contexts); -+ Collection result = getIndexer().identify(q, contexts); -+ return result == null || result.isEmpty() ? null : (ArtifactInfo) result.toArray()[0]; - - } catch(NoSuchAlgorithmException ex) { - throw new IOException("Unable to calculate digest"); diff --git a/eclipse-m2e-core-jetty.patch b/eclipse-m2e-core-jetty.patch deleted file mode 100644 index 589beec..0000000 --- a/eclipse-m2e-core-jetty.patch +++ /dev/null @@ -1,332 +0,0 @@ -diff --git org.eclipse.m2e.tests.common/META-INF/MANIFEST.MF org.eclipse.m2e.tests.common/META-INF/MANIFEST.MF -index a1500e2..de30383 100644 ---- org.eclipse.m2e.tests.common/META-INF/MANIFEST.MF -+++ org.eclipse.m2e.tests.common/META-INF/MANIFEST.MF -@@ -11,14 +11,17 @@ Require-Bundle: org.junit;bundle-version="4.0.0", - org.eclipse.core.runtime, - org.eclipse.jdt.core, - org.eclipse.debug.core, -- org.eclipse.core.resources -+ org.eclipse.core.resources, -+ org.eclipse.jetty.server, -+ org.eclipse.jetty.util, -+ org.eclipse.jetty.http, -+ org.eclipse.jetty.security, -+ org.eclipse.jetty.io - Bundle-ActivationPolicy: lazy - Bundle-RequiredExecutionEnvironment: JavaSE-1.8 --Bundle-ClassPath: ., -- jars/javax.servlet_2.5.0.v201103041518.jar, -- jars/org.mortbay.jetty.server_6.1.23.v201012071420.jar, -- jars/org.mortbay.jetty.util_6.1.23.v201012071420.jar - Bundle-Vendor: %Bundle-Vendor - MavenArtifact-GroupId: org.eclipse.m2e - MavenArtifact-ArtifactId: org.eclipse.m2e.tests.common - Export-Package: org.eclipse.m2e.tests.common;x-internal:=true -+Import-Package: javax.servlet;version="3.1.0", -+ javax.servlet.http;version="3.1.0" -diff --git org.eclipse.m2e.tests.common/build.properties org.eclipse.m2e.tests.common/build.properties -index 51bead7..3873d38 100644 ---- org.eclipse.m2e.tests.common/build.properties -+++ org.eclipse.m2e.tests.common/build.properties -@@ -14,6 +14,5 @@ output.. = target/classes/ - bin.includes = META-INF/,\ - .,\ - about.html,\ -- jars/,\ - OSGI-INF/ - src.includes = about.html -diff --git org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/HttpServer.java org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/HttpServer.java -index 5851e7e..4205804 100644 ---- org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/HttpServer.java -+++ org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/HttpServer.java -@@ -11,6 +11,8 @@ - - package org.eclipse.m2e.tests.common; - -+import static org.junit.Assert.fail; -+ - import java.io.File; - import java.io.FileInputStream; - import java.io.FileOutputStream; -@@ -23,28 +25,36 @@ import java.util.HashMap; - import java.util.HashSet; - import java.util.List; - import java.util.Map; -+import java.util.Properties; - import java.util.TreeMap; - - import javax.servlet.http.HttpServletRequest; - import javax.servlet.http.HttpServletResponse; - --import org.mortbay.jetty.Connector; --import org.mortbay.jetty.Handler; --import org.mortbay.jetty.HttpMethods; --import org.mortbay.jetty.Request; --import org.mortbay.jetty.Server; --import org.mortbay.jetty.handler.AbstractHandler; --import org.mortbay.jetty.handler.DefaultHandler; --import org.mortbay.jetty.handler.HandlerList; --import org.mortbay.jetty.nio.SelectChannelConnector; --import org.mortbay.jetty.security.B64Code; --import org.mortbay.jetty.security.Constraint; --import org.mortbay.jetty.security.ConstraintMapping; --import org.mortbay.jetty.security.HashUserRealm; --import org.mortbay.jetty.security.SecurityHandler; --import org.mortbay.jetty.security.SslSocketConnector; --import org.mortbay.util.IO; --import org.mortbay.util.URIUtil; -+import org.eclipse.jetty.http.HttpMethod; -+import org.eclipse.jetty.http.HttpVersion; -+import org.eclipse.jetty.security.ConstraintMapping; -+import org.eclipse.jetty.security.ConstraintSecurityHandler; -+import org.eclipse.jetty.security.HashLoginService; -+import org.eclipse.jetty.security.SecurityHandler; -+import org.eclipse.jetty.security.authentication.BasicAuthenticator; -+import org.eclipse.jetty.server.Connector; -+import org.eclipse.jetty.server.Handler; -+import org.eclipse.jetty.server.HttpConfiguration; -+import org.eclipse.jetty.server.HttpConnectionFactory; -+import org.eclipse.jetty.server.NetworkConnector; -+import org.eclipse.jetty.server.Request; -+import org.eclipse.jetty.server.Server; -+import org.eclipse.jetty.server.ServerConnector; -+import org.eclipse.jetty.server.SslConnectionFactory; -+import org.eclipse.jetty.server.handler.AbstractHandler; -+import org.eclipse.jetty.server.handler.DefaultHandler; -+import org.eclipse.jetty.server.handler.HandlerList; -+import org.eclipse.jetty.util.B64Code; -+import org.eclipse.jetty.util.IO; -+import org.eclipse.jetty.util.URIUtil; -+import org.eclipse.jetty.util.security.Constraint; -+import org.eclipse.jetty.util.ssl.SslContextFactory; - - - /** -@@ -101,24 +111,29 @@ public class HttpServer { - private String storePassword; - - protected Connector newHttpConnector() { -- SelectChannelConnector connector = new SelectChannelConnector(); -+ HttpConfiguration config = new HttpConfiguration(); -+ config.setSecurePort(httpsPort); -+ ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(config)); - connector.setPort(httpPort); - return connector; - } - - protected Connector newHttpsConnector() { -- SslSocketConnector connector = new SslSocketConnector(); -- connector.setPort(httpsPort); -- connector.setKeystore(new File(keyStoreLocation).getAbsolutePath()); -- connector.setPassword(storePassword); -- connector.setKeyPassword(keyStorePassword); -+ SslContextFactory sslContextFactory = new SslContextFactory(); -+ sslContextFactory.setKeyManagerPassword(storePassword); -+ sslContextFactory.setKeyStorePath(new File(keyStoreLocation).getAbsolutePath()); -+ sslContextFactory.setKeyStorePassword(keyStorePassword); - if(trustStoreLocation != null && !trustStoreLocation.equals("")) { -- connector.setTruststore(new File(trustStoreLocation).getAbsolutePath()); -+ sslContextFactory.setTrustStorePath(new File(trustStoreLocation).getAbsolutePath()); - } - if(trustStorePassword != null && !trustStoreLocation.equals("")) { -- connector.setTrustPassword(trustStorePassword); -+ sslContextFactory.setTrustStorePassword(trustStorePassword); - } -- connector.setNeedClientAuth(needClientAuth); -+ sslContextFactory.setNeedClientAuth(needClientAuth); -+ -+ ServerConnector connector = new ServerConnector(server, -+ new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString())); -+ connector.setPort(httpsPort); - return connector; - } - -@@ -142,7 +157,7 @@ public class HttpServer { - */ - public int getHttpPort() { - if(httpPort >= 0 && server != null && server.isRunning()) { -- return server.getConnectors()[0].getLocalPort(); -+ return ((NetworkConnector) server.getConnectors()[0]).getLocalPort(); - } - return httpPort; - } -@@ -176,7 +191,7 @@ public class HttpServer { - */ - public int getHttpsPort() { - if(httpsPort >= 0 && server != null && server.isRunning()) { -- return server.getConnectors()[(httpPort < 0) ? 0 : 1].getLocalPort(); -+ return ((NetworkConnector) server.getConnectors()[(httpPort < 0) ? 0 : 1]).getLocalPort(); - } - return httpsPort; - } -@@ -260,12 +275,13 @@ public class HttpServer { - - protected Handler newProxyHandler() { - return new AbstractHandler() { -- public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) -+ @Override -+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) - throws IOException { - String auth = request.getHeader("Proxy-Authorization"); - if(auth != null) { - auth = auth.substring(auth.indexOf(' ') + 1).trim(); -- auth = B64Code.decode(auth); -+ auth = new String(B64Code.decode(auth)); - } - - if(!(proxyUsername + ':' + proxyPassword).equals(auth)) { -@@ -293,8 +309,8 @@ public class HttpServer { - - protected Handler newSslRedirectHandler() { - return new AbstractHandler() { -- -- public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) { -+ @Override -+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) { - int httpsPort = getHttpsPort(); - if(!((Request) request).isHandled() && request.getServerPort() != httpsPort) { - String url = "https://" + request.getServerName() + ":" + httpsPort + request.getRequestURI(); -@@ -336,7 +352,7 @@ public class HttpServer { - return this; - } - -- protected Handler newSecurityHandler() { -+ protected SecurityHandler newSecurityHandler() { - List mappings = new ArrayList(); - - for(String pathSpec : securedRealms.keySet()) { -@@ -354,22 +370,32 @@ public class HttpServer { - mappings.add(constraintMapping); - } - -- HashUserRealm userRealm = new HashUserRealm("TestRealm"); -+ Properties p = new Properties(); - for(String username : userPasswords.keySet()) { - String password = userPasswords.get(username); - String[] roles = userRoles.get(username); - -- userRealm.put(username, password); -- if(roles != null) { -- for(String role : roles) { -- userRealm.addUserToRole(username, role); -- } -+ StringBuilder entry = new StringBuilder(password); -+ for(String role : roles) { -+ entry.append(","); -+ entry.append(role); - } -+ p.put(username, entry.toString()); -+ } -+ File propFile = new File("target/users.properties"); -+ try (FileOutputStream in = new FileOutputStream(propFile)) { -+ p.store(in, null); -+ } catch(IOException ex) { -+ fail("Unable to create users properties file"); - } - -- SecurityHandler securityHandler = new SecurityHandler(); -- securityHandler.setUserRealm(userRealm); -- securityHandler.setConstraintMappings(mappings.toArray(new ConstraintMapping[mappings.size()])); -+ HashLoginService userRealm = new HashLoginService("TestRealm", "target/users.properties"); -+ server.addBean(userRealm); -+ -+ ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler(); -+ securityHandler.setAuthenticator(new BasicAuthenticator()); -+ securityHandler.setLoginService(userRealm); -+ securityHandler.setConstraintMappings(mappings); - - return securityHandler; - } -@@ -470,8 +496,8 @@ public class HttpServer { - - protected Handler newSleepHandler(final long millis) { - return new AbstractHandler() { -- -- public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) { -+ @Override -+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) { - if(millis >= 0) { - try { - Thread.sleep(millis); -@@ -505,6 +531,8 @@ public class HttpServer { - - recordedRequests.clear(); - -+ server = new Server(); -+ - List connectors = new ArrayList(); - if(httpPort >= 0) { - connectors.add(newHttpConnector()); -@@ -526,15 +554,20 @@ public class HttpServer { - if(proxyUsername != null && proxyPassword != null) { - handlerList.addHandler(newProxyHandler()); - } -+ SecurityHandler security = null; - if(!securedRealms.isEmpty()) { -- handlerList.addHandler(newSecurityHandler()); -+ security = newSecurityHandler(); -+ handlerList.addHandler(security); - } - if(!resourceDirs.isEmpty()) { -- handlerList.addHandler(newResourceHandler()); -+ if(security != null) { -+ security.setHandler(newResourceHandler()); -+ } else { -+ handlerList.addHandler(newResourceHandler()); -+ } - } - handlerList.addHandler(new DefaultHandler()); - -- server = new Server(0); - server.setHandler(handlerList); - server.setConnectors(connectors.toArray(new Connector[connectors.size()])); - server.start(); -@@ -556,7 +589,7 @@ public class HttpServer { - for(int i = 200; i > 0; i-- ) { - badConnectors.clear(); - for(Connector connector : server.getConnectors()) { -- if(connector.getLocalPort() < 0) { -+ if(((NetworkConnector) connector).getLocalPort() < 0) { - badConnectors.add(connector); - } - } -@@ -620,8 +653,8 @@ public class HttpServer { - } - - class ResHandler extends AbstractHandler { -- -- public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) -+ @Override -+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) - throws IOException { - String uri = request.getRequestURI(); - -@@ -631,14 +664,14 @@ public class HttpServer { - File basedir = resourceDirs.get(contextRoot); - File file = new File(basedir, path); - -- if(HttpMethods.HEAD.equals(request.getMethod())) { -+ if(HttpMethod.HEAD.equals(request.getMethod())) { - if(file.exists()) - response.setStatus(HttpServletResponse.SC_OK); - else - response.setStatus(HttpServletResponse.SC_NOT_FOUND); - ((Request) request).setHandled(true); - return; -- } else if(HttpMethods.PUT.equals(request.getMethod()) || HttpMethods.POST.equals(request.getMethod())) { -+ } else if(HttpMethod.PUT.equals(request.getMethod()) || HttpMethod.POST.equals(request.getMethod())) { - file.getParentFile().mkdirs(); - FileOutputStream os = new FileOutputStream(file); - try { -@@ -704,8 +737,8 @@ public class HttpServer { - } - - class RecordingHandler extends AbstractHandler { -- -- public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) { -+ @Override -+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) { - String uri = request.getRequestURI(); - - for(String pattern : recordedPatterns) { diff --git a/eclipse-m2e-core-lucene-5.patch b/eclipse-m2e-core-lucene-5.patch deleted file mode 100644 index fe690c1..0000000 --- a/eclipse-m2e-core-lucene-5.patch +++ /dev/null @@ -1,205 +0,0 @@ ---- m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java -+++ m2e-maven-runtime/org.eclipse.m2e.maven.indexer/src/main/java/org/apache/maven/index/DefaultIndexerEngine.java -@@ -25,7 +25,9 @@ import java.util.Set; - - import org.apache.lucene.document.Document; - import org.apache.lucene.document.Field; --import org.apache.lucene.document.Fieldable; -+import org.apache.lucene.document.StringField; -+import org.apache.lucene.index.IndexableField; -+import org.apache.lucene.index.IndexableFieldType; - import org.apache.lucene.index.IndexWriter; - import org.apache.lucene.index.Term; - import org.apache.lucene.search.IndexSearcher; -@@ -112,10 +113,9 @@ public class DefaultIndexerEngine - { - final HashMap result = new HashMap(); - -- for ( Object o : d.getFields() ) -+ for ( IndexableField f : d.getFields() ) - { -- Fieldable f = (Fieldable) o; -- if ( f.isStored() ) -+ if ( f.fieldType().stored() ) - { - result.put( f.name(), f.stringValue() ); - } -@@ -172,9 +172,9 @@ - String uinfo = ac.getArtifactInfo().getUinfo(); - // add artifact deletion marker - Document doc = new Document(); -- doc.add( new Field( ArtifactInfo.DELETED, uinfo, Field.Store.YES, Field.Index.NO ) ); -- doc.add( new Field( ArtifactInfo.LAST_MODIFIED, // -- Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) ); -+ 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 ) ); ---- org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java -+++ org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java -@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Control; - import org.eclipse.swt.widgets.Text; - import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter; - --import org.apache.lucene.queryParser.QueryParser; -+import org.apache.lucene.queryparser.classic.QueryParser; - - import org.apache.maven.project.MavenProject; - ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java.orig 2017-06-28 00:02:40.142038423 +0100 -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndex.java 2017-06-28 00:08:18.822265593 +0100 -@@ -105,7 +105,7 @@ - public Collection find(Collection groupId, - Collection artifactId, Collection version, - Collection packaging) throws CoreException { -- BooleanQuery query = new BooleanQuery(); -+ BooleanQuery.Builder query = new BooleanQuery.Builder(); - - addQueryFromSearchExpressionCollection(query, MAVEN.PACKAGING, packaging); - -@@ -115,18 +115,18 @@ - - addQueryFromSearchExpressionCollection(query, MAVEN.VERSION, version); - -- return indexManager.search(repository, query).values(); -+ return indexManager.search(repository, query.build()).values(); - } - -- private void addQueryFromSearchExpressionCollection(final BooleanQuery query, final Field field, -+ private void addQueryFromSearchExpressionCollection(final BooleanQuery.Builder query, final Field field, - final Collection sec) { - if(sec != null && !sec.isEmpty()) { - if(sec.size() > 1) { -- BooleanQuery q = new BooleanQuery(); -+ BooleanQuery.Builder q = new BooleanQuery.Builder(); - for(SearchExpression se : sec) { - q.add(indexManager.constructQuery(field, se), Occur.SHOULD); - } -- query.add(q, Occur.MUST); -+ query.add(q.build(), Occur.MUST); - } else { - query.add(indexManager.constructQuery(field, sec.iterator().next()), Occur.MUST); - } ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java.orig 2017-06-28 00:40:07.535993939 +0100 -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java 2017-06-28 00:46:54.056462138 +0100 -@@ -52,9 +52,7 @@ - import org.apache.lucene.search.BooleanClause; - import org.apache.lucene.search.BooleanClause.Occur; - import org.apache.lucene.search.BooleanQuery; --import org.apache.lucene.search.FilteredQuery; - import org.apache.lucene.search.Query; --import org.apache.lucene.search.QueryWrapperFilter; - import org.apache.lucene.store.Directory; - import org.apache.lucene.store.FSDirectory; - -@@ -228,7 +226,7 @@ - public IndexedArtifactFile getIndexedArtifactFile(IRepository repository, ArtifactKey gav) throws CoreException { - - try { -- BooleanQuery query = new BooleanQuery(); -+ BooleanQuery.Builder query = new BooleanQuery.Builder(); - query.add(constructQuery(MAVEN.GROUP_ID, gav.getGroupId(), SearchType.EXACT), BooleanClause.Occur.MUST); - query.add(constructQuery(MAVEN.ARTIFACT_ID, gav.getArtifactId(), SearchType.EXACT), BooleanClause.Occur.MUST); - query.add(constructQuery(MAVEN.VERSION, gav.getVersion(), SearchType.EXACT), BooleanClause.Occur.MUST); -@@ -238,7 +236,7 @@ - } - - synchronized(getIndexLock(repository)) { -- Collection artifactInfo = getIndexer().identify(query, -+ Collection artifactInfo = getIndexer().identify(query.build(), - Collections.singleton(getIndexingContext(repository))); - if(artifactInfo != null && !artifactInfo.isEmpty()) { - return getIndexedArtifactFile((ArtifactInfo) artifactInfo.toArray()[0]); -@@ -342,7 +340,7 @@ - return search(null, term, type, classifier); - } - -- private void addClassifiersToQuery(BooleanQuery bq, int classifier) { -+ private void addClassifiersToQuery(BooleanQuery.Builder bq, int classifier) { - boolean includeJavaDocs = (classifier & IIndex.SEARCH_JAVADOCS) > 0; - Query tq = null; - if(!includeJavaDocs) { -@@ -373,46 +371,55 @@ - // query = new TermQuery(new Term(ArtifactInfo.GROUP_ID, term)); - // query = new PrefixQuery(new Term(ArtifactInfo.GROUP_ID, term)); - } else if(IIndex.SEARCH_ARTIFACT.equals(type)) { -- BooleanQuery bq = new BooleanQuery(); -+ BooleanQuery.Builder bq = new BooleanQuery.Builder(); - bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add( - constructQuery(MAVEN.SHA1, term.getStringValue(), term.getStringValue().length() == 40 ? SearchType.EXACT - : SearchType.SCORED), Occur.SHOULD); - addClassifiersToQuery(bq, classifier); -- query = bq; -+ query = bq.build(); - - } else if(IIndex.SEARCH_PARENTS.equals(type)) { - if(term == null) { - query = constructQuery(MAVEN.PACKAGING, "pom", SearchType.EXACT); //$NON-NLS-1$ - } else { -- BooleanQuery bq = new BooleanQuery(); -+ BooleanQuery.Builder bq = new BooleanQuery.Builder(); - bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add( - constructQuery(MAVEN.SHA1, term.getStringValue(), term.getStringValue().length() == 40 ? SearchType.EXACT - : SearchType.SCORED), Occur.SHOULD); - Query tq = constructQuery(MAVEN.PACKAGING, "pom", SearchType.EXACT); //$NON-NLS-1$ -- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); -+ BooleanQuery.Builder builder = new BooleanQuery.Builder(); -+ builder.add(bq.build(), Occur.MUST); -+ builder.add(tq, Occur.FILTER); -+ query = builder.build(); - } - - } else if(IIndex.SEARCH_PLUGIN.equals(type)) { - if(term == null) { - query = constructQuery(MAVEN.PACKAGING, "maven-plugin", SearchType.EXACT); //$NON-NLS-1$ - } else { -- BooleanQuery bq = new BooleanQuery(); -+ BooleanQuery.Builder bq = new BooleanQuery.Builder(); - bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ - Query tq = constructQuery(MAVEN.PACKAGING, "maven-plugin", SearchType.EXACT); //$NON-NLS-1$ -- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); -+ BooleanQuery.Builder builder = new BooleanQuery.Builder(); -+ builder.add(bq.build(), Occur.MUST); -+ builder.add(tq, Occur.FILTER); -+ query = builder.build(); - } - - } else if(IIndex.SEARCH_ARCHETYPE.equals(type)) { -- BooleanQuery bq = new BooleanQuery(); -+ BooleanQuery.Builder bq = new BooleanQuery.Builder(); - bq.add(constructQuery(MAVEN.GROUP_ID, term), Occur.SHOULD); //$NON-NLS-1$ - bq.add(constructQuery(MAVEN.ARTIFACT_ID, term), Occur.SHOULD); //$NON-NLS-1$ - Query tq = constructQuery(MAVEN.PACKAGING, "maven-archetype", SearchType.EXACT); //$NON-NLS-1$ -- query = new FilteredQuery(tq, new QueryWrapperFilter(bq)); -+ BooleanQuery.Builder builder = new BooleanQuery.Builder(); -+ builder.add(bq.build(), Occur.MUST); -+ builder.add(tq, Occur.FILTER); -+ query = builder.build(); - - } else if(IIndex.SEARCH_PACKAGING.equals(type)) { - query = constructQuery(MAVEN.PACKAGING, term); -@@ -837,7 +844,7 @@ - } - - protected Directory getIndexDirectory(IRepository repository) throws IOException { -- return FSDirectory.open(getIndexDirectoryFile(repository)); -+ return FSDirectory.open(getIndexDirectoryFile(repository).toPath()); - } - - public IndexedArtifactGroup resolveGroup(IndexedArtifactGroup group) { -@@ -1126,7 +1133,7 @@ - String details = getIndexDetails(repository); - String id = repository.getUid() + "-cache"; //$NON-NLS-1$ - File luceneCache = new File(request.getLocalIndexCacheDir(), details); -- Directory directory = FSDirectory.open(luceneCache); -+ Directory directory = FSDirectory.open(luceneCache.toPath()); - IndexingContext cacheCtx = getIndexer().addIndexingContextForced(id, id, null, directory, null, null, - getIndexers(details)); - request = newIndexUpdateRequest(repository, cacheCtx, monitor); diff --git a/eclipse-m2e-core-mandatory-OSGi-attributes.patch b/eclipse-m2e-core-mandatory-OSGi-attributes.patch deleted file mode 100644 index a60aaf4..0000000 --- a/eclipse-m2e-core-mandatory-OSGi-attributes.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml -+++ m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml -@@ -66,8 +66,8 @@ - - <_exportcontents> - META-INF.plexus;-noimport:=true;x-internal:=true, -- org.apache.maven.archetype.*;provider=m2e;mandatory:=provider;x-internal:=true, -- org.codehaus.plexus.velocity;provider=m2e;mandatory:=provider;x-internal:=true, -+ org.apache.maven.archetype.*;provider=m2e;x-internal:=true, -+ org.codehaus.plexus.velocity;provider=m2e;x-internal:=true, - - - ---- m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml -+++ m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml -@@ -62,8 +62,7 @@ - - <_exportcontents> - META-INF.plexus;-noimport:=true, -- org.apache.lucene.*;provider=m2e;mandatory:=provider, -- org.apache.maven.*;provider=m2e;mandatory:=provider, -+ org.apache.maven.*;provider=m2e, - - - ---- m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml -+++ m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml -@@ -164,12 +164,12 @@ - <_exportcontents> - META-INF.plexus;-noimport:=true, - META-INF.sisu;-noimport:=true, -- org.apache.maven.*;provider=m2e;mandatory:=provider, -- org.codehaus.plexus.*;provider=m2e;mandatory:=provider, -- org.sonatype.plexus.*;provider=m2e;mandatory:=provider, -- org.eclipse.aether.*;provider=m2e;mandatory:=provider;version=1.1.1, -- com.google.inject.*;provider=m2e;mandatory:=provider, -- io.takari.*;provider=m2e;mandatory:=provider -+ org.apache.maven.*;provider=m2e, -+ org.codehaus.plexus.*;provider=m2e, -+ org.sonatype.plexus.*;provider=m2e, -+ org.eclipse.aether.*;provider=m2e, -+ com.google.inject.*;provider=m2e, -+ io.takari.*;provider=m2e - - - diff --git a/eclipse-m2e-core.spec b/eclipse-m2e-core.spec index 7ae34bb..8827aba 100644 --- a/eclipse-m2e-core.spec +++ b/eclipse-m2e-core.spec @@ -1,42 +1,32 @@ -%global release_dir m2e-core-c5392da6bab9893bcbf5b43f651abe48d5819bea +%global release_dir m2e-core-8328691915d0e67544c97597b0ea02d559f0f4ea Name: eclipse-m2e-core -Version: 1.11.0 -Release: 3%{?dist} +Version: 1.15.0 +Release: 1%{?dist} Summary: Maven integration for Eclipse # Most of components are under EPL, but some of them are licensed under # ASL 2.0 license. -License: EPL-1.0 and ASL 2.0 +License: EPL-2.0 and ASL 2.0 URL: https://eclipse.org/m2e/ Source0: https://git.eclipse.org/c/m2e/m2e-core.git/snapshot/%{release_dir}.tar.xz -Source1: http://www.eclipse.org/legal/epl-v10.html -# Add some necessary stuff (mainly requires & imports) to manifests -Patch0: %{name}-fix-manifests.patch +# Allow building against the Fedora shipped guava version +Patch0: 0001-Fix-manifests-for-guava-and-use-OSGi-fied-archetypes.patch -# API changes to accomodate maven-indexer 5.1.1 -Patch1: %{name}-indexer-5.1.1.patch +# Use latest versions of lucene and maven-indexer +Patch1: 0002-Port-to-latest-versions-of-maven-indexer-and-lucene.patch # API change in aether (remove once implemented) -Patch2: %{name}-LifecycleMappingFactory.patch - -# Port tests to latest Jetty -Patch3: %{name}-jetty.patch +Patch2: 0003-Adapt-to-API-change-in-aether.patch # Remove "mandatory" attirbutes from OSGi manifests, which cause problems with P2. # See https://dev.eclipse.org/mhonarc/lists/p2-dev/msg05465.html -Patch4: %{name}-mandatory-OSGi-attributes.patch - -# Port to lucene 5 -Patch5: %{name}-lucene-5.patch - -# Fix build against older maven < 3.5.3 as available on rhel 7 -Patch6: eclipse-m2e-maven353.patch +Patch3: 0004-Remove-mandatory-attirbutes-from-OSGi-manifests-whic.patch -# Fix build against latest maven-resolver -Patch7: eclipse-m2e-maven-resolver-1.3.patch +# Use latest version of maven-archetypes +Patch4: 0005-Port-to-latest-version-of-maven-archetypes.patch BuildArch: noarch @@ -65,8 +55,8 @@ BuildRequires: mvn(org.sonatype.forge:forge-parent:pom:) # built using %%mvn_build. BuildRequires: mvn(io.takari.aether:aether-connector-okhttp) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven.archetype:archetype-common) -BuildRequires: mvn(org.apache.maven.indexer:indexer-core) >= 5.1.2-0.4 +BuildRequires: mvn(org.apache.maven.archetype:archetype-common) >= 3.1.1 +BuildRequires: mvn(org.apache.maven.indexer:indexer-core) >= 6.0.0 BuildRequires: mvn(org.apache.maven:maven-compat) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-embedder) @@ -85,13 +75,14 @@ BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.sonatype.forge:forge-parent:pom:) BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) - # OSGi build-requires. They can be regenerated with the following command: # sed -n 's/^Require-Bundle: //;T;:l;s/[;=,].*//;/^org.eclipse.m2e/bn;s/..*/BuildRequires: osgi(&)/;T;p;:n;n;s/^ //;T;bl' `find -name *.MF` | sort -u +BuildRequires: osgi(com.google.gson) BuildRequires: osgi(com.google.guava) BuildRequires: osgi(com.ibm.icu) +BuildRequires: osgi(javax.annotation-api) BuildRequires: osgi(org.apache.ant) -BuildRequires: osgi(org.apache.lucene.queryparser) +BuildRequires: osgi(org.apache.commons.io) BuildRequires: osgi(org.apache.maven.archetype.catalog) BuildRequires: osgi(org.apache.maven.archetype.descriptor) BuildRequires: osgi(org.eclipse.compare) @@ -132,7 +123,7 @@ BuildRequires: osgi(org.eclipse.jetty.server) BuildRequires: osgi(org.eclipse.jetty.util) BuildRequires: osgi(org.eclipse.jface) BuildRequires: osgi(org.eclipse.jface.text) -BuildRequires: osgi(org.eclipse.license) +BuildRequires: osgi(org.eclipse.license) < 2.0.0 BuildRequires: osgi(org.eclipse.ltk.core.refactoring) BuildRequires: osgi(org.eclipse.ltk.ui.refactoring) BuildRequires: osgi(org.eclipse.osgi) @@ -144,6 +135,7 @@ BuildRequires: osgi(org.eclipse.ui.editors) BuildRequires: osgi(org.eclipse.ui.externaltools) BuildRequires: osgi(org.eclipse.ui.forms) BuildRequires: osgi(org.eclipse.ui.ide) +BuildRequires: osgi(org.eclipse.ui.views) BuildRequires: osgi(org.eclipse.ui.workbench) BuildRequires: osgi(org.eclipse.ui.workbench.texteditor) BuildRequires: osgi(org.eclipse.wst.common.emf) @@ -168,49 +160,52 @@ BuildRequires: maven-install-plugin Requires: aether-connector-okhttp Requires: aopalliance Requires: apache-commons-cli +Requires: apache-commons-codec Requires: apache-commons-collections Requires: apache-commons-io Requires: apache-commons-lang Requires: apache-commons-lang3 Requires: atinject -Requires: dom4j -Requires: eclipse-m2e-workspace >= 0.4.0 +Requires: cdi-api +Requires: eclipse-m2e-workspace +Requires: glassfish-annotation-api +Requires: glassfish-el-api +Requires: google-gson Requires: google-guice +Requires: guava20 +Requires: hawtjni-runtime +Requires: jansi +Requires: jansi-native Requires: jchardet Requires: jdom -Requires: jetty-util -Requires: lucene-grouping Requires: lucene-highlighter -Requires: lucene-join Requires: lucene-memory -Requires: maven-archetype-catalog -Requires: maven-archetype-common -Requires: maven-archetype-descriptor -Requires: maven-archetype-registry -Requires: maven-artifact-manager -Requires: maven-indexer >= 5.1.2-0.6 +Requires: lucene-queries +Requires: lucene-queryparser +Requires: lucene-sandbox +Requires: maven-archetype-catalog >= 3.1.1 +Requires: maven-archetype-common >= 3.1.1 +Requires: maven-archetype-descriptor >= 3.1.1 +Requires: maven-artifact-transfer +Requires: maven-common-artifact-filters +Requires: maven-indexer >= 6.0.0 Requires: maven-invoker Requires: maven-lib -Requires: maven-model -Requires: maven-plugin-registry -Requires: maven-profile -Requires: maven-project Requires: maven-resolver-api Requires: maven-resolver-connector-basic Requires: maven-resolver-impl Requires: maven-resolver-spi Requires: maven-resolver-transport-wagon Requires: maven-resolver-util +Requires: maven-shared-utils Requires: maven-wagon-file -Requires: maven-wagon-http -Requires: objectweb-asm +Requires: maven-wagon-provider-api Requires: okhttp Requires: okio Requires: plexus-build-api Requires: plexus-cipher Requires: plexus-classworlds Requires: plexus-containers-component-annotations -Requires: plexus-containers-container-default Requires: plexus-interpolation Requires: plexus-sec-dispatcher Requires: plexus-utils @@ -219,9 +214,15 @@ Requires: sisu-inject Requires: sisu-plexus Requires: slf4j Requires: velocity -Requires: xbean Requires: xml-commons-apis +# Obsoletes added for F31 +Obsoletes: eclipse-m2e-sourcelookup < 1.1.1-1 +Provides: eclipse-m2e-sourcelookup = %{version}-%{release} + +# Not shipping tests since F31 +Obsoletes: %{name}-tests < 1.14.0-2 + %description The goal of the m2ec project is to provide a first-class Apache Maven support in the Eclipse IDE, making it easier to edit Maven's pom.xml, run a build from @@ -234,13 +235,6 @@ additional Maven plugins (e.g. Android, web development, etc.), and facilitates the distribution of those extensions through the m2e marketplace. -%package tests -Summary: Eclipse M2E testing helpers - -%description tests -This package contains common code used by tests for Eclipse M2E. - - %package javadoc Summary: API documentation for %{name} @@ -250,12 +244,21 @@ This package contains %{summary}. %prep %setup -q -n %{release_dir} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +rm org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/LocalArchetypeCatalogDialog.java +rm org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/RemoteArchetypeCatalogDialog.java + +# Remove unnecessary parent pom +%pom_remove_parent m2e-maven-runtime find -name '*.class' -delete find -name '*.jar' -delete # Copy license files so they can be installed more easily. -cp -p %{SOURCE1} . cp -p org.eclipse.m2e.core/about_files/LICENSE-2.0.txt . # These don't currently build, but don't seem to be absolutely necessary @@ -269,8 +272,12 @@ do rm -rf $mod done -# Test bundle goes to its own subpackage. -%mvn_package ":*.tests*::{}:" tests +# Don't ship tests +%pom_disable_module org.eclipse.m2e.tests.common +%pom_disable_module org.eclipse.m2e.core.tests +%pom_disable_module org.eclipse.m2e.importer.tests +%pom_disable_module org.eclipse.m2e.binaryproject.tests +%mvn_package ":*.tests*::{}:" __noinstall %mvn_package ":::{}:" # Ensure all necessary resolver deps are present @@ -293,35 +300,21 @@ for d in `find m2e-maven-runtime/* -maxdepth 0 -type d`; do %pom_xpath_set pom:Embed-Dependency "*;scope=compile|runtime;groupId=!org.apache.lucene|org.ow2.asm" $d done -%patch0 -p0 -%patch1 -p0 -%patch2 -p0 -%patch3 -p0 -%patch4 -p0 -%patch5 -p0 -%if 0%{?rhel} == 7 -%patch6 -p0 -%endif -%patch7 -p0 - # Not needed for RPM builds %pom_remove_plugin ":jacoco-maven-plugin" -# Fix BSN of annotations -sed -i -e 's/>javax.annotationjavax.annotation-api20.0' \ m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml # Avoid embedding lucene, use as ordinary OSGi bundle instead -%pom_xpath_set pom:Import-Package "org.apache.lucene*,!*" m2e-maven-runtime/org.eclipse.m2e.maven.indexer sed -i -e '/org.slf4j/s|^\(.*\)|\1,org.apache.lucene.analysis,org.apache.lucene.analysis.standard,org.apache.lucene.analysis.util,org.apache.lucene.document,org.apache.lucene.index,org.apache.lucene.queryparser.classic,org.apache.lucene.search,org.apache.lucene.search.highlight,org.apache.lucene.store,org.apache.lucene.util|' \ org.eclipse.m2e.core/META-INF/MANIFEST.MF org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF +# Maven 3.6.2 API +sed -i -e 's/DefaultProjectBuilder\.DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY/"maven.defaultProjectBuilder.disableGlobalModelCache"/' \ + org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java + %build # Building m2e is a two step process. See upstream documentation: # http://wiki.eclipse.org/M2E_Development_Environment#Building_m2e_on_command_line @@ -359,19 +352,43 @@ done xmvn-subst -s $(find %{buildroot}%{_datadir}/eclipse/droplets/m2e-core -name jars) %files -f .mfiles -%license epl-v10.html LICENSE-2.0.txt - -%files tests -f .mfiles-tests +%license LICENSE-2.0.txt %files javadoc -f .mfiles-javadoc -%license epl-v10.html LICENSE-2.0.txt +%license LICENSE-2.0.txt %changelog -* Tue Jan 28 2020 Fedora Release Engineering - 1.11.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild +* Sun Mar 22 2020 Mat Booth - 1.15.0-1 +- Update to latest upstream release + +* Tue Jan 07 2020 Mat Booth - 1.14.0-2 +- Correctly obsolete tests + +* Fri Dec 20 2019 Mat Booth - 1.14.0-1 +- Update to latest upstream release +- Don't build and ship tests + +* Thu Aug 01 2019 Mat Booth - 1.11.0-8 +- Rebuild against new maven-archetype and regenerate runtime requires + +* Tue Jul 02 2019 Mat Booth - 1.11.0-7 +- Re-generate OSGi BRs + +* Mon Jul 01 2019 Mat Booth - 1.11.0-6 +- Drop hard requirement on xbean, not really needed by maven + +* Fri Jun 21 2019 Mat Booth - 1.11.0-5 +- Backport fix to correct 'Failed to evaluate: ReferenceExpression' errors in + log + +* Tue Jun 18 2019 Mat Booth - 1.11.0-4 +- Rebuild against maven-indexer 6.0 + +* Wed Jun 12 2019 Mat Booth - 1.11.0-3 +- Add obsoletes for eclipse-m2e-sourcelookup -* Wed Jul 24 2019 Fedora Release Engineering - 1.11.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild +* Wed Jun 12 2019 Mat Booth - 1.11.0-2 +- Fix build against modularised maven-resolver * Fri Mar 15 2019 Mat Booth - 1.11.0-1 - Update to 2019-03 release diff --git a/eclipse-m2e-maven-resolver-1.3.patch b/eclipse-m2e-maven-resolver-1.3.patch deleted file mode 100644 index 2cdfd7a..0000000 --- a/eclipse-m2e-maven-resolver-1.3.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java.orig 2018-12-12 11:26:12.687882953 +0000 -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java 2018-12-12 11:39:46.027104311 +0000 -@@ -32,6 +32,7 @@ - import org.eclipse.aether.resolution.ArtifactDescriptorPolicy; - import org.eclipse.aether.resolution.ResolutionErrorPolicy; - import org.eclipse.aether.transfer.TransferListener; -+import org.eclipse.aether.transform.FileTransformerManager; - - import org.codehaus.plexus.component.annotations.Component; - import org.codehaus.plexus.component.annotations.Requirement; -@@ -176,4 +177,9 @@ - public VersionFilter getVersionFilter() { - return getSession().getVersionFilter(); - } -+ -+ @Override -+ public FileTransformerManager getFileTransformerManager() { -+ return getSession().getFileTransformerManager(); -+ } - } diff --git a/eclipse-m2e-maven353.patch b/eclipse-m2e-maven353.patch deleted file mode 100644 index 91d3501..0000000 --- a/eclipse-m2e-maven353.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 34867d6eecf3cc1a44aa14021f88ba95b55efb96 Mon Sep 17 00:00:00 2001 -From: Fred Bricon -Date: Tue, 13 Mar 2018 17:01:00 -0400 -Subject: Update Maven embedder to 3.5.3 - -Change-Id: If72332c8d627016ecaf9ebd7afddef33809a03fe -Signed-off-by: Fred Bricon ---- - .../eclipse/m2e/core/internal/project/EclipseExtensionRealmCache.java | 2 +- - .../eclipse/m2e/core/internal/project/EclipsePluginRealmCache.java | 2 +- - .../eclipse/m2e/core/internal/project/EclipseProjectRealmCache.java | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseExtensionRealmCache.java org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseExtensionRealmCache.java -index 794b00a..147c055 100644 ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseExtensionRealmCache.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseExtensionRealmCache.java -@@ -34,7 +34,7 @@ public class EclipseExtensionRealmCache extends DefaultExtensionRealmCache imple - protected void flush(Key cacheKey) { - CacheRecord cacheRecord = cache.remove(cacheKey); - if(cacheRecord != null) { -- disposeClassRealm(cacheRecord.getRealm()); -+ disposeClassRealm(cacheRecord.realm); - } - } - }; -diff --git org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipsePluginRealmCache.java org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipsePluginRealmCache.java -index 835fea5..6520137 100644 ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipsePluginRealmCache.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipsePluginRealmCache.java -@@ -33,7 +33,7 @@ public class EclipsePluginRealmCache extends DefaultPluginRealmCache implements - protected void flush(Key cacheKey) { - CacheRecord cacheRecord = cache.remove(cacheKey); - if(cacheRecord != null) { -- disposeClassRealm(cacheRecord.getRealm()); -+ disposeClassRealm(cacheRecord.realm); - } - } - }; -diff --git org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseProjectRealmCache.java org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseProjectRealmCache.java -index 4cd4c29..4292d99 100644 ---- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseProjectRealmCache.java -+++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipseProjectRealmCache.java -@@ -33,7 +33,7 @@ public class EclipseProjectRealmCache extends DefaultProjectRealmCache implement - protected void flush(Key cacheKey) { - CacheRecord cacheRecord = cache.remove(cacheKey); - if(cacheRecord != null) { -- disposeClassRealm(cacheRecord.getRealm()); -+ disposeClassRealm(cacheRecord.realm); - } - } - }; --- -cgit v1.1 - diff --git a/epl-v10.html b/epl-v10.html deleted file mode 100644 index 3998fce..0000000 --- a/epl-v10.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - -Eclipse Public License - Version 1.0 - - - - - - -

Eclipse Public License - v 1.0

- -

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE -PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR -DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS -AGREEMENT.

- -

1. DEFINITIONS

- -

"Contribution" means:

- -

a) in the case of the initial Contributor, the initial -code and documentation distributed under this Agreement, and

-

b) in the case of each subsequent Contributor:

-

i) changes to the Program, and

-

ii) additions to the Program;

-

where such changes and/or additions to the Program -originate from and are distributed by that particular Contributor. A -Contribution 'originates' from a Contributor if it was added to the -Program by such Contributor itself or anyone acting on such -Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) -are not derivative works of the Program.

- -

"Contributor" means any person or entity that distributes -the Program.

- -

"Licensed Patents" mean patent claims licensable by a -Contributor which are necessarily infringed by the use or sale of its -Contribution alone or when combined with the Program.

- -

"Program" means the Contributions distributed in accordance -with this Agreement.

- -

"Recipient" means anyone who receives the Program under -this Agreement, including all Contributors.

- -

2. GRANT OF RIGHTS

- -

a) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free copyright license to reproduce, prepare derivative works -of, publicly display, publicly perform, distribute and sublicense the -Contribution of such Contributor, if any, and such derivative works, in -source code and object code form.

- -

b) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free patent license under Licensed Patents to make, use, sell, -offer to sell, import and otherwise transfer the Contribution of such -Contributor, if any, in source code and object code form. This patent -license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered -by the Licensed Patents. The patent license shall not apply to any other -combinations which include the Contribution. No hardware per se is -licensed hereunder.

- -

c) Recipient understands that although each Contributor -grants the licenses to its Contributions set forth herein, no assurances -are provided by any Contributor that the Program does not infringe the -patent or other intellectual property rights of any other entity. Each -Contributor disclaims any liability to Recipient for claims brought by -any other entity based on infringement of intellectual property rights -or otherwise. As a condition to exercising the rights and licenses -granted hereunder, each Recipient hereby assumes sole responsibility to -secure any other intellectual property rights needed, if any. For -example, if a third party patent license is required to allow Recipient -to distribute the Program, it is Recipient's responsibility to acquire -that license before distributing the Program.

- -

d) Each Contributor represents that to its knowledge it -has sufficient copyright rights in its Contribution, if any, to grant -the copyright license set forth in this Agreement.

- -

3. REQUIREMENTS

- -

A Contributor may choose to distribute the Program in object code -form under its own license agreement, provided that:

- -

a) it complies with the terms and conditions of this -Agreement; and

- -

b) its license agreement:

- -

i) effectively disclaims on behalf of all Contributors -all warranties and conditions, express and implied, including warranties -or conditions of title and non-infringement, and implied warranties or -conditions of merchantability and fitness for a particular purpose;

- -

ii) effectively excludes on behalf of all Contributors -all liability for damages, including direct, indirect, special, -incidental and consequential damages, such as lost profits;

- -

iii) states that any provisions which differ from this -Agreement are offered by that Contributor alone and not by any other -party; and

- -

iv) states that source code for the Program is available -from such Contributor, and informs licensees how to obtain it in a -reasonable manner on or through a medium customarily used for software -exchange.

- -

When the Program is made available in source code form:

- -

a) it must be made available under this Agreement; and

- -

b) a copy of this Agreement must be included with each -copy of the Program.

- -

Contributors may not remove or alter any copyright notices contained -within the Program.

- -

Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution.

- -

4. COMMERCIAL DISTRIBUTION

- -

Commercial distributors of software may accept certain -responsibilities with respect to end users, business partners and the -like. While this license is intended to facilitate the commercial use of -the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create -potential liability for other Contributors. Therefore, if a Contributor -includes the Program in a commercial product offering, such Contributor -("Commercial Contributor") hereby agrees to defend and -indemnify every other Contributor ("Indemnified Contributor") -against any losses, damages and costs (collectively "Losses") -arising from claims, lawsuits and other legal actions brought by a third -party against the Indemnified Contributor to the extent caused by the -acts or omissions of such Commercial Contributor in connection with its -distribution of the Program in a commercial product offering. The -obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In -order to qualify, an Indemnified Contributor must: a) promptly notify -the Commercial Contributor in writing of such claim, and b) allow the -Commercial Contributor to control, and cooperate with the Commercial -Contributor in, the defense and any related settlement negotiations. The -Indemnified Contributor may participate in any such claim at its own -expense.

- -

For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance -claims and warranties are such Commercial Contributor's responsibility -alone. Under this section, the Commercial Contributor would have to -defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other -Contributor to pay any damages as a result, the Commercial Contributor -must pay those damages.

- -

5. NO WARRANTY

- -

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS -PROVIDED 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. Each Recipient is solely -responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement , including but not limited to -the risks and costs of program errors, compliance with applicable laws, -damage to or loss of data, programs or equipment, and unavailability or -interruption of operations.

- -

6. DISCLAIMER OF LIABILITY

- -

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT -NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR -DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED -HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

- -

7. GENERAL

- -

If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable.

- -

If Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other -software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the -date such litigation is filed.

- -

All Recipient's rights under this Agreement shall terminate if it -fails to comply with any of the material terms or conditions of this -Agreement and does not cure such failure in a reasonable period of time -after becoming aware of such noncompliance. If all Recipient's rights -under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive.

- -

Everyone is permitted to copy and distribute copies of this -Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The -Agreement Steward reserves the right to publish new versions (including -revisions) of this Agreement from time to time. No one other than the -Agreement Steward has the right to modify this Agreement. The Eclipse -Foundation is the initial Agreement Steward. The Eclipse Foundation may -assign the responsibility to serve as the Agreement Steward to a -suitable separate entity. Each new version of the Agreement will be -given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the -Agreement under which it was received. In addition, after a new version -of the Agreement is published, Contributor may elect to distribute the -Program (including its Contributions) under the new version. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no -rights or licenses to the intellectual property of any Contributor under -this Agreement, whether expressly, by implication, estoppel or -otherwise. All rights in the Program not expressly granted under this -Agreement are reserved.

- -

This Agreement is governed by the laws of the State of New York and -the intellectual property laws of the United States of America. No party -to this Agreement will bring a legal action under this Agreement more -than one year after the cause of action arose. Each party waives its -rights to a jury trial in any resulting litigation.

- - - - \ No newline at end of file diff --git a/sources b/sources index 34c44da..7cd5736 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (m2e-core-c5392da6bab9893bcbf5b43f651abe48d5819bea.tar.xz) = f518d1fe323b3c64e26ca15c71ad31c2a074e1c0e4ee2bc886a915a50a7eb9c9dc1b4064d94b28db05850b1da2b80715bb7a05da0adf3f21d8984f24b581b97b +SHA512 (m2e-core-8328691915d0e67544c97597b0ea02d559f0f4ea.tar.xz) = 48b71abc8d7ad450a3f9e3d4e5ed03601065bd3f313bbd197f1513a9d72d29d115fe40b8ea73d6d7b185fc66799caac08c9871adc5118e60db35096180836c33