Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFMP-207] Do not perform artifact resolution fallback if the channel resolution failed due to transfer error #338

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
import org.jboss.galleon.universe.maven.MavenUniverseException;
import org.jboss.galleon.universe.maven.repo.MavenRepoManager;
import org.jboss.galleon.util.ZipUtils;
import org.wildfly.channel.ArtifactTransferException;
import org.wildfly.channel.Channel;
import org.wildfly.channel.ChannelManifest;
import org.wildfly.channel.ChannelSession;
import org.wildfly.channel.NoStreamFoundException;
import org.wildfly.channel.Repository;
import org.wildfly.channel.UnresolvedMavenArtifactException;
import org.wildfly.channel.maven.VersionResolverFactory;
Expand Down Expand Up @@ -102,7 +104,9 @@ public ChannelMavenArtifactRepositoryManager(List<ChannelConfiguration> channels
public void resolve(MavenArtifact artifact) throws MavenUniverseException {
try {
resolveFromChannels(artifact);
} catch (UnresolvedMavenArtifactException ex) {
} catch (ArtifactTransferException ex) {
throw new MavenUniverseException(ex.getLocalizedMessage(), ex);
} catch (NoStreamFoundException ex) {
boolean requireChannel = Boolean.parseBoolean(artifact.getMetadata().get(REQUIRE_CHANNEL_FOR_ALL_ARTIFACT));
if (!requireChannel) {
// Could be a feature-pack that could require to be resolved from a channel.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<!-- This version property is also retrieved by plugin at runtime to resolve CLI artifact -->
<version.org.wildfly.core>20.0.1.Final</version.org.wildfly.core>
<version.org.wildfly>27.0.1.Final</version.org.wildfly>
<version.org.wildfly.channel>1.0.0.Final</version.org.wildfly.channel>
<version.org.wildfly.channel>1.0.1.Final</version.org.wildfly.channel>
<version.org.wildfly.prospero>1.0.0.Final</version.org.wildfly.prospero>
<!-- maven dependencies -->
<version.javax.inject.javax.inject>1</version.javax.inject.javax.inject>
Expand Down