Skip to content

Commit

Permalink
Merge pull request #392 from jfdenise/9.x
Browse files Browse the repository at this point in the history
[9.x] 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 b007ce4 + 8197138 commit dcc97a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ private Artifact provisionServer(Path home, Path outputProvisioningFile, Path wo
Artifact a = getArtifact(value);
if ( BOOT_ARTIFACT_ID.equals(a.getArtifactId())) {
// We got it.
getLog().info("Found boot artifact " + a + " in " + fprt.getFPID() );
getLog().info("Found boot artifact " + a.getGroupId()+":"+a.getArtifactId() + " in " + fprt.getFPID() );
bootArtifact = a;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@

public class ChannelMavenArtifactRepositoryManager implements MavenRepoManager, ChannelResolvable {
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 @@ -99,6 +101,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
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
<version.org.wildfly.core.wildfly-core>20.0.2.Final</version.org.wildfly.core.wildfly-core>
<version.org.wildfly.common>1.6.0.Final</version.org.wildfly.common>
<version.org.wildfly.plugins.wildfly-maven-plugin>4.1.1.Final</version.org.wildfly.plugins.wildfly-maven-plugin>
<version.org.wildfly.channel>1.0.5.Final</version.org.wildfly.channel>
<version.org.wildfly.prospero>1.1.5.Final</version.org.wildfly.prospero>
<version.org.wildfly.channel>1.0.6.Final</version.org.wildfly.channel>
<version.org.wildfly.prospero>1.1.11.Final</version.org.wildfly.prospero>
<maven.surefire.plugin>3.0.0-M6</maven.surefire.plugin>
<!-- These 2 dependencies are required by prod -->
<version.org.wildfly.client>1.0.1.Final</version.org.wildfly.client>
<version.org.wildfly.security>2.2.4.Final</version.org.wildfly.security>
<!-- required by tests -->
<version.org.apache.httpcomponents.httpclient>4.5.13</version.org.apache.httpcomponents.httpclient>
<version.org.apache.httpcomponents.httpclient>4.5.14</version.org.apache.httpcomponents.httpclient>
<version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
<version.org.jboss.logging.slf4j-jboss-logging>1.2.1.Final</version.org.jboss.logging.slf4j-jboss-logging>
<version.org.apache.maven.plugin-testing.maven-plugin-testing-harness>3.3.0
Expand Down

0 comments on commit dcc97a2

Please sign in to comment.