Skip to content

Commit

Permalink
Merge pull request #279 from jfdenise/main
Browse files Browse the repository at this point in the history
Upgrade to Galleon Beta2, staxmapper 1.5.0.Final, remove jandex support from the Install plugin
  • Loading branch information
jfdenise authored Jan 30, 2024
2 parents 1d38fd4 + 1da44f7 commit 9e92295
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 133 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ${{ matrix.os }}
outputs:
galleon-plugins-version: ${{ steps.version.outputs.galleon-plugins-version }}
galleon-version: ${{ steps.version.outputs.galleon-version }}
strategy:
fail-fast: false
matrix:
Expand All @@ -34,7 +35,9 @@ jobs:
run: mvn -U -B -ntp clean install
shell: bash
- id: version
run: echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT
run: |
echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT
echo "galleon-version=$(mvn -B help:evaluate -Dexpression=version.org.jboss.galleon -DforceStdout -q)" >> $GITHUB_OUTPUT
- name: Archive the repository
if: matrix.java == '11'
run: |
Expand All @@ -57,7 +60,7 @@ jobs:
name: Linux/Windows - JDK11 and JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['11', '17']"
os: "['ubuntu-latest', 'windows-latest']"
maven-repo-name: galleon-plugins-maven-repository
Expand All @@ -70,7 +73,7 @@ jobs:
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.layers -Dts.galleon'
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
os: "['ubuntu-latest']"
java-versions: "['11']"
maven-repo-name: galleon-plugins-maven-repository
Expand All @@ -82,7 +85,7 @@ jobs:
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.preview'
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['17']"
os: "['ubuntu-latest']"
maven-repo-name: galleon-plugins-maven-repository
Expand Down
4 changes: 0 additions & 4 deletions galleon-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<url>http://maven.apache.org</url>

<dependencies>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.galleon</groupId>
<artifactId>galleon-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static class ModuleArtifact {
private final MessageWriter log;
private final AbstractArtifactInstaller installer;
private final boolean channelArtifactResolution;
boolean jandex;
String coordsStr;
private MavenArtifact artifact;
private final Attribute attribute;
Expand All @@ -68,7 +67,6 @@ static class ModuleArtifact {
coordsStr = coordsStr.substring(2, coordsStr.length() - 1);
final int optionsIndex = coordsStr.indexOf('?');
if (optionsIndex >= 0) {
jandex = coordsStr.indexOf("jandex", optionsIndex) >= 0;
coordsStr = coordsStr.substring(0, optionsIndex);
}
coordsStr = this.versionProps.get(coordsStr);
Expand Down Expand Up @@ -110,10 +108,6 @@ boolean hasMavenArtifact() throws IOException {
return getMavenArtifact() != null;
}

boolean isJandex() {
return jandex;
}

void updateFatArtifact(String finalFileName) {
element.setLocalName("resource-root");
attribute.setLocalName("path");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package org.wildfly.galleon.plugin;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Path;
import java.util.Map;
Expand All @@ -42,20 +40,7 @@ public FatModuleTemplateProcessor(WfInstallPlugin plugin, AbstractArtifactInstal

@Override
protected void processArtifact(ModuleArtifact artifact) throws IOException, MavenUniverseException, ProvisioningException {
final Path artifactPath = artifact.getMavenArtifact().getPath();
final String artifactFileName = artifactPath.getFileName().toString();
String finalFileName;

if (artifact.isJandex()) {
final int lastDot = artifactFileName.lastIndexOf(".");
final File target = new File(getTargetDir().toFile(),
new StringBuilder().append(artifactFileName.substring(0, lastDot)).append("-jandex")
.append(artifactFileName.substring(lastDot)).toString());
JandexIndexer.createIndex(artifactPath.toFile(), new FileOutputStream(target), getLog());
finalFileName = target.getName();
} else {
finalFileName = getInstaller().installArtifactFat(artifact.getMavenArtifact(), getTargetDir());
}
String finalFileName = getInstaller().installArtifactFat(artifact.getMavenArtifact(), getTargetDir());
artifact.updateFatArtifact(finalFileName);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class ThinModuleTemplateProcessor extends AbstractModuleTemplateProcessor {
protected void processArtifact(ModuleArtifact moduleArtifact) throws IOException, MavenUniverseException, ProvisioningException {
MavenArtifact artifact = moduleArtifact.getMavenArtifact();
String installedVersion = getInstaller().installArtifactThin(artifact);
// ignore jandex variable, just resolve coordinates to a string
final StringBuilder buf = new StringBuilder();
buf.append(artifact.getGroupId());
buf.append(':');
Expand Down
14 changes: 3 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,21 @@
<version.org.codehaus.mojo.xml-maven-plugin>1.0.1</version.org.codehaus.mojo.xml-maven-plugin>
<version.org.codehaus.plexus.plexus-utils>3.1.0</version.org.codehaus.plexus.plexus-utils>
<version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
<version.org.jboss.galleon>6.0.0.Beta1</version.org.jboss.galleon>
<version.org.jboss.galleon>6.0.0.Beta2</version.org.jboss.galleon>
<version.org.jboss.dmr>1.5.0.Final</version.org.jboss.dmr>

<version.org.wildfly.channel>1.0.5.Final</version.org.wildfly.channel>
<version.org.wildfly.core.wildfly-core>22.0.0.Final</version.org.wildfly.core.wildfly-core>
<version.org.wildfly.maven.plugins>2.0.0.Final</version.org.wildfly.maven.plugins>

<!-- versions of artifacts shaded inside wildfly-galleon-plugins -->
<version.io.smallrye.jandex>3.0.6</version.io.smallrye.jandex>

<version.xom>1.3.7</version.xom>
<version.jaxen>1.1.6</version.jaxen>

<!-- Checkstyle configuration -->
<linkXRef>false</linkXRef>
<version.org.wildfly.checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle-config>
<version.org.wildfly.extras.batavia>1.0.12.Final</version.org.wildfly.extras.batavia>
<version.org.jboss.staxmapper>1.1.0.Final</version.org.jboss.staxmapper>
<version.org.jboss.staxmapper>1.5.0.Final</version.org.jboss.staxmapper>

<!-- license-maven-plugin configuration -->
<license.failIfMissing>true</license.failIfMissing>
Expand Down Expand Up @@ -292,12 +290,6 @@
<version>${version.org.jboss.dmr}</version>
</dependency>

<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>${version.io.smallrye.jandex}</version>
</dependency>

<dependency>
<groupId>org.jboss</groupId>
<artifactId>staxmapper</artifactId>
Expand Down

0 comments on commit 9e92295

Please sign in to comment.