diff --git a/common/pom.xml b/common/pom.xml
index c36adec1d..6d48d6a1f 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -32,11 +32,6 @@
constants
-
- org.jboss.pnc
- pnc-common
-
-
junit
junit
diff --git a/common/src/main/java/org/jboss/da/common/ScopedGAVStrategy.java b/common/src/main/java/org/jboss/da/common/ScopedGAVStrategy.java
deleted file mode 100644
index 34d552810..000000000
--- a/common/src/main/java/org/jboss/da/common/ScopedGAVStrategy.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.jboss.da.common;
-
-import lombok.experimental.SuperBuilder;
-import org.jboss.da.model.rest.Strategy;
-import org.jboss.da.model.rest.GAV;
-import org.jboss.pnc.common.alignment.ranking.AlignmentPredicate;
-import org.jboss.pnc.common.alignment.ranking.AlignmentRanking;
-import org.jboss.pnc.common.alignment.ranking.exception.ValidationException;
-
-@SuperBuilder
-public class ScopedGAVStrategy extends ScopedStrategy {
-
- @Override
- public int matchSignificance(GAV gav) {
- if (getArtifactScope() == null) {
- // Null signifies a global scope for a strategy. It has the least non-zero significance.
- return 1;
- }
-
- String[] scopeSplit = getArtifactScope().split(":");
- String group = gav.getGroupId();
- String artifact = gav.getArtifactId();
- String version = gav.getVersion();
-
- if (scopeSplit.length == 1 && group.equals(scopeSplit[0])) {
- // gav matched groupID
- return 2;
- }
- if (scopeSplit.length == 2 && group.equals(scopeSplit[0]) && artifact.equals(scopeSplit[1])) {
- // gav matched groupID and artifactID
- return 3;
- }
- if (scopeSplit.length == 3 && group.equals(scopeSplit[0]) && artifact.equals(scopeSplit[1])
- && version.equals(scopeSplit[2])) {
- // gav matched groupID, artifactID and version
- return 4;
- }
-
- // no match
- return 0;
- }
-
- public static ScopedGAVStrategy from(Strategy restStrategy) throws ValidationException {
- return builder().artifactScope(restStrategy.getArtifactScope())
- .ranks(new AlignmentRanking(restStrategy.getRanks(), null))
- .allowList(new AlignmentPredicate(restStrategy.getAllowList(), ver -> true))
- .denyList(new AlignmentPredicate(restStrategy.getDenyList(), ver -> false))
- .build();
- }
-}
diff --git a/common/src/main/java/org/jboss/da/common/ScopedStrategy.java b/common/src/main/java/org/jboss/da/common/ScopedStrategy.java
deleted file mode 100644
index edbabeb59..000000000
--- a/common/src/main/java/org/jboss/da/common/ScopedStrategy.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.jboss.da.common;
-
-import lombok.Getter;
-import lombok.experimental.SuperBuilder;
-import org.jboss.pnc.common.alignment.ranking.VersionStrategy;
-
-import java.util.Comparator;
-
-@SuperBuilder
-public abstract class ScopedStrategy extends VersionStrategy implements Comparator {
- @Getter
- private final String artifactScope;
-
- /**
- * Returns a number that conveys how much does an artifact identifier conform to an artifactScope. Higher number
- * suggests a better match. The method returns 0 if the identifier doesn't match the artifactScope at all.
- *
- * @param artifactIdentifier artifact identifier
- * @return an integer. Higher value means higher match. No match return 0.
- */
- public abstract int matchSignificance(T artifactIdentifier);
-
- /**
- * Returns such strategy that do not alter behaviour of version analysis
- *
- * @return strategy that do not affect version analysis
- */
- public static ScopedStrategy
+
+ org.jboss.pnc
+ pnc-common
+
org.jboss.pnc
rest-api
diff --git a/communication/src/main/java/org/jboss/da/communication/pnc/PncConnector.java b/communication/src/main/java/org/jboss/da/communication/pnc/PncConnector.java
index beb7c8f29..52743530a 100644
--- a/communication/src/main/java/org/jboss/da/communication/pnc/PncConnector.java
+++ b/communication/src/main/java/org/jboss/da/communication/pnc/PncConnector.java
@@ -3,11 +3,8 @@
import org.jboss.da.common.json.LookupMode;
import org.jboss.da.communication.repository.api.RepositoryException;
import org.jboss.da.model.rest.GA;
-import org.jboss.pnc.api.dependencyanalyzer.dto.QualifiedVersion;
-import org.jboss.pnc.dto.requests.QValue;
import java.util.List;
-import java.util.Set;
public interface PncConnector {
@@ -18,17 +15,15 @@ public interface PncConnector {
* @return list of available versions for given groupId:artifactId in repository, never {@code null}
* @throws RepositoryException When there is problem with communication.
*/
- List getMavenVersions(GA ga, LookupMode mode, Set qualifiers) throws RepositoryException;
+ List getMavenVersions(GA ga, LookupMode mode) throws RepositoryException;
/**
* Finds available versions for given npm package.
*
* @param packageName Name of the npm package
- * @param qualifiers
* @return list of available versions for package in repository, never {@code null}
* @throws RepositoryException When there is problem with communication.
*/
- List getNpmVersions(String packageName, LookupMode mode, Set qualifiers)
- throws RepositoryException;
+ List getNpmVersions(String packageName, LookupMode mode) throws RepositoryException;
}
diff --git a/communication/src/main/java/org/jboss/da/communication/pnc/PncConnectorImpl.java b/communication/src/main/java/org/jboss/da/communication/pnc/PncConnectorImpl.java
index 97514581c..45fb5461a 100644
--- a/communication/src/main/java/org/jboss/da/communication/pnc/PncConnectorImpl.java
+++ b/communication/src/main/java/org/jboss/da/communication/pnc/PncConnectorImpl.java
@@ -5,13 +5,11 @@
import org.jboss.da.common.util.ConfigurationParseException;
import org.jboss.da.communication.repository.api.RepositoryException;
import org.jboss.da.model.rest.GA;
-import org.jboss.pnc.api.dependencyanalyzer.dto.QualifiedVersion;
import org.jboss.pnc.client.ArtifactClient;
import org.jboss.pnc.client.Configuration;
import org.jboss.pnc.client.RemoteCollection;
import org.jboss.pnc.client.RemoteResourceException;
import org.jboss.pnc.common.logging.MDCUtils;
-import org.jboss.pnc.dto.requests.QValue;
import org.jboss.pnc.dto.response.ArtifactInfo;
import org.jboss.pnc.enums.RepositoryType;
import org.slf4j.Logger;
@@ -23,7 +21,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.Set;
/**
* @author Petr Kocandrle
@@ -45,29 +42,16 @@ public PncConnectorImpl(org.jboss.da.common.util.Configuration configuration) {
}
}
- private Collection getArtifacts(
- String identifierPattern,
- RepositoryType repoType,
- LookupMode mode,
- Set qualifiers) throws RepositoryException {
+ private Collection getArtifacts(String identifierPattern, RepositoryType repoType, LookupMode mode)
+ throws RepositoryException {
ArtifactClient artifactClient = getArtifactClient();
RemoteCollection artCollection;
try {
- if (qualifiers.isEmpty()) {
- artCollection = artifactClient.getAllFiltered(
- identifierPattern,
- mode.getArtifactQualities(),
- repoType,
- mode.getBuildCategories(),
- null);
- } else {
- artCollection = artifactClient.getAllFiltered(
- identifierPattern,
- mode.getArtifactQualities(),
- repoType,
- mode.getBuildCategories(),
- qualifiers);
- }
+ artCollection = artifactClient.getAllFiltered(
+ identifierPattern,
+ mode.getArtifactQualities(),
+ repoType,
+ mode.getBuildCategories());
} catch (RemoteResourceException ex) {
log.debug("Error when reading artifacts from PNC: " + ex, ex);
throw new RepositoryException("Error when reading artifacts from PNC: " + ex, ex);
@@ -76,17 +60,16 @@ private Collection getArtifacts(
}
@Override
- public List getMavenVersions(GA ga, LookupMode mode, Set qualifiers)
- throws RepositoryException {
+ public List getMavenVersions(GA ga, LookupMode mode) throws RepositoryException {
String identifierPattern = ga.getGroupId() + ':' + ga.getArtifactId() + ":pom:*";
- Collection arts = getArtifacts(identifierPattern, RepositoryType.MAVEN, mode, qualifiers);
+ Collection arts = getArtifacts(identifierPattern, RepositoryType.MAVEN, mode);
- List versions = new ArrayList<>(arts.size());
+ List versions = new ArrayList<>(arts.size());
for (ArtifactInfo art : arts) {
String[] parts = art.getIdentifier().split(":");
if (parts.length == 4) {
// TODO filtering by target repository if necessary
- versions.add(new QualifiedVersion(parts[3], art.getQualifiers()));
+ versions.add(parts[3]);
} else {
log.error("Cannot read version for artifact with identifier {}", art.getIdentifier());
}
@@ -95,17 +78,16 @@ public List getMavenVersions(GA ga, LookupMode mode, Set getNpmVersions(String packageName, LookupMode mode, Set qualifiers)
- throws RepositoryException {
+ public List getNpmVersions(String packageName, LookupMode mode) throws RepositoryException {
String identifierPattern = packageName + ":*";
- Collection arts = getArtifacts(identifierPattern, RepositoryType.NPM, mode, qualifiers);
+ Collection arts = getArtifacts(identifierPattern, RepositoryType.NPM, mode);
- List versions = new ArrayList<>(arts.size());
+ List versions = new ArrayList<>(arts.size());
for (ArtifactInfo art : arts) {
String[] parts = art.getIdentifier().split(":");
if (parts.length == 2) {
// TODO filtering by target repository if necessary
- versions.add(new QualifiedVersion(parts[1], art.getQualifiers()));
+ versions.add(parts[1]);
} else {
log.error("Cannot read version for artifact with identifier {}", art.getIdentifier());
}
@@ -129,8 +111,7 @@ private Configuration getClientConfig(String protocol, String host, int port) {
builder.mdcToHeadersMappings(MDCUtils.HEADER_KEY_MAPPING);
- Configuration config = builder.build();
- return config;
+ return builder.build();
}
}
diff --git a/pom.xml b/pom.xml
index fa903841a..36299d081 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,9 +81,10 @@
UTF-8
1
1
- 2.5.0-SNAPSHOT
- 2.4.0-SNAPSHOT
- 2.5.0-SNAPSHOT
+ 3.4.2
+ 3.4.1-SNAPSHOT
+ 3.4.2
+ 0.16.2
0.13.4
0.12.2
11
@@ -150,6 +151,16 @@
org.jboss.pnc
pnc-common
${version.pnc-common}
+
+
+ io.opentelemetry
+ *
+
+
+ org.apache.httpcomponents
+ *
+
+
org.jboss.pnc
@@ -254,7 +265,11 @@
galley-cache-partyline
${version.galley}
-
+
+ org.commonjava.maven.atlas
+ atlas-identities
+ ${atlasVersion}
+
org.projectlombok
@@ -360,6 +375,18 @@
+
+ Central Portal Snapshots
+ central-portal-snapshots
+ https://central.sonatype.com/repository/maven-snapshots/
+
+ false
+
+
+ true
+
+
+
MRRC GA
https://maven.repository.redhat.com/ga
diff --git a/reports-backend/src/main/java/org/jboss/da/listings/api/service/BlackArtifactService.java b/reports-backend/src/main/java/org/jboss/da/listings/api/service/BlackArtifactService.java
index 35ad91a09..526397fbf 100644
--- a/reports-backend/src/main/java/org/jboss/da/listings/api/service/BlackArtifactService.java
+++ b/reports-backend/src/main/java/org/jboss/da/listings/api/service/BlackArtifactService.java
@@ -5,12 +5,11 @@
import org.jboss.da.listings.api.model.BlackArtifact;
import org.jboss.da.model.rest.GA;
import org.jboss.da.model.rest.GAV;
-import org.jboss.pnc.api.dependencyanalyzer.dto.QualifiedVersion;
import java.util.Set;
/**
- *
+ *
* @author Jozef Mrazek <jmrazek@redhat.com>
*
*/
@@ -30,7 +29,7 @@ public interface BlackArtifactService extends ArtifactService {
/**
* Checks if list contains artifact with specific GAV. All restrictions and conversions are applied like using
* getArtifact method of specific list.
- *
+ *
* @param gav
* @return True if list contains the artifact otherwise false.
*/
@@ -46,7 +45,7 @@ public interface BlackArtifactService extends ArtifactService {
/**
* Checks if blacklist contains artifact with specific groupId, artifactId and version. If the version have redhat
* suffix it is removed. Then the version is converted to OSGi version and finds this version in blacklist;
- *
+ *
* @return found artifact
*/
public Optional getArtifact(String groupId, String artifactId, String version);
@@ -61,7 +60,7 @@ public interface BlackArtifactService extends ArtifactService {
/**
* Remove artifact from list. Removes only exact match of artifact.
- *
+ *
* @param groupId
* @param artifactId
* @param version
@@ -89,5 +88,5 @@ public interface BlackArtifactService extends ArtifactService {
* @param version Version to check in the blocklist.
* @return True, if the GA + version is present in the blocklist.
*/
- boolean isBlocklisted(Set cache, GA ga, QualifiedVersion version);
+ boolean isBlocklisted(Set cache, GA ga, String version);
}
diff --git a/reports-backend/src/main/java/org/jboss/da/listings/impl/service/BlackArtifactServiceImpl.java b/reports-backend/src/main/java/org/jboss/da/listings/impl/service/BlackArtifactServiceImpl.java
index 8d610d67d..5a04160e5 100644
--- a/reports-backend/src/main/java/org/jboss/da/listings/impl/service/BlackArtifactServiceImpl.java
+++ b/reports-backend/src/main/java/org/jboss/da/listings/impl/service/BlackArtifactServiceImpl.java
@@ -20,12 +20,11 @@
import java.util.TreeSet;
import java.util.stream.Collectors;
-import org.jboss.pnc.api.dependencyanalyzer.dto.QualifiedVersion;
import org.jboss.pnc.common.version.SuffixedVersion;
import org.jboss.pnc.common.version.VersionParser;
/**
- *
+ *
* @author Jozef Mrazek <jmrazek@redhat.com>
*
*/
@@ -56,11 +55,11 @@ public Set prefetchGAs(Set gaToPrefetch) {
}
@Override
- public boolean isBlocklisted(Set cache, org.jboss.da.model.rest.GA ga, QualifiedVersion version) {
+ public boolean isBlocklisted(Set cache, org.jboss.da.model.rest.GA ga, String version) {
SuffixedVersion parsedVersion = versionParser.parse(version);
GAV unsuffixedGAV = new GAV(ga, parsedVersion.unsuffixedVersion());
- GAV osgiGAV = new GAV(ga, VersionParser.getOSGiVersion(version.getVersion()));
+ GAV osgiGAV = new GAV(ga, VersionParser.getOSGiVersion(version));
return cache.contains(unsuffixedGAV) || cache.contains(osgiGAV);
}
diff --git a/reports-backend/src/main/java/org/jboss/da/products/api/ProductProvider.java b/reports-backend/src/main/java/org/jboss/da/products/api/ProductProvider.java
index e91452e1e..11548e6e2 100644
--- a/reports-backend/src/main/java/org/jboss/da/products/api/ProductProvider.java
+++ b/reports-backend/src/main/java/org/jboss/da/products/api/ProductProvider.java
@@ -1,7 +1,6 @@
package org.jboss.da.products.api;
import org.jboss.da.listings.model.ProductSupportStatus;
-import org.jboss.pnc.api.dependencyanalyzer.dto.QualifiedVersion;
import java.util.Map;
import java.util.Set;
@@ -73,7 +72,7 @@ public interface ProductProvider {
* @param artifact artifact which name and type will be used for searching.
* @return Set of products and their artifacts versions.
*/
- CompletableFuture
+
+ org.commonjava.maven.atlas
+ atlas-identities
+