Skip to content

Commit

Permalink
Merge pull request #391 from jfdenise/issue_390
Browse files Browse the repository at this point in the history
Fix for Issue #390, cloud extension artifact shouldn't be resolved from WildFly channel manifest
  • Loading branch information
jfdenise authored Apr 23, 2024
2 parents f406d64 + b14b22b commit 083464b
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@

public class ChannelMavenArtifactRepositoryManager implements MavenRepoManager, ChannelResolvable, MavenStreamResolver {
private static final String REQUIRE_CHANNEL_FOR_ALL_ARTIFACT = "org.wildfly.plugins.galleon.all.artifact.requires.channel.resolution";
private static final String BOOTABLE_JAR_PLUGIN_GROUPID = "org.wildfly.plugins";
private static final String BOOTABLE_JAR_CLOUD_EXTENSION_ARTIFACTID = "wildfly-jar-cloud-extension";

private final ChannelSession channelSession;
private final List<Channel> channels = new ArrayList<>();
Expand Down Expand Up @@ -100,6 +102,15 @@ public ChannelMavenArtifactRepositoryManager(List<ChannelConfiguration> channels

@Override
public void resolve(MavenArtifact artifact) throws MavenUniverseException {
// This one is resolved directly.
if (BOOTABLE_JAR_PLUGIN_GROUPID.equals(artifact.getGroupId())
&& BOOTABLE_JAR_CLOUD_EXTENSION_ARTIFACTID.equals(artifact.getArtifactId())) {
org.wildfly.channel.MavenArtifact mavenArtifact = channelSession.resolveDirectMavenArtifact(
artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier(),
artifact.getVersion());
artifact.setPath(mavenArtifact.getFile().toPath());
return;
}
try {
resolveFromChannels(artifact);
} catch (ArtifactTransferException ex) {
Expand Down

0 comments on commit 083464b

Please sign in to comment.