Skip to content

Commit

Permalink
[WFMP-207] Do not perform artifact resolution fallback if the channel…
Browse files Browse the repository at this point in the history
… resolution failed due to transfer error
  • Loading branch information
spyrkob committed May 23, 2023
1 parent f72a21d commit 9987364
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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-SNAPSHOT</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

0 comments on commit 9987364

Please sign in to comment.